Skip to contents

Check the first 100000 first reads of the bam file to see whether it is single-end or paired-end

Usage

checkPairedEnd(file, yieldSize = 1e+05)

Arguments

file

the input bam file. Your bamfile should be sorted and have an index file located at the same path as well.

yieldSize

the number of reads to be checked, 100000 by default.

Value

return TRUE if the input file is paired end, and FALSE if it is single end

Examples

file <- system.file('extdata','s1.sorted.bam',package = 'strandCheckR')
checkPairedEnd(file)
#> Testing paired end by checking the first 1e+05 reads of file /__w/_temp/Library/strandCheckR/extdata/s1.sorted.bam
#> Your bam file is single end
#> [1] FALSE