an error from ShortRead
1
0
Entering edit mode
wang peter ★ 2.0k
@wang-peter-4647
Last seen 10.2 years ago
hello all when i runned the scripts to clean the fastq data, it reported an error. but if i run it step by step, it has no problem reads <- readFastq(fastqfile); seqs <- sread(reads); qual <- SolexaQuality(quality(quality(reads))) that is the error place: myqual_mat <- matrix(charToRaw(as.character(unlist(qual))), nrow=length(qual), byrow=TRUE) Error in .Call(.NAME, ..., PACKAGE = PACKAGE) : negative length vectors are not allowed Calls: trimRead ... matrix -> charToRaw -> unlist -> unlist -> .Call2 -> .Call Execution halted R version 2.14.1 (2011-12-22) Platform: x86_64-redhat-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=en_US.UTF-8 LC_MESSAGES=en_US.UTF-8 [7] LC_PAPER=C 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 -- shan gao Room 231(Dr.Fei lab) Boyce Thompson Institute Cornell University Tower Road, Ithaca, NY 14853-1801 Office phone: 1-607-254-1267(day) Official email:sg839 at cornell.edu Facebook:http://www.facebook.com/profile.php?id=100001986532253
• 1.0k views
ADD COMMENT
0
Entering edit mode
Marcus Davy ▴ 390
@marcus-davy-5153
Last seen 6.7 years ago
Not sure if your reads are PhredQuality or SolexaQuality depending on the Fastq file format version. It looks as though you want to extract the quality matrix, does this work? qual <- SolexaQuality(quality(quality(reads))) as(qual, "matrix") Marcus On Sat, Mar 17, 2012 at 2:37 AM, wang peter <wng.peter@gmail.com> wrote: > hello all > when i runned the scripts to clean the fastq data, it reported an error. > but if i run it step by step, it has no problem > > reads <- readFastq(fastqfile); > seqs <- sread(reads); > qual <- SolexaQuality(quality(quality(reads))) > > that is the error place: > myqual_mat <- matrix(charToRaw(as.character(unlist(qual))), > nrow=length(qual), byrow=TRUE) > > Error in .Call(.NAME, ..., PACKAGE = PACKAGE) : > negative length vectors are not allowed > Calls: trimRead ... matrix -> charToRaw -> unlist -> unlist -> .Call2 -> > .Call > Execution halted > > > R version 2.14.1 (2011-12-22) > Platform: x86_64-redhat-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=en_US.UTF-8 LC_MESSAGES=en_US.UTF-8 > [7] LC_PAPER=C 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 > > -- > shan gao > Room 231(Dr.Fei lab) > Boyce Thompson Institute > Cornell University > Tower Road, Ithaca, NY 14853-1801 > Office phone: 1-607-254-1267(day) > Official email:sg839@cornell.edu > Facebook:http://www.facebook.com/profile.php?id=100001986532253 > > _______________________________________________ > Bioconductor mailing list > Bioconductor@r-project.org > https://stat.ethz.ch/mailman/listinfo/bioconductor > Search the archives: > http://news.gmane.org/gmane.science.biology.informatics.conductor > [[alternative HTML version deleted]]
ADD COMMENT
0
Entering edit mode
it works well on qual <- SolexaQuality(quality(quality(reads))) but that is the error place: myqual_mat <- matrix(charToRaw(as.character(unlist(qual))),nrow=length(qual), byrow=TRUE) Error in .Call(.NAME, ..., PACKAGE = PACKAGE) : negative length vectors are not allowed Calls: trimRead ... matrix -> charToRaw -> unlist -> unlist -> .Call2 -> .Call Execution halted >> R version 2.14.1 (2011-12-22) >> Platform: x86_64-redhat-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=en_US.UTF-8 ? ?LC_MESSAGES=en_US.UTF-8 >> ?[7] LC_PAPER=C ? ? ? ? ? ? ? ? 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 >> >> -- >> shan gao >> Room 231(Dr.Fei lab) >> Boyce Thompson Institute >> Cornell University >> Tower Road, Ithaca, NY 14853-1801 >> Office phone: 1-607-254-1267(day) >> Official email:sg839 at cornell.edu >> Facebook:http://www.facebook.com/profile.php?id=100001986532253 >> >> _______________________________________________ >> 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 > > -- shan gao Room 231(Dr.Fei lab) Boyce Thompson Institute Cornell University Tower Road, Ithaca, NY 14853-1801 Office phone: 1-607-254-1267(day) Official email:sg839 at cornell.edu Facebook:http://www.facebook.com/profile.php?id=100001986532253
ADD REPLY
0
Entering edit mode
On Fri, Mar 16, 2012 at 12:59 PM, wang peter <wng.peter at="" gmail.com=""> wrote: > it works well on > > qual <- SolexaQuality(quality(quality(reads))) > > but > that is the error place: > ?myqual_mat <- matrix(charToRaw(as.character(unlist(qual))),nrow=length(qual), > byrow=TRUE) Hi, Shan. Marcus was trying to help with his email. Instead of your code above, try: myqual_mat = as(qual,'matrix') Sean > Error in .Call(.NAME, ..., PACKAGE = PACKAGE) : > negative length vectors are not allowed > Calls: trimRead ... matrix -> charToRaw -> unlist -> unlist -> .Call2 -> .Call > Execution halted > > > >>> R version 2.14.1 (2011-12-22) >>> Platform: x86_64-redhat-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=en_US.UTF-8 ? ?LC_MESSAGES=en_US.UTF-8 >>> ?[7] LC_PAPER=C ? ? ? ? ? ? ? ? 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 >>> >>> -- >>> shan gao >>> Room 231(Dr.Fei lab) >>> Boyce Thompson Institute >>> Cornell University >>> Tower Road, Ithaca, NY 14853-1801 >>> Office phone: 1-607-254-1267(day) >>> Official email:sg839 at cornell.edu >>> Facebook:http://www.facebook.com/profile.php?id=100001986532253 >>> >>> _______________________________________________ >>> 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 >> >> > > > > -- > shan gao > Room 231(Dr.Fei lab) > Boyce Thompson Institute > Cornell University > Tower Road, Ithaca, NY 14853-1801 > Office phone: 1-607-254-1267(day) > Official email:sg839 at cornell.edu > Facebook:http://www.facebook.com/profile.php?id=100001986532253 > > _______________________________________________ > 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 REPLY

Login before adding your answer.

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