This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#! /usr/bin/env python3 | |
from amas import AMAS | |
from glob import glob | |
# glob all fasta files into a list | |
in_fs = glob('*.fasta') | |
# get a list of alignments in | |
meta_aln = AMAS.MetaAlignment(in_files=in_fs, data_type="dna",in_format="fasta", cores=1) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
library("ape") | |
library("data.table") | |
### SET WORKING DIRECTORY ### | |
setwd("/home/mlb/Dropbox/Misof_et_al_Science/Supplementary_Archive_2/aa_final_alignments/trees") | |
### READ IN TREE FILES ### | |
tree_files <- dir(pattern="*bipartitions.EOG*") |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#! /usr/bin/env python3 | |
with open('miltons-numbers') as f: | |
records = f.readlines() | |
for record in records: | |
if '.' not in record: | |
first, sep, tail = record.partition('-') | |
last, sep2, tail2 = tail.partition(' ') | |
digits = len(last) | |
to_prefix = first[:len(first) - digits] |