Bio::Gonzales::Seq - Gonzales Sequence Object


    my $seq = Bio::Gonzales::Seq->new(id => $id, seq => $seq, desc? => '', delim? => ' ');

    print $seq->def;
    print $seq->desc;




The description of a sequence object. In case of FASTA-files, this corresponds to the text after the first space.


An hash of additional stuff you can store about the sequence


The definition also known as the FASTA header line w/o ">"


Clone the sequence


Clone the sequence properties, do not clone the sequence string.


Same as $seq-id>


The complete sequence in fasta format, ready to be written.


The complete sequence in pretty fasta format, ready to be written.


Return a Bio::PrimarySeqI compatible object, so you can use it in BioPerl.

$seq_string = $seq->gapless_seq

Create the reverse complement of the sequence. THIS FUNCTION ALTERS THE SEQUENCE OBJECT.

$seq->subseq( [ $begin, $end, $strand , @rest ], \%c )

Gets a subseq from $seq. Config options can be:

    %c = (
        keep_id => 1, # keeps the original id of the sequence
        attach_details => 1, # keeps the original range and strand in $seq->info->{subseq}
        wrap => 1, # see further down
        relaxed_range => 1, # substitute 0 or undef for $begin with '^' and for $end with '$'
        relaxed_revcom => 1, # substitute N for all characters that are non-AGCTN before doing a reverse complement

There are several possibilities for $begin and $end:

    ^..........^                                (1,11) OR ('^', 11)
       ^.....................................^  (4,'$')
                          ^..............^      (21,35) { with wrap on: OR (-19,35) OR (-19, -5) }
                          ^..................^  (21,35) { with wrap on: OR (-19,'$') }

The default is to limit all negative values to the sequence boundaries, so a negative begin would be equal to 1 or '^' and a negative end would be equal to '$'.

See also "fasubseq" in Bio::Gonzales::Seq::IO.

my $reverse_complement_string = Bio::Gonzales::Seq::_revcom_from_string($seq_string, $alphabet)

Stolen from Bio::Perl. Alphabet can be 'rna' or 'dna';


jw bargsten, <joachim.bargsten at>