![]() |
|
![]() |
||||
Thread | Thread Starter | Forum | Replies | Last Post |
does bioperl::seqIO:: | Kojo | Bioinformatics | 2 | 10-08-2012 05:49 AM |
Simulations in Bioperl? | A_Morozov | Bioinformatics | 0 | 04-12-2012 12:10 AM |
perl bioperl version | m_elena_bioinfo | Bioinformatics | 1 | 02-21-2011 11:37 AM |
bioperl for samtools | m_elena_bioinfo | Bioinformatics | 4 | 09-07-2010 06:39 AM |
Bioperl | jsun529 | Bioinformatics | 7 | 09-01-2009 08:27 AM |
![]() |
|
Thread Tools |
![]() |
#1 |
Member
Location: chicago Join Date: Nov 2012
Posts: 19
|
![]()
!usr/bin/perl -w
use Bio: ![]() use Bio::Restriction::EnzymeCollection; use Bio::Restriction::Analysis; my $gb=new Bio: ![]() my $seq=$gb->getSeqbyacc('AF303112'); print $seq->seq,"\n"; my $allcollection=Bio::Restriction::EnzymeCollection; my $myenzyme=$allcollection->getenzyme('EcoRI'); my $analysis=Bio::Restriction::Analysis->new(-seq=>$seq); @fragment=$analysis->fragments($myenzyme); print "@fragment\n"; my $proobj=$seq->translate(-complete=>1); print $proobj->seq; I want to get a sequence by accession number, and then find if there is a EcoRI enzyme site in this sequence and finally translate this sequence into protein. But the output is only the Nuclear Acid sequence, what's wrong, can someone tell me? Thanks! |
![]() |
![]() |
![]() |
#2 |
Senior Member
Location: Boston area Join Date: Nov 2007
Posts: 747
|
![]()
Note: if you use the advanced editor, you can wrap your code in tags which will make it much easier to read (I've added use strict, which you should use strictly!). My tweaks to your code are in bold.
Code:
!usr/bin/perl -w use strict; use Bio:B::GenBank; use Bio::Restriction::EnzymeCollection; use Bio::Restriction::Analysis; my $gb=new Bio:B::GenBank(); my $seq=$gb->getSeqbyacc('AF303112'); print $seq->seq,"\n"; my $allcollection=Bio::Restriction::EnzymeCollection; my $myenzyme=$allcollection->getenzyme('EcoRI'); my $analysis=Bio::Restriction::Analysis->new(-seq=>$seq); my @fragment=$analysis->fragments($myenzyme); print "@fragment\n"; my $proobj=$seq->translate(-complete=>1); print $proobj->seq; I'm afraid I don't see an obvious problem, but if you look at what is contained in @fragment it might give a hint. Are you sure this sequence has an EcoRI site? |
![]() |
![]() |
![]() |
Tags |
bioperl beginner program |
Thread Tools | |
|
|