[Bioperl-l] ID line parsing in swiss.pm
Allen Day
allenday@ucla.edu
Thu, 7 Feb 2002 15:51:39 -0800 (PST)
There is some ID tag parsing in Bio::Tools::SwissProtParser that you can
use. It should merged into swiss.pm, but I haven't done it yet.
-Allen
> Hi,
>
> The STANDARD/PRELIMINARY tag in SWISS-PROT (ID line) entries does not seem
> to be parsed by swiss.pm. This is quite useful to know if the entry is a
> SWISS-PROT or and sptrembl entry.
> This could be stored in the annotation object, something called like
> entry_tag.
>
>
>
> $line =~ /^ID\s+([^\s_]+)(_([^\s_]+))?\s+([^\s;]+);\s+([^\s;]+);/
> || $self->throw("swissprot stream with no ID. Not swissprot in my
> book");
> if( $3 ) {
> $name = "$1$2";
> $seq->division($3);
> } else {
> $name = $1;
> $seq->division('UNK');
> }
>
> ##################
> #Get here the entry tag
> $seq->annotation->add_Annotation('entry_tag',$4);
> ##################
>
> $seq->primary_id($1);
> $seq->alphabet('protein');
> # this is important to have the id for display in e.g. FTHelper,
> otherwise
> # you won't know which entry caused an error
> $seq->display_id($name);
>
>
> Any comments?
>
> Emmanuel
>
>
> -----------------------------------------------------
> Emmanuel Mongin mongin@ebi.ac.uk
> Tel: +44 (0)1223 49 46 87
> Mobile: +44 (0)7813 32 12 82
> -----------------------------------------------------
>
> _______________________________________________
> Bioperl-l mailing list
> Bioperl-l@bioperl.org
> http://bioperl.org/mailman/listinfo/bioperl-l
>