InSilicoSpectro-Databanks
view release on metacpan or search on metacpan
lib/InSilicoSpectro/Databanks/DBEntry.pm view on Meta::CPAN
use strict;
package InSilicoSpectro::Databanks::DBEntry;
require Exporter;
use Carp;
=head1 NAME
InSilico::Databanks::DBEntry - fasta databank entry + header's annotated info
=head1 SYNOPSIS
=head1 DESCRIPTION
describes an databnk entry (header + sequence)
=head1 FUNCTIONS
=head1 METHODS
=head3 my $dbe=InSilico::Databanks::DBEntry->new([\%h]);
=head2 Accessors/Setters
=head3 $dbe->AC([val])
get/set accession code
=head3 $dbe->ID([val])
get/set accession ID
=head3 $dbe->dbName([val])
[GS]et databank name
=head3 $dbe->taxoID([val])
[GS]et taxonomy if (typically NCBI taxid
=head3 $dbe->description([val])
=head3 $dbe->sequence([val])
Get/Set AC, ID, ...
=head3 $dbe->seqType(["AA"|"DNA"])
Get or set the sequence type
=head3 $dbe->annotatedModRes(string|[[pos1, mod1], [pos2, mod2]]);
get or set annotated PTM from a string (e.g. (1|ACET_nterm)(2|ACET_nterm)(185|PHOS)) or an array. All previously set TPM are removed
=head3 $dbe->add_annotatedModRes(pos, modkey)
add an annotated PTM
=head3 $dbe->clear_annotatedModRes()
remove all annotated modres
=head3 $dbe->variants(string|[[pos1, seq1a, seq1b], [pos2, seq2a, seq2b]]);
get or set variant a string (e.g. ("(9|F|Y)(30|D|N)(41|A|G)(43|Q|R)") or an array. All previously set TPM are removed
=head3 $dbe->add_variant(pos, seqa, seqb)
add a VARIANT, replacing seqa by seqb (often just one aminoacid) at pos
=head3 $dbe->clear_variants()
remove all Variants
=head2 I/O
=head3 $dbe->readFasta($fastacontent);
read info from fasta contents (fitrs line with '>' and info + remaining is sequence.
=head3 $dbe->printFasta();
print the entry under fasta format (use SelectSaver or whatever select method to redirect towards a file descriptor);
=head3 $dbe->printHtml();
Print the entry under a html format.
=head1 EXAMPLES
=head1 SEE ALSO
=head1 COPYRIGHT
Copyright (C) 2004-2005 Geneva Bioinformatics www.genebio.com
This library is free software; you can redistribute it and/or
modify it under the terms of the GNU Lesser General Public
License as published by the Free Software Foundation; either
version 2.1 of the License, or (at your option) any later version.
This library is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
Lesser General Public License for more details.
You should have received a copy of the GNU Lesser General Public
License along with this library; if not, write to the Free Software
Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
=head1 AUTHORS
( run in 0.534 second using v1.01-cache-2.11-cpan-e1769b4cff6 )