This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
--- ./Array.pm 2009/01/17 16:37:01 1.1 | |
+++ ./Array.pm 2009/01/17 20:16:42 | |
@@ -136,6 +136,18 @@ | |
} | |
} | |
+sub sort_in_place : method { | |
+ my ($attr, $reader, $writer) = @_; | |
+ return sub { | |
+ my ($instance, $predicate) = @_; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
my $protease = Bio::Protease->new(specificity => 'trypsin'); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
my $cutting_pattern = Bio::Tools::SeqPattern->new( | |
-SEQ => 'XXXW[^P]RSX', -TYPE => 'Amino' | |
); | |
my $protease = Bio::Protease->new(specificity => $cutting_pattern); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
my $nobel_prize_winning_specificity_model = sub { | |
my $peptide = shift; | |
# decide whether to cut $peptide or not | |
} | |
my $protease = Bio::Protease->new( | |
specificity => $nobel_prize_winning_specificity_model; | |
); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
my @products = $protease->digest('MAAEEELLKKVVIKP'); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
my @cut_sites = $protease->cleavage_sites($seq); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
my @products = $protease->cut($seq, $cut_sites[rand @cut_sites]); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
sub translate { | |
# Translate the input file from dna to protein, replacing the | |
# original file. Sequences that are already protein remain | |
# untouched. | |
my ( $filename, $fullpath ) = @_; | |
# Input sequence stream. | |
my $seqI = Bio::SeqIO->new( -file => $fullpath ); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
sub translate { | |
my ( $filename, $fullpath ) = @_; | |
my $seqI = Bio::SeqIO->new( -file => $fullpath ); | |
my $tempfile = File::Temp->new( SUFFIX => '.fasta' )->filename; | |
my $seqO = Bio::SeqIO->new( | |
-file => ">$tempfile", | |
-format => 'fasta' |
OlderNewer