in reply to Error with Bio::Seq Translate
..not giving it a 'seq' argument.my $prot = $seq->translate();
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^2: Error with Bio::Seq Translate
by dmbNEWB (Initiate) on Jan 06, 2015 at 16:45 UTC | |
Thanks for your reply! Well, it's only the my $prot3 = $seq->translate(2); part that does not work, which makes me think the input is fine since it works for the $prot and $prot2. However, here is sample input if it helps! The file contains 194,503 of these sequences, but here are a couple for an idea:
| [reply] [d/l] [select] |
by PerlSufi (Friar) on Jan 06, 2015 at 17:01 UTC | |
UPDATED CODE TO REFLECT TRANSLATING TO RNA For starters, here is code I made (with acknowledgements to the Perl Monks for help) to parse a fasta file:
| [reply] [d/l] |
by dmbNEWB (Initiate) on Jan 07, 2015 at 15:22 UTC | |
My overall goal is converting DNA to AMINO ACIDS (protein). (DNA to RNA is transcription, not translation). Here is information from BioPerl for using this function: http://search.cpan.org/~cjfields/BioPerl-1.6.924/Bio/PrimarySeqI.pm#translate "Function: Provides the translation of the DNA sequence using full IUPAC ambiguities in DNA/RNA and amino acid codes." Here is the code example from the Beginner's guidelines: $prot_obj = $my_seq_object->translate(-frame => 1);And here is an example code I found online in which they call using Bio::SeqIO
My script is working fine for the default frame, for the 1st frame, and until line 5401 for the 2nd frame. The part that messes up is when it gets to the (-frame => 2) file, but even that file works until line 5401. So I don't think it is an input issue. And thank you for the above code, but I am translating to amino acids. | [reply] [d/l] [select] |
by PerlSufi (Friar) on Jan 08, 2015 at 15:48 UTC | |