Entering edit mode
Thomas Unterthiner
▴
50
@thomas-unterthiner-4148
Last seen 10.6 years ago
Hi there!
According to the documentation, the "isUnmappedQuery" should be set to
FALSE if I want to obtain only unmapped reads and to TRUE if I am only
interested in mapped reads. However I find that it works exactly the
other way around.
I.e. executing:
y <- scanBam(file, param=ScanBamParam(what=c("qname"),
flag=scanBamFlag(isUnmappedQuery=TRUE))))
and grepping for the returned query-names in the bamfile itself I find
only reads that are not mapped, whereas changing the isUnmappedQuery
to
FALSE i get reads that indeed are mapped. This is exactly opposite to
what the documentation states:
"isUnmappedQuery: A logical(1) indicating whether unmapped (FALSE),
mapped (TRUE), or any (NA) read should be returned."
I am thus assuming there is a mistake in either the documentation or
the
code. Which one is it? (Or, am I just doing something wrong and not
w/o
it?)
Cheers
Thomas
----------
> sessionInfo()
R version 2.11.1 (2010-05-31)
x86_64-pc-linux-gnu
locale:
[1] LC_CTYPE=en_US.utf8 LC_NUMERIC=C
[3] LC_TIME=en_US.utf8 LC_COLLATE=en_US.utf8
[5] LC_MONETARY=C LC_MESSAGES=en_US.utf8
[7] LC_PAPER=en_US.utf8 LC_NAME=C
[9] LC_ADDRESS=C LC_TELEPHONE=C
[11] LC_MEASUREMENT=en_US.utf8 LC_IDENTIFICATION=C
attached base packages:
[1] stats graphics grDevices utils datasets methods base
other attached packages:
[1] Rsamtools_1.0.5 Biostrings_2.16.6 GenomicRanges_1.0.5
[4] IRanges_1.6.8
loaded via a namespace (and not attached):
[1] Biobase_2.8.0