Bio-FASTASequence
view release on metacpan or search on metacpan
lib/Bio/FASTASequence.pm view on Meta::CPAN
REFERENCE_AC is the accession number in the referenced database
=head3 seq2file
$seq->seq2file(FILENAME);
FILENAME is the path of the file where the sequence has to be stored.
=head3 allIndexesOf
my $indexes = $seq->allIndexesOf(EXPR);
returns a reference on an array, which contains all indexes of
EXPR in the sequence
=head3 getSequenceLength
my $length = $seq->getSequenceLength();
returns the length of the sequence
=head3 getDBRefs
my $hashref = $seq->getDBRefs();
returns a hashreference. The hash contains all references
hashref = {'SWISS-PROT' => 'P01815'},
=head3 getFASTA
my $fasta_sequence = $seq->getFASTA();
returns the sequence in FASTA-format
=head2 EXAMPLE
use Bio::FASTASequence;
my $fasta = qq~>sp|P01815|HV2B_HUMAN Ig heavy chain V-II region COR - Homo sapiens (Human).
QVTLRESGPALVKPTQTLTLTCTFSGFSLSSTGMCVGWIRQPPGKGLEWLARIDWDDDKY
YNTSLETRLTISKDTSRNQVVLTMDPVDTATYYCARITVIPAPAGYMDVWGRGTPVTVSS
~;
my $seq = Bio::FASTASequence->new($fasta);
print 'The sequence of '.$seq->getAccessionNr().' is '.$seq->getSequence(),"\n";
print 'This sequence contains '.scalar($seq->allIndexesOf('C').' times Cystein at the following positions:';
print $_+1.', ' for(@{$seq->allIndexesOf('C')});
=head1 ABSTRACT
Bio::FASTASequence is a perl module to parse information out off a Fasta-Sequence.
=head1 ADDITIONAL INFORMATION
=head3 accepted formats
This module can parse the following formats:
=over 4
=item >P02656 APC3_HUMAN Apolipoprotein C-III precursor (Apo-CIII).
=item >IPI:IPI00166553|REFSEQ_XP:XP_290586|ENSEMBL:ENSP00000331094|TREMBL:Q8N3H0 T Hypothetical protein
=item >sp|P01815|HV2B_HUMAN Ig heavy chain V-II region COR - Homo sapiens (Human).
=back
=head3 structure
The structure of the hash for the example is:
$VAR1 = {
'seq_length' => 120,
'accession_nr' => 'P01815',
'text' => 'QVTLRESGPALVKPTQTLTLTCTFSGFSLSSTGMCVGWIRQPPGKGLEWLARIDWDDDKYYNTSLETRLTISKDTSRNQVVLTMDPVDTATYYCARITVIPAPAGYMDVWGRGTPVTVSS',
'crc64' => '158A8B29AE7EEB98',
'dbrefs' => {},
'description' => 'Ig heavy chain V-II region COR - Homo sapiens (Human).'
}
if you miss something please contact me.
=head1 BUGS
There is no bug known. If you experienced any problems, please contact me.
=head1 SEE ALSO
http://modules.renee-baecker.de # not available yet - this site is under construction
the crc64-routine is based on the
SWISS::CRC64
module.
=head1 MODIFICATIONS
More FASTA-Description lines are accepted.
=head1 AUTHOR
Renee Baecker <reneeb@cpan.org>
=head1 COPYRIGHT AND LICENSE
This software is Copyright (c) 2014 by Renee Baecker.
This is free software, licensed under:
The Artistic License 2.0 (GPL Compatible)
=cut
( run in 0.625 second using v1.01-cache-2.11-cpan-cdf2f3d4e48 )