roblanf / MixtureModelHMM

Post-processes the output of phylogenetic mixture models using HMMs
GNU General Public License v2.0
0 stars 1 forks source link

make a function to output a partition file #7

Closed roblanf closed 2 years ago

roblanf commented 2 years ago

An IQ-TREE partition file looks like this:

#nexus
begin sets;
    charset part1 = 1-100;
    charset part2 = 101-384;
    charpartition mine = HKY+G:part1, GTR+I+G:part2;
end;

Let's imagine we have 3 classes, and each gets repeated a few times. In this case, we could output a file like:

#nexus
begin sets;
    charset class_1 = 1-100 300-400 600-1000;
    charset class_2 = 101-299 401-599 1001-1100;
end;

I.e. each class gets its own line and all sites that belong to that class are grouped together. The separator is just a space.