# Get the path to the example BAM file (and the index)
exampleBAM_fileName <- system.file("extdata",
"embedDataTest.bam",
package="Pasha")
# Reading aligned file
myData <- readAlignedData(folderName="",
fileName=exampleBAM_fileName,
fileType="BAM",
pairedEnds=FALSE)
# Split the dataset in a list by chromosomes (not mandatory in this case
# but done like this in the pipeline for consistency with others functions
# which need objects with single chromosomes)
myData_ChrList <- split(myData, seqnames(myData))
# Get the indexes of reads in artefactual piles for each chromosome
indexesArtefacts <- sapply(myData_ChrList,
getArtefactsIndexes,
expName="myExperiment",
thresholdToUse=1,
thresholdForStats=c(1:5),
resultFolder=tempdir())
Run the code above in your browser using DataLab