[BioC] Illumina QC using ShortRead

Martin Morgan mtmorgan at fhcrc.org
Fri Oct 8 18:59:56 CEST 2010


On 10/08/2010 01:42 AM, Davide Cittaro wrote:
> Hi Martin, 
> 
> On Oct 7, 2010, at 7:44 PM, Martin Morgan wrote:
>>
>> library(ShortRead)
>> fl <- system.file("extdata", "ex1.bam", package="Rsamtools")
>> fls <- c(fl, fl, fl)
>>
>> qa <- do.call(rbind, Map(function(fl, id, ...) {
>>    aln <- readAligned(fl, type="BAM", ...)
>>    qa(aln, id)
>> }, fls, paste(basename(fls), seq_along(fls), sep="-")))
>>
> 
> I'm not familiar with R errors but what about this? 
> 
> Error: Input/Output
>   'readAligned' failed to parse files
>   dirPath: './100927_s_1.bam'
>   pattern: ''
>   type: 'BAM'
>   error: INTEGER() can only be applied to a 'integer', not a 'special'

It is difficult to know the details, but likely involves either
incorrect arguments passed to a C-level function in Rsamtools or a
corrupt or otherwsie unexpected BAM file. Can you (a) try to read the
bam file directly using

param = ScanBamParam(simpleCigar = TRUE, reverseComplement = TRUE,
    what = ShortRead:::.readAligned_bamWhat())

res = scanBam('./100927_s_1.bam', param=param)

I think this will fail, and then

  traceback()

might provide useful (to me, anyway) output. Also, please provide the
output of sessionInfo(). Here's mine

> sessionInfo()
R version 2.11.1 Patched (2010-08-30 r52862)
Platform: x86_64-unknown-linux-gnu (64-bit)

locale:
 [1] LC_CTYPE=en_US.UTF-8       LC_NUMERIC=C
 [3] LC_TIME=en_US.UTF-8        LC_COLLATE=en_US.UTF-8
 [5] LC_MONETARY=C              LC_MESSAGES=en_US.UTF-8
 [7] LC_PAPER=en_US.UTF-8       LC_NAME=C
 [9] LC_ADDRESS=C               LC_TELEPHONE=C
[11] LC_MEASUREMENT=en_US.UTF-8 LC_IDENTIFICATION=C

attached base packages:
[1] stats     graphics  grDevices utils     datasets  methods   base

other attached packages:
[1] ShortRead_1.6.2     Rsamtools_1.0.8     lattice_0.19-11
[4] Biostrings_2.16.9   GenomicRanges_1.0.9 IRanges_1.6.18

loaded via a namespace (and not attached):
[1] Biobase_2.8.0 grid_2.11.1   hwriter_1.2


Thanks,

Martin

> 
> Also, note that I've loaded files like this:
> 
> fls <- list.files(".", pattern="100927_", full.names=TRUE)
> 
> d
> 
> /*
> Davide Cittaro
> 
> Cogentech - Consortium for Genomic Technologies
> via adamello, 16
> 20139 Milano
> Italy
> 
> tel.: +39(02)574303007
> e-mail: davide.cittaro at ifom-ieo-campus.it
> <mailto:davide.cittaro at ifom-ieo-campus.it>
> */
> 
> 
> 


-- 
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