[BioC] shortread readAligned with BWA
Nathalie Conte
nac at sanger.ac.uk
Fri Aug 19 17:47:18 CEST 2011
HI,
I am trying to use ShortRead to get QCs on my bam files ( aligned with BWA)
this is what I used to read my aligned files
> read_bam<-readAligned(".",pattern="bam",type="BAM")
then I have this error:
Error: Input/Output
'readAligned' failed to parse files
dirPath: '.'
pattern: 'bam'
type: 'BAM'
error: negative length vectors are not allowedshortread
I saw on a previous bioconductor mailing list that Martin Morgan gave
some previous clues about this kind of error and advised to check the
Bam using these commands
#### Martin Morgan
<http://search.gmane.org/?author=Martin+Morgan&sort=date> | 8 Oct 18:59
Favicon
Re: Illumina QC using ShortRead
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()
####
If I do this, I get this kind output :
> param = ScanBamParam(simpleCigar = TRUE, reverseComplement = TRUE,
what = ShortRead:::.readAligned_bamWhat())
> res = scanBam('./6160_7#16.bam', param=param)
Error in .Call(func, file, index, "rb", NULL, flag, simpleCigar, ...) :
negative length vectors are not allowed
> traceback()
4: .Call(func, file, index, "rb", NULL, flag, simpleCigar, ...)
3: .io_bam(.scan_bam, file, index, reverseComplement, tmpl, param = param)
2: scanBam("./6160_7#16.bam", param = param)
1: scanBam("./6160_7#16.bam", param = param)
Could somebody advise on the best way to go forward?My Bams don't seem to be right for ShortRead, Do I need to realign my reads?
Many thanks
Nathalie
> sessionInfo()
R version 2.11.1 (2010-05-31)
x86_64-unknown-linux-gnu
locale:
[1] LC_CTYPE=en_GB.UTF-8 LC_NUMERIC=C
[3] LC_TIME=en_GB.UTF-8 LC_COLLATE=en_GB.UTF-8
[5] LC_MONETARY=C LC_MESSAGES=C
[7] LC_PAPER=en_GB.UTF-8 LC_NAME=C
[9] LC_ADDRESS=C LC_TELEPHONE=C
[11] LC_MEASUREMENT=en_GB.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.18-8
[4] Biostrings_2.16.6 GenomicRanges_1.0.4 IRanges_1.6.13
loaded via a namespace (and not attached):
[1] Biobase_2.8.0 grid_2.11.1 hwriter_1.3 tools_2.11.1
--
The Wellcome Trust Sanger Institute is operated by Genome Research
Limited, a charity registered in England with number 1021457 and a
company registered in England with number 2742969, whose registered
office is 215 Euston Road, London, NW1 2BE.
More information about the Bioconductor
mailing list