Logo Search packages:      
Sourcecode: python-biopython version File versions

def Bio::Align::Generic::Alignment::add_sequence (   self,
  descriptor,
  sequence,
  start = None,
  end = None,
  weight = 1.0 
) [inherited]

Add a sequence to the alignment.

This doesn't do any kind of alignment, it just adds in the sequence
object, which is assumed to be prealigned with the existing
sequences.

Arguments:
o descriptor - The descriptive id of the sequence being added.
o sequence - A string with sequence info.
o start - You can explicitly set the start point of the sequence.
This is useful (at least) for BLAST alignments, which can just
be partial alignments of sequences.
o end - Specify the end of the sequence, which is important
for the same reason as the start.
o weight - The weight to place on the sequence in the alignment.
By default, all sequences have the same weight. (0.0 => no weight,
1.0 => highest weight)

Definition at line 68 of file Generic.py.

                                  :
        """Add a sequence to the alignment.

        This doesn't do any kind of alignment, it just adds in the sequence
        object, which is assumed to be prealigned with the existing
        sequences.

        Arguments:
        o descriptor - The descriptive id of the sequence being added.
        o sequence - A string with sequence info.
        o start - You can explicitly set the start point of the sequence.
        This is useful (at least) for BLAST alignments, which can just
        be partial alignments of sequences.
        o end - Specify the end of the sequence, which is important
        for the same reason as the start.
        o weight - The weight to place on the sequence in the alignment.
        By default, all sequences have the same weight. (0.0 => no weight,
        1.0 => highest weight)
        """
        new_seq = Seq(sequence, self._alphabet)
        new_record = SeqRecord(new_seq, description = descriptor)

        # hack! We really need to work out how to deal with annotations
        # and features in biopython. Right now, I'll just use the
        # generic annotations dictionary we've got to store the start
        # and end, but we should think up something better. I don't know
        # if I'm really a big fan of the LocatableSeq thing they've got
        # in BioPerl, but I'm not positive what the best thing to do on
        # this is...
        if start:
            new_record.annotations['start'] = start
        if end:
            new_record.annotations['end'] = end

        # another hack to add weight information to the sequence
        new_record.annotations['weight'] = weight

        self._records.append(new_record)
    def get_column(self,col):


Generated by  Doxygen 1.6.0   Back to index