[Bioperl-l] Locuslink parser

Law, Annie Annie.Law at nrc-cnrc.gc.ca
Thu Feb 12 12:46:56 EST 2004


Hi,

I would appreciate help with the following.  I have searched for questions
on the locuslink parser but have not found answers to my questions. I am
trying to understand how to use the locuslink parser. I am most interested
in obtaining the fields  locuslink id, 
GO id, accession number, unigene id. However, when I use the following code.
I am only able to get information for the fields:
ALIAS_PROT,ALIAS_SYMBOL,CDD,CHR,CURRENT_LOCUSID,ECNUM,EXTANNOT,MAP,NC,NR,OFF
ICIAL_GENE_NAME,OFFICIAL_SYMBOL
PHENOTYPE,PREFERRED_GENE_NAME, PREFERRED_PRODUCT, PREFERRED_SYMBOL, PRODUCT

In the best scenario I would like to be able to obtain all of the
information availabe form the LL_tmpl file From locus link meaning all of
the fields.  How do I access the fields I want after the parser has done its
work? 
Thanks,
Annie.

			 ACCNUM
		       ALIAS_PROT
		       ALIAS_SYMBOL
		       ASSEMBLY
		       BUTTON
		       CDD
		       CHR
		       COMP
		       CONTIG
		       CURRENT_LOCUSID
		       DB_DESCR
		       DB_LINK
		       ECNUM
		       EVID
		       EXTANNOT
		       GO
		       GRIF
		       LINK
		       LOCUSID
		       LOCUS_CONFIRMED
		       LOCUS_TYPE
		       MAP
		       MAPLINK
		       NC
		       NG
		       NM
		       NP
		       NR
		       OFFICIAL_GENE_NAME
		       OFFICIAL_SYMBOL
		       OMIM
		       ORGANISM
		       PHENOTYPE
		       PHENOTYPE_ID
		       PMID
		       PREFERRED_GENE_NAME
		       PREFERRED_PRODUCT
		       PREFERRED_SYMBOL
		       PRODUCT
		       PROT
		       RELL
		       STATUS
		       STS
		       SUMFUNC
		       SUMMARY
		       TRANSVAR
		       TYPE
		       UNIGENE
		       XG
		       XM
		       XP
		       XR


use Bio::SeqIO;
use strict;

my $io = Bio::SeqIO->new(-file => '/var/lib/mysql/LL_tmpl', -format =>
"locuslink");

while (my $seq_obj=$io->next_seq()){
my $anno_collection = $seq_obj->annotation;

foreach my $key ($anno_collection->get_all_annotation_keys){
  my @annotations = $anno_collection->get_Annotations($key);
  foreach my $value (@annotations){
    print "tagname: ", $value->tagname, "\n";		
    # $value is an Bio::Annotation, and has an "as_text" method
    print " annotation value: ", $value->as_text, "\n"; 	

  }
}
}#cycling through all of the sequences.





More information about the Bioperl-l mailing list