Rsamtools: ScanBamParam IsUnmappedQuery flag
1
0
Entering edit mode
@thomas-unterthiner-4148
Last seen 9.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
• 834 views
ADD COMMENT
0
Entering edit mode
@martin-morgan-1513
Last seen 4 days ago
United States
On 07/19/2010 09:49 AM, Thomas Unterthiner wrote: > 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?) It's a documentation error, should be fixed when 1.0.6 reaches biocLite() in 24-36 hours. Thanks for the report. Martin > > 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 > > _______________________________________________ > Bioconductor mailing list > Bioconductor at stat.math.ethz.ch > https://stat.ethz.ch/mailman/listinfo/bioconductor > Search the archives: > http://news.gmane.org/gmane.science.biology.informatics.conductor -- Martin Morgan Computational Biology / Fred Hutchinson Cancer Research Center 1100 Fairview Ave. N. PO Box 19024 Seattle, WA 98109 Location: Arnold Building M1 B861 Phone: (206) 667-2793
ADD COMMENT

Login before adding your answer.

Traffic: 705 users visited in the last hour
Help About
FAQ
Access RSS
API
Stats

Use of this site constitutes acceptance of our User Agreement and Privacy Policy.

Powered by the version 2.3.6