5
bp_make_mrna_protein - Convert an input mRNA/cDNA sequence into protein
9
Convert an input mRNA/cDNA sequence into protein using translate()
11
-f/--frame Specifies frame [0,1,2]
15
-t/--terminator Stop Codon character (defaults to '*')
16
-u/--unknown Unknown Protein character (defaults to 'X')
17
-cds/--fullcds Expected Full CDS (with start and Stop codon)
18
-throwOnError Throw error if no Full CDS (defaults to 0)
19
-if/--format Input format (defaults to FASTA/Pearson)
20
-of/--format Output format (defaults to FASTA/Pearson)
21
-o/--output Output Filename (defaults to STDOUT)
22
-i/--input Input Filename (defaults to STDIN)
23
-ct/--codontable Codon table to use (defaults to '1')
25
See L<Bio::PrimarySeq> for more information on codon tables
26
and the translate() method
28
=head1 AUTHOR - Jason Stajich
30
Email jason-at-bioperl-dot-org
43
qq{make_mrna_protein.pl < file.fa > file.prots
44
-f/--frame Translation Frame (0,1,2) are valid (defaults to '0')
45
-t/--terminator Stop Codon Character ('*' by default)
46
-u/--unknown Unknown Protein character (defaults to 'X')
47
-ct/--codontable Codon table to use (defaults to '1')
48
(see Bio::PrimarySeq for more information)
49
-cds/--fullcds Expected Full CDS (with start and Stop codon)
50
-throwOnError Throw an error if no Full CDS (defaults to 0)
51
-if/--iformat Input format (defaults to FASTA/Pearson)
52
-of/--oformat Output format (defaults to FASTA/Pearson)
53
-o/--output Output Filename (defaults to STDOUT)
54
-i/--input Input Filename (defaults to STDIN)
58
my ($iformat, $oformat, $frame, $termchar, $unknownProt, $codontable, $fullCDS,
59
$throw_on_Incomp_CDS, $help) = ('fasta','fasta', 0, undef, undef, 1, 0, 0);
62
GetOptions('f|frame:s' => \$frame,
63
't|terminator:s' => \$termchar,
64
'u|unknown:s' => \$unknownProt,
65
'ct|codontable:s' => \$codontable,
66
'cds|fullcds' => \$fullCDS,
67
'throwOnError' => \$throw_on_Incomp_CDS,
69
'i|input:s' => \$input,
70
'if|iformat:s' => \$iformat,
71
'of|oformat:s' => \$oformat,
72
'o|output:s' => \$output,
75
die $USAGE if( $help );
79
$in = new Bio::SeqIO('-format' => $iformat, '-file' => $input);
81
$in = new Bio::SeqIO('-format' => $iformat, '-fh' => \*STDIN);
85
$out = new Bio::SeqIO('-format' => $oformat, '-file' => ">$output" );
87
$out = new Bio::SeqIO('-format' => $oformat );
90
while( my $seq = $in->next_seq ) {
91
my $protseq = $seq->translate(-terminator => $termchar,
92
-unknown => $unknownProt,
94
-codontable_id => $codontable,
95
-complete => $fullCDS,
96
-throw => $throw_on_Incomp_CDS );
97
$out->write_seq($protseq);