Core¶
Problem¶
Solution¶
-
class
pym2sa.core.solution.
MSASolution
(problem, msa: list) → None¶ Bases:
jmetal.core.solution.Solution
Class representing MSA solutions.
-
add_gap_to_sequence_at_index
(seq_index: int, gap_position: int)¶ Add one gap to an specific sequence.
Parameters: - seq_index – Index of the sequence on the alignment.
- gap_position – Index of the gap.
-
decode_alignment_as_list_of_pairs
() → list¶
-
decode_alignment_as_list_of_sequences
() → list¶
-
decode_sequence_at_index
(seq_index: int)¶
-
get_char_position_in_original_sequence
(seq_index: int, position: int)¶
-
get_gap_columns_from_alignment
() → list¶ Get index of gap columns in the alignment.
-
get_length_of_alignment
() → int¶ Get length of the alignment (i.e., length of the first sequence).
-
get_length_of_gaps
(seq_index: int) → int¶
-
get_length_of_sequence
(seq_index: int) → int¶ Get length of an specific sequence.
Parameters: seq_index – Index of the sequence in the alignment.
-
get_next_char_position_after_gap
(seq_index: int, gap_position: int)¶
-
get_number_of_gaps_groups_of_sequence
(seq_index: int) → float¶ Get number of gaps groups of an specific sequence.
-
get_number_of_gaps_of_sequence_at_index
(seq_index: int)¶ Get number of gaps of an specific sequence.
Parameters: seq_index – Index of the sequence in the alignment.
-
get_original_char_position_in_aligned_sequence
(seq_index: int, position: int)¶
-
get_total_number_of_gaps
() → int¶ Get total number of gaps in the alignment.
-
is_gap_char_at_sequence
(seq_index: int, index: int) → bool¶
-
is_gap_column
(column: int) → bool¶ Check if an specific column in the alignment is in all gaps groups (i.e., column consist only of gaps).
Parameters: column – Index of the column in the alignment.
-
is_valid_msa
() → bool¶ Check if all sequences of the alignment have the same length.
-
merge_gaps_groups
() → None¶ Merge consecutive gaps groups in the alignment.
-
remove_full_of_gaps_columns
() → None¶ Remove columns that consist only of gaps.
-
remove_gap_column
(column: int) → None¶
-
remove_gap_from_sequence
(seq_index: int, position: int)¶
-
remove_gap_group_from_sequence_at_column
(seq_index: int, column_index: int) → None¶
-
split_gap_column
(column: int) → None¶
-