Exemple #1
0
def write_partition_file(scheme, alignment_path):
    ''' Write a raxml partitions file to make an ML tree '''
    aln_dir, fname = os.path.split(alignment_path)
    partition_filepath = os.path.join(aln_dir, 'partitions.txt')
    partition_filehandle = open(partition_filepath, 'w')
    sorted_subsets = [sub for sub in scheme]
    sorted_subsets.sort(key=lambda sub: min(sub.columns), reverse=False)
    write_raxml_partitions(scheme, partition_filehandle, sorted_subsets, use_lg = True)
    return(partition_filepath)
Exemple #2
0
def write_partition_file(scheme, alignment_path):
    ''' Write a raxml partitions file to make an ML tree '''
    aln_dir, fname = os.path.split(alignment_path)
    partition_filepath = os.path.join(aln_dir, 'partitions.txt')
    partition_filehandle = open(partition_filepath, 'w')
    sorted_subsets = [sub for sub in scheme]
    sorted_subsets.sort(key=lambda sub: min(sub.columns), reverse=False)
    write_raxml_partitions(scheme,
                           partition_filehandle,
                           sorted_subsets,
                           use_lg=True)
    return (partition_filepath)