# 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))
# Compute the fragment size estimation on all chromosomes
readsSize <- sapply(myData_ChrList, estimateElongationSize, "myExperiment",
resultFolder=tempdir())
Run the code above in your browser using DataLab