Bio::Restriction::Analysis
mulitple_digest
Title : multiple_digest
Function : perform a multiple digest on a sequence
Returns : $self so you can go and get any of the other methods
Arguments : An enzyme collection
Multiple digests can use 1 or more enzymes, and the data is stored
in as if it were an enzyme called multiple_digest. You can then
retrieve information about multiple digests from any of the other
methods.
You can use this method in place of $re->cut('multiple', $enz_coll);
Bio::Restriction::EnzymeCollection
# Get a Bio::Restriction::Enzyme object for a particular enzyme by name.
my $enz = $default_collection->get_enzyme( 'EcoRI' );
1 2 3 4 5 6 7 8
| my @enz_obj;
foreach my $enz_name ('Alu', 'EcoR1'){
# Get a Bio::Restriction::Enzyme object for a particular enzyme by name.
push @enz_obj, $default_collection->get_enzyme( $enz_name );
} |
Si ensuite j'ajoute
my $self = $ra->cut('multiple', @enz_obj);
ou
my $self = $ra->cut('multiple', $default_collection->get_enzyme('Alu') );
j'ai l'erreur :
------------- EXCEPTION -------------
MSG: You must supply a separate enzyme collection for multiple digests
STACK Bio::Restriction::Analysis::cut C:/Perl/site/lib/Bio/Restriction/Analysis.pm:356
STACK toplevel Restriction_analysis.pl:71
--------------------------------------
Avec
my $self = $ra->mulitple_digest(@enz_obj);
c'est
Can't locate object method "mulitple_digest" via package "Bio::Restriction::Analysis" at Restriction_analysis.pl line 71, <DATA> line 1064.
J'ai essayé ces méthodes avec des références d'array mais ça ne fonctionne pas non plus. Avez-vous une idée? Quel doit être l'argument quand on veut utiliser plusieurs enzymes?
Voici un code qui peut directement être testé
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
| #!/usr/bin/perl -w
use strict;
use Bio::Restriction::Analysis;
# liste des enzymes diponibles
my $default_collection = Bio::Restriction::EnzymeCollection->new();
# get a DNA sequence from somewhere
my $seq = Bio::PrimarySeq->new
(-seq =>'AGCTTAATTCATTAGCTCTGACTGCAACGGGCAATATGTCTC',
-primary_id => 'synopsis',
-molecule => 'dna');
# now start an analysis.
# this is using the default set of enzymes
my $ra = Bio::Restriction::Analysis->new(-seq=>$seq, -is_circular => 1);
my @enz_obj;
foreach my $enz_name ('Alu', 'EcoR1'){
# Get a Bio::Restriction::Enzyme object for a particular enzyme by name.
push @enz_obj, $default_collection->get_enzyme( $enz_name );
}
my $self = $ra->mulitple_digest(@enz_obj); |
Merci pour votre aide;
Partager