mindsponge.common.get_aligned_seq

View Source On Gitee
mindsponge.common.get_aligned_seq(gt_seq, pr_seq)[source]

Align two protein fasta sequence. Return two aligned sequences and the position of same residues.

Parameters
  • gt_seq (str) – one protein fasta sequence, such as "ABAAABAA".

  • pr_seq (str) – another protein fasta sequence, such as "A-AABBBA".

Returns

  • target(str), one protein fasta sequence.

  • align_relationship(str), the differences of the two sequences.

  • query(str), another protein fasta sequence.

Supported Platforms:

Ascend GPU

Examples

>>> from mindsponge.common import get_aligned_seq
>>> gt_seq = "ABAAABAA"
>>> pr_seq = "AAABBBA"
>>> aligned_gt_seq, aligned_info, aligned_pr_seq = get_aligned_seq(gt_seq, pr_seq)
>>> print(aligned_gt_seq)
ABAAABAA
>>> print(aligned_info)
|-||.|.|
>>> print(aligned_pr_seq)
A-AABBBA