trviz.motif_aligner

Module Contents

Classes

MotifAligner

class trviz.motif_aligner.MotifAligner
align(sample_ids: List[str], encoded_vntrs: List[str], vid: str = None, score_matrix: Dict[Dict, int] = None, output_dir: str = './', tool: str = 'mafft') Tuple[List, List]

Align encoded VNTRs using multiple sequence alignment tools. Default tool is MAFFT.

Parameters
  • sample_ids – sample ids

  • encoded_vntrs – encoded tandem repeats

  • tool – the tool name for multiple sequence alignment (options: MAFFT (default))

  • score_matrix – defines the score matrix between all pair of motifs

  • output_dir – base directory for output file

  • vid – ID for the tandem repeat

_get_motif_aligner(tool)
static _align_motifs_with_muscle(sample_ids, labeled_vntrs, vid, score_matrix, output_dir)
static _align_motifs_with_clustalo(sample_ids, labeled_vntrs, vid, score_matrix, output_dir)
static _align_motifs_with_mafft(sample_ids, labeled_vntrs, vid, score_matrix, output_dir, preserve_order=True)
static load_aligned_trs(aln_output)

Loads aligned VNTRs from a file.

aln_outputstr

Path to the file containing aligned VNTRs.

alinged_sample_idslist

List of sample IDs.

aligned_vntrslist

List of aligned VNTRs.