Skip to content

Instantly share code, notes, and snippets.

View n8upham's full-sized avatar
🤠

Nate Upham n8upham

🤠
  • Arizona State University
  • Tempe, AZ
View GitHub Profile
@brantfaircloth
brantfaircloth / split_concat_nexus.py
Created June 26, 2012 22:01
Splitting a concatenated nexus file with biopython
from Bio.Nexus import Nexus
aln = Nexus.Nexus()
aln.read('my-properly-formatted-nexus-file.nex')
# assuming your partitions are defined in a charset block like:
#
# begin sets;
# charset bag2 = 1-186;
# charset bag3 = 187-483;