-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathexample.R
More file actions
24 lines (17 loc) · 747 Bytes
/
example.R
File metadata and controls
24 lines (17 loc) · 747 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
library(ifCNVR)
pathToBam <- "/path/to/bam/files/"
pathToBed <- "/path/to/bed/file.bed"
pathToBedtools <- "/path/to/bedtools/"
outputPath <- "/path/to/html/report.html"
# After installing bedtools (https://bedtools.readthedocs.io/en/latest/content/installation.html),
# type which bedtools in your console to get the pathToBedtools
# Create reads matrix
readsMatrix <- CreateReadsMatrix(pathToBam, pathToBed, pathToBedtools)
# Detect CNV positive samples
CNVpos <- abSamples(readsMatrix)
# Detect CNV positive targets
CNVtar <- abTargets(readsMatrix, CNVpos)
# Create the results table
resTable <- calculateScore(readsMatrix, CNVpos, CNVtar)
# Generate the html report
generateReport(outputFile=outputPath, readsMatrix, resTable, CNVpos)