Alexandre Masselot
and 1 contributors

NAME

InSilicoSpectro::InSilico::Sequence - Elementary sequence object

SYNOPSIS

use InSilicoSpectro::InSilico::Sequence;

DESCRIPTION

Elementary biological sequence object with AC, ID, description, sequence etc. Aimed to be derived into AASequence or DNASequence, and not used as-is

ATTRIBUTES

sequence
AC
ID
description

METHODS

new([%h|$bpSeq|$Sequence])

Constructor. %h is a hash of attribute=>value pairs, $bpSeq is a BioPerl Bio::seq object, from which the attributes are copied, and $Sequence is InSilicoSpectro::InSilico::Sequence object.

AC([$val])

AC accessor/modifier: sets AC attribute if $val is given, returns the AC attribute.

ID([$val])

ID accessor/modifier: sets ID attribute if $val is given, returns the ID attribute.

description([$val])

description accessor/modifier: sets description attribute if $val is given, returns the description attribute.

sequence([$val])

sequence accessor/modifier: sets sequence attribute if $val is given, returns the sequence attribute.

getLength

Returns the sequence length.

toFasta

Returns a string of the protein sequence in fasta format.

printFasta

Prints the sequence in fasta format.

"" operator

Overloded by calling printFasta to make the object printable.

EXAMPLES

See t/InSilico/testSequence.pl.

AUTHORS

Alexandre Masselot, www.genebio.com

Jacques Colinge, Upper Austria University of Applied Science at Hagenberg