/usr/bin/bp_make_mrna_protein is in bioperl 1.6.901-2.
This file is owned by root:root, with mode 0o755.
The actual contents of the file can be viewed below.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 | #!/usr/bin/perl -w
eval 'exec /usr/bin/perl -w -S $0 ${1+"$@"}'
if 0; # not running under some shell
#
=head1 NAME
make_mrna_protein - Convert an input mRNA/cDNA sequence into protein
=head1 DESCRIPTION
Convert an input mRNA/cDNA sequence into protein using translate()
-f/--frame Specifies frame [0,1,2]
One can also specify:
-t/--terminator Stop Codon character (defaults to '*')
-u/--unknown Unknown Protein character (defaults to 'X')
-cds/--fullcds Expected Full CDS (with start and Stop codon)
-throwOnError Throw error if no Full CDS (defaults to 0)
-if/--format Input format (defaults to FASTA/Pearson)
-of/--format Output format (defaults to FASTA/Pearson)
-o/--output Output Filename (defaults to STDOUT)
-i/--input Input Filename (defaults to STDIN)
-ct/--codontable Codon table to use (defaults to '1')
See L<Bio::PrimarySeq> for more information on codon tables
and the translate() method
=head1 AUTHOR - Jason Stajich
Email jason-at-bioperl-dot-org
=cut
use strict;
use Bio::SeqIO;
use Getopt::Long;
use vars qw($USAGE);
BEGIN {
$USAGE =
qq{make_mrna_protein.pl < file.fa > file.prots
-f/--frame Translation Frame (0,1,2) are valid (defaults to '0')
-t/--terminator Stop Codon Character ('*' by default)
-u/--unknown Unknown Protein character (defaults to 'X')
-ct/--codontable Codon table to use (defaults to '1')
(see Bio::PrimarySeq for more information)
-cds/--fullcds Expected Full CDS (with start and Stop codon)
-throwOnError Throw an error if no Full CDS (defaults to 0)
-if/--iformat Input format (defaults to FASTA/Pearson)
-of/--oformat Output format (defaults to FASTA/Pearson)
-o/--output Output Filename (defaults to STDOUT)
-i/--input Input Filename (defaults to STDIN)
};
}
my ($iformat, $oformat, $frame, $termchar, $unknownProt, $codontable, $fullCDS,
$throw_on_Incomp_CDS, $help) = ('fasta','fasta', 0, undef, undef, 1, 0, 0);
my ($input,$output);
GetOptions('f|frame:s' => \$frame,
't|terminator:s' => \$termchar,
'u|unknown:s' => \$unknownProt,
'ct|codontable:s' => \$codontable,
'cds|fullcds' => \$fullCDS,
'throwOnError' => \$throw_on_Incomp_CDS,
'h|help' => \$help,
'i|input:s' => \$input,
'if|iformat:s' => \$iformat,
'of|oformat:s' => \$oformat,
'o|output:s' => \$output,
);
die $USAGE if( $help );
my ($in,$out);
if( $input ) {
$in = new Bio::SeqIO('-format' => $iformat, '-file' => $input);
} else {
$in = new Bio::SeqIO('-format' => $iformat, '-fh' => \*STDIN);
}
if( $output ) {
$out = new Bio::SeqIO('-format' => $oformat, '-file' => ">$output" );
} else {
$out = new Bio::SeqIO('-format' => $oformat );
}
while( my $seq = $in->next_seq ) {
my $protseq = $seq->translate(-terminator => $termchar,
-unknown => $unknownProt,
-frame => $frame,
-codontable_id => $codontable,
-complete => $fullCDS,
-throw => $throw_on_Incomp_CDS );
$out->write_seq($protseq);
}
__END__
|