Package biana :: Package BianaObjects :: Module SequenceAlignment' :: Class SequenceAlignment
[hide private]
[frames] | no frames]

Class SequenceAlignment

source code


Object to represent a sequence alignment, multiple or not

Instance Methods [hide private]
 
__init__(self)
x.__init__(...) initializes x; see x.__class__.__doc__ for signature
source code
 
_get_C_align(self) source code
 
_get_aligned_sequence(self, sequence_id) source code
 
_get_sequence_fragments(self, aln_position) source code
 
_get_sequence_fragments_from_ascii(self, ascii_fragments) source code
 
add_sequence_to_position(self, sequence_id, sequence_position, taxID_list=[], sequence_fragments_ascii=None, aligned_sequence=None, complete_sequence=None, crossID=None) source code
 
append_sequence(self, sequence_id, aligned_sequence, taxID_list=[], sim=None, wsim=None, lali=None, crossID=None)
Appends the aligned sequence to the alignment
source code
 
append_sequence_fragments(self, sequence_id, sequence_fragments, complete_sequence, crossID=None) source code
 
clean_empty_sequences(align1, align2) source code
 
concatenate_alignments(self, alignment2)
Concatenate two alginments.
source code
 
concatenate_by_crossID(self, alignment2) source code
 
get_aligned_sequence(self, seq_pos, start_pos=None, end_pos=None) source code
 
get_alignment(self)
Returns the alignment in the following format: A list where each position contains the string corresponding to the sequence in string format
source code
 
get_alignment_length(self) source code
 
get_number_of_sequences(self) source code
 
get_sequence_fragments(self) source code
 
get_sequence_fragments_by_id(self, seq_id) source code
 
get_sequence_fragments_by_pos(self, seq_pos) source code
 
get_sequence_fragments_in_ascii(self, seq_position) source code
 
get_species_ordered_alignment(self, alignment2, method='only_first')
Returns an alignment object where sequence positions have been ordered according to its specie
source code
 
get_subalignment(self, fragments)
"fragments" is a list of tuples with the format (start_position, end_position), with the fragments to select
source code
 
get_subalignment_for_sequence_without_gaps(self, sequenceID)
Returns a new alignment, in the same order, but eliminating all the positions in which sequenceID has a gap
source code
 
print_alignment(self, format='default', fd_out=sys.stdout)
Prints the alignment with the default identifier
source code
 
set_alignment_length(self, length) source code
 
set_number_of_sequences(self, number_of_sequences) source code
 
set_taxIDlist(self, sequenceID, taxIDslist) source code

Inherited from object: __delattr__, __getattribute__, __hash__, __new__, __reduce__, __reduce_ex__, __repr__, __setattr__, __str__

Static Methods [hide private]
 
read_alignment(fd_in, format='default') source code
Properties [hide private]

Inherited from object: __class__

Method Details [hide private]

__init__(self)
(Constructor)

source code 

x.__init__(...) initializes x; see x.__class__.__doc__ for signature

Overrides: object.__init__
(inherited documentation)

concatenate_alignments(self, alignment2)

source code 

Concatenate two alginments. They must have the same number of sequences

get_species_ordered_alignment(self, alignment2, method='only_first')

source code 

Returns an alignment object where sequence positions have been ordered according to its specie

"sequenceMD5_taxID_correspondence" is a dictionary with the correspondences between sequenceIDs and taxonomy

method. Possibilities: "all_combinations", "only_first"