[Bioperl-guts-l] bioperl-live/doc/howto/xml Feature-Annotation.xml,
1.8, 1.9
Brian Osborne
bosborne at pub.open-bio.org
Sun Nov 6 12:24:06 EST 2005
Update of /home/repository/bioperl/bioperl-live/doc/howto/xml
In directory pub.open-bio.org:/tmp/cvs-serv14223/xml
Modified Files:
Feature-Annotation.xml
Log Message:
Correct
Index: Feature-Annotation.xml
===================================================================
RCS file: /home/repository/bioperl/bioperl-live/doc/howto/xml/Feature-Annotation.xml,v
retrieving revision 1.8
retrieving revision 1.9
diff -C2 -d -r1.8 -r1.9
*** Feature-Annotation.xml 26 Oct 2005 12:20:10 -0000 1.8
--- Feature-Annotation.xml 6 Nov 2005 17:24:04 -0000 1.9
***************
*** 1169,1187 ****
addition of data that's not explicitly accounted for by its
methods, that's what the "-tag" is for, above.
! If you want to add your own custom data to a feature you could
! use the "-tag" tag or you could add values after the object has
! been created:
</para>
<para>
<programlisting>
! $feat->add_tag_value("match1","PF000123 e-7.2");
! $feat->add_tag_value("match2","PF002534 e-3.1");
! my @arr = $feat->get_all_tags;
! for my $tag (@arr) {
! print $tag,":",$feat->get_tag_values($tag)," ";
! }
! # prints out:
! # author:john match1:PF000123 e-7.2 match2:PF002534 e-3.1 note:TATA box
</programlisting>
</para>
--- 1169,1198 ----
addition of data that's not explicitly accounted for by its
methods, that's what the "-tag" is for, above.
! Since the value passed to "-tag" could be any kind of scalar,
! like a reference, it's clear that this approach should be able
! handle just about any sort of data.
! </para>
! <para>
! You can build on the Feature as well.
! Here we'll add some Annotations to the newly-created Feature:
</para>
<para>
<programlisting>
! $feat->add_Annotation("match1","PF000123 e-7.2");
! $feat->add_Annotation("match2","PF002534 e-3.1");
! my @tags = $feat->get_all_tags;
! for my $tag (@tags) {
! for my $val ( $feat->get_tag_values($tag) ) {
! print $tag,":",$val,"\n";
! }
! }
!
! # prints out:
! # match2:PF002534 e-3.1
! # match1:PF000123 e-7.2
! # author:john
! # note:TATA box
! # start: 10 end: 22
</programlisting>
</para>
***************
*** 1189,1198 ****
</para>
<para>
! Since the value passed to "-tag" could be any kind of scalar,
! like a reference, it's clear that this approach should be able
! handle just about any sort of data.
</para>
<para>
! Once the feature is created it can be associated with our sequence:
</para>
<para>
--- 1200,1208 ----
</para>
<para>
!
</para>
<para>
! Once the feature, and its annotations, are created it can be
! associated with a sequence:
</para>
<para>
***************
*** 1234,1238 ****
<para>
Now let's examine what we've created by writing the contents of
! <varname>$seq_obj</varname> to a Genbank file called "test.gb":
</para>
<para>
--- 1244,1251 ----
<para>
Now let's examine what we've created by writing the contents of
! <varname>$seq_obj</varname> to a Genbank file called "test.gb".
! We should see a sequence, an Annotation associated with the
! sequence, a sequence Feature, and Annotations associated with
! the Feature:
</para>
<para>
More information about the Bioperl-guts-l
mailing list