[BioC] ShortRead qa() for BAM files?

Martin Morgan mtmorgan at fhcrc.org
Thu Oct 7 00:33:45 CEST 2010

On 10/06/2010 12:55 PM, Hollis Wright wrote:
> Hello, all; is there no qa() function in ShortRead for BAM files? I've noticed there is no BAM-specific qa function in the documentation for ShortRead. I've imported a BAM representing a single lane on a Illumina IIGA run after alignment with Bowtie and conversion of SAM to BAM with samtools thus: 
> params <- ScanBamParam(scanBamFlag(isUnmappedQuery=FALSE), what=scanBamWhat())
> lane1 <- readAligned("s_1_sequence.txt.sorted.bam.bam", type="BAM", param=params)
> which reads in ok, but qa complains:
> qa(lane1)
> Error: UserArgumentMismatch
>   'lane' must be 'character(1)'

> Is this because there is no function to handle BAM files? Or is this
some problem with the file itself or with only using a single read? For
what it's worth, coverage runs fine on this object.

Hi Hollis,

No, qa() wants to identify the samples it's doing qa on, so it's looking for

  qa(lane1, "IAmNumberOne")

The documentation can be found, awkwardly, by looking for the qa method
that is being used

  selectMethod(qa, class(lane1))

which leads to a lot of output and then

target  "AlignedRead"
defined "ShortReadQ"

and then the help page for the 'defined' class,

  > ?"qa,ShortReadQ-method"

FWIW, there is also an rbind defined, so

  rbind(qa1, qa2, <...>)

where the qa1, qa2, etc might have been generated by sequential calls to
readAligned, i.e., only ever having one set of reads present in memory
at a time (the size of the results of qa() are small).

Also, There will be a qa method for BAM files in the forthcoming
release. And we'll try to make the documentation more accessible on this


> Hollis Wright, PhD
> Oregon Clinical and Translational Research Institute
> _______________________________________________
> 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

Computational Biology
Fred Hutchinson Cancer Research Center
1100 Fairview Ave. N. PO Box 19024 Seattle, WA 98109

Location: M1-B861
Telephone: 206 667-2793

More information about the Bioconductor mailing list