[Bioperl-l] Build new Swiss-Prot Seq
Brian Osborne
brian_osborne at cognia.com
Thu Sep 16 08:16:59 EDT 2004
Hafiz,
I'm not sure I understand. Are you seeing errors when you run your code?
Brian O.
-----Original Message-----
From: bioperl-l-bounces at portal.open-bio.org
[mailto:bioperl-l-bounces at portal.open-bio.org]On Behalf Of hafiz hafiz
Sent: Thursday, September 16, 2004 8:00 AM
To: bioperl-l at portal.open-bio.org
Subject: [Bioperl-l] Build new Swiss-Prot Seq
Hello , everybody can help me, i want to buid a new
sequence in swissprot and i have used 3 modul such as
Bio::SeqFeature, Bio::Seq, Bio::Annotation::Comments,
Bio::Annotation::Simplevalue, Bio::Annotation
Bio::Annotation::references and
Bio::Annotation::Dblink, so it's true or not.
This is my souces code;
$feat = new Bio::SeqFeature::Generic ( -start => 10,
-end => 100,
-strand => -1,
-primary => 'repeat',
-source_tag =>
'repeatmasker',
-display_name => 'alu
family',
-score => 1000,
-tag => {
new => 1,
author =>
'someone',
sillytag => 'this
is silly!' } );
#my $feat = new Bio::SeqFeature::Generic(-start
=>10,-end => 22, -strand =>1,
# -tag =>{
author => 'john',note =>'TATA box'});
$feat->add_tag_value("match1","PF000123 e-7.2");
$feat->add_tag_value("match2","PF002534 e-7.2");
my @arr = $feat->get_all_tags;
for my $tag (@arr){
print $tag,":",$feat->get_tag_values($tag),"
";
}
my $seq_obj =Bio::Seq
->new(-seq=>"attcccccchjkhjkhkjh",
-display_id=>"BIO52" );
$seq_obj->add_SeqFeature($feat);
my $comment =Bio::Annotation::Comment->new;
$comment->text("this looks like a good TATA box");
my $coll =new Bio::Annotation::Collection;
$coll->add_Annotation('comment',$comment);
$seq_obj->annotation($coll);
my $col = new Bio::Annotation::Collection;
my $sv = new Bio::Annotation::SimpleValue(-value =>
'someval');
$col->add_Annotation('tagname', $sv);
$reg = Bio::Annotation::Reference->new( -title =>
'title line',
-location
=> 'location line',
-authors
=> 'author line',
-medline
=> 998122 );
$link1 = new Bio::Annotation::DBLink(-database =>
'TSC',
-primary_id =>
'TSC0000030'
);
#or
$link2 = new Bio::Annotation::DBLink();
$link2->database('dbSNP');
$link2->primary_id('2367');
# DBLink is-a Bio::AnnotationI object, can be added
to annotation
# collections, e.g. the one on features or seqs
$feat->annotation->add_Annotation('dblink', $link2);
$file3="/home/database/Bioperl/test.gb";
my $io= Bio::SeqIO ->new(-format =>"swiss",-file =>
">$file3");
$io ->write_seq($seq_obj);
________________________________________________________________________
Yahoo! Messenger - Communicate instantly..."Ping"
your friends today! Download Messenger Now
http://uk.messenger.yahoo.com/download/index.html
_______________________________________________
Bioperl-l mailing list
Bioperl-l at portal.open-bio.org
http://portal.open-bio.org/mailman/listinfo/bioperl-l
More information about the Bioperl-l
mailing list