[Bioperl-l] New Restriction Analysis
Staffa, Nick (NIH/NIEHS) [C]
staffa at niehs.nih.gov
Tue May 25 14:51:02 UTC 2010
I have tried both these methods for getting new enzyme info into the system:
use Bio::Restriction::IO;
my $re_io = Bio::Restriction::IO->new(-file => $file,
-format=>'withrefm');
my $rebase_collection = $re_io->read;
A REBASE file in the correct format can be found at ftp://ftp.neb.com/pub/rebase - it will have a name like "withrefm.308". If need be you can also create new enzymes, like this:
my $re = new Bio::Restriction::Enzyme(-enzyme => 'BioRI',
-seq => 'GG^AATTCC');
But the BioPerl sends an error without informing me which of my statements caused it:
Using first the withreftm.005 file from rebase and then these statements (not both at the same time):
my $enzyme = new Bio::Restriction::Enzyme(-enzyme => 'SgrDI',
-seq => 'CG^TCGACG');
Can't use an undefined value as an ARRAY reference at /usr/lib/perl5/site_perl/5.8.8/Bio/Restriction/Analysis.pm line 529.
This works:
my $pattern = $enzyme->site;
print "pattern = $pattern\n";
which would lead me to believe there is nothing wrong with my enzyme.
Could there be a problem if there were no cuts?
That must be it, because putting info for EcoRI in instead of SgrDI, the program works:
[Not the whole program, but only the bioPerl stuff.
my $enzyme = new Bio::Restriction::Enzyme(-enzyme => 'EcoRI',
-seq => 'G^AATTC');
use Bio::Restriction::Analysis;
my $pattern = $enzyme->site;
print "pattern = $pattern\n";
my $db = Bio::DB::Fasta->new("/uoldhome/estaffa/westmoreland/$filename",
-makeid => \&make_my_id);
my $obj = $db->get_Seq_by_id("$sequenceID"); #Sequence Object
my $analysis = Bio::Restriction::Analysis->new(-seq => $obj);
my @strings = $analysis->fragments($enzyme);
What to do?
Nick Staffa
Telephone: 919-316-4569 (NIEHS: 6-4569)
Scientific Computing Support Group
NIEHS Enterprise-Wide Information Technology Support Contract
National Institute of Environmental Health Sciences
National Institutes of Health
Research Triangle Park, North Carolina
More information about the Bioperl-l
mailing list