[BioC] ShortRead error when reading BAM file

Alex Gutteridge alexg at ruggedtextile.com
Thu Sep 15 11:35:27 CEST 2011


 I'm trying to load a BAM file generated by Mosaik using ShortRead, but 
 I'm getting the following error:

> aln.bam = 
> readAligned("data/ALIGNMENT/A430001.1.samtools.bam",type="BAM")
 Error: Input/Output
   'readAligned' failed to parse files
   dirPath: 'data/ALIGNMENT/A430001.1.samtools.bam'
   pattern: ''
   type: 'BAM'
   error: INTEGER() can only be applied to a 'integer', not a 'symbol'
> sessionInfo()
 R version 2.12.0 (2010-10-15)
 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.8.1     Rsamtools_1.2.3     lattice_0.19-13
 [4] Biostrings_2.18.0   GenomicRanges_1.2.1 IRanges_1.8.2

 loaded via a namespace (and not attached):
 [1] Biobase_2.10.0 grid_2.12.0    hwriter_1.2    tools_2.12.0

 I ran samtools from the command-line over the original Mosiak BAM file 
 and it completed fine:

 samtools view -b A430001.1.bam > A430001.1.samtools.bam

 but I get the above error on both the Mosaik original and samtools 
 processed BAM file.

 I also tried the debug suggested here: 
 https://stat.ethz.ch/pipermail/bioconductor/2010-October/035745.html but 
 it segfaulted:

> param = ScanBamParam(simpleCigar = TRUE, reverseComplement = TRUE,
 +     what = ShortRead:::.readAligned_bamWhat())
>
> res = scanBam('data/ALIGNMENT/A430001.1.samtools.bam', param=param)

  *** caught segfault ***
 address (nil), cause 'unknown'

 Traceback:
  1: .Call(func, file, index, "rb", NULL, flag, simpleCigar, ...)
  2: .io_bam(.scan_bam, file, index, reverseComplement, tmpl, param = 
 param)
  3: scanBam("data/ALIGNMENT/A430001.1.samtools.bam", param = param)
  4: scanBam("data/ALIGNMENT/A430001.1.samtools.bam", param = param)

 Any suggestions to debug the file would be gratefully accepted.

-- 
 Alex Gutteridge



More information about the Bioconductor mailing list