shortread readAligned with BWA
1
0
Entering edit mode
nac ▴ 280
@nac-4545
Last seen 10.2 years ago
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&amp;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.
GO ShortRead GO ShortRead • 1.4k views
ADD COMMENT
0
Entering edit mode
@martin-morgan-1513
Last seen 4 months ago
United States
Hi Nathalie I think your bam files are too large for your version of R! I suggest using the development version of R then biocLite('ShortRead') then trying again. Martin -- Martin Morgan On Aug 19, 2011, at 16:47, Nathalie Conte <nac at="" sanger.ac.uk=""> wrote: > 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&amp;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. > > _______________________________________________ > Bioconductor mailing list > Bioconductor at r-project.org > https://stat.ethz.ch/mailman/listinfo/bioconductor > Search the archives: http://news.gmane.org/gmane.science.biology.informatics.conductor
ADD COMMENT

Login before adding your answer.

Traffic: 939 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