Skip to content

Instantly share code, notes, and snippets.

@llSourcell
Created February 2, 2020 19:23
Show Gist options
  • Select an option

  • Save llSourcell/35f14ed693246966796f5c54344792fa to your computer and use it in GitHub Desktop.

Select an option

Save llSourcell/35f14ed693246966796f5c54344792fa to your computer and use it in GitHub Desktop.
#Step 1 - Import biopython modules for sequence alignment
from Bio import pairwise2
from Bio.Seq import Seq
#Step 2- define multiple sequences
seq1 = Seq("ACCGGT")
seq2 = Seq("ACGT")
#step 3 - align
alignments = pairwise2.align.globalxx(seq1, seq2)
##Step 4 - print MSA
for alignment in alignments:
print(alignment)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment