in reply to .qual File Writing Complication
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^2: .qual File Writing Complication
by twaddlac (Novice) on Jul 08, 2010 at 18:52 UTC | |
A .qual file is a numerical representation of the confidence of a nucleotide sequencer. Used by the modern, automated sequencers, they assign a 2 digit value to each nucleotide ACTGU (which are what all DNA is composed of) representing the accuracy of the sequencer guessing at that particular nucleotide (in my case, 40 being = 100% confidence). For example: if I were a DNA sequencer and I KNOW that the first three nucleotides are ACT but I'm only partially confident that the last nucleotide is a G. The .qual file would look something like this: 40 40 40 34. I hope this makes sense! Let me know if you need/would like further explanation! here's my code:
Feel free to ask if anything doesn't make sense (for I may have left something out from the copy and paste), if there are any hints to make it more efficient etc.. most importantly, to fix the error stated previously! Thanks again! | [reply] [d/l] |
by ww (Archbishop) on Jul 08, 2010 at 21:09 UTC | |
No syntax errors found. Warnings in OP appear to come from Bio:xxx; not from Perl. Based on the warning MSG: seq doesn't validate with [0-9A-Za-z\*\-\.=~\\/\?] and the fact I can't find any attempt in your code to "validate" a "$seq" with such a character class nor even a ($temp_seq I have to wonder: could your fastaTestData.fna be corrupt? Fixed unclosed code tag | [reply] [d/l] [select] |
by graff (Chancellor) on Jul 09, 2010 at 01:20 UTC | |
which would suggest to me that the your script that uses those Bio modules and throws that stack trace (i.e. the code that you wrote yourself) should have at least 257 lines in it. The thing that's odd about it is that the code you posted here isn't that long -- it's only 172 lines. So I don't think it makes a lot of sense to look for the error in the code you posted. Apart from that, I wonder if maybe you are getting your files confused -- like maybe you are passing your file full of numbers to a function that is expecting a file full of nucleotide letters, or something like that. Anyway, ask yourself whether you can break things up into smaller components, identify the particular piece that is causing trouble, and present just a small snippet of code and data to demonstrate the problem -- something that can be run by anyone who has the necessary modules installed (which wouldn't include me, I'm afraid). Good luck with that... | [reply] [d/l] |
by furry_marmot (Pilgrim) on Jul 09, 2010 at 04:55 UTC | |
I looked up your modules on CPAN and I see you're using the BioPerl package. There are 860 modules, 84 utility scripts, and a dozen or more documents. I don't know about the rest of y'all, but I'm not going to install and search the files. :-) From what I can see, Bio::Root::Exception is designed to throw exceptions, and the stack trace seems to be saying that it began with tagfinder.pl. How does that relate to the code you posted? I would guess that one of the many BioPerl modules is attempting to validate your data and failing. But we don't know where in your script it's failing or how you're running the program. In fact, I notice you've got print statements throughout your code, but there are none in your original post; so I can only guess that you didn't post the entire output. Is that true? If so, then what do you expect us to do? Even if someone here knows BioPerl and decides to respond, you still haven't given them enough to go on. Care to try again? --marmot | [reply] [d/l] |
by cjfields (Novice) on Jul 12, 2010 at 20:08 UTC | |
Just to note, as others have indicated putting the code here that generated that stack trace does help to trace the problem down. Looks like the problem arises when you are creating a new Bio::Seq::Quality, on line 165 of the code you submitted. According to the Bio::Seq::Quality you are using the wrong named attribute for the quality information: my $new_qual = Bio::Seq::Quality->new(-seq => $qual_string, -id => $seq->id(), -desc => $seq->desc);That should be: my $new_qual = Bio::Seq::Quality->new(-qual => $qual_string, -id => $seq->id(), -desc => $seq->desc);This class also accepts sequence data to go with those scores; not sure if it requires it, though. | [reply] [d/l] [select] |