Seperate gene tree files from .treefile #254
-
|
I have made my genetrees in iqtree and the output is a .treefile. The code I had used is - |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment
-
|
@hutumpyancha, this is not really a question about IQ-TREE, but see if this bash code works: TREEFILE="/work/upasanag/iqtree/gene-tree-50p/attempt3/locus-alignment-50p/IQtree-gene-50p3.treefile"
OUTPUT_DIR="/work/upasanag/iqtree/gene-tree-50p/attempt3/locus-alignment-50p/individual_treefiles"
mkdir -p "${OUTPUT_DIR}"
# Read the .treefile and split into individual gene tree files
awk '{print $0 > sprintf("'"${OUTPUT_DIR}"'/gene_%d.r.tree", NR)}' "${TREEFILE}"The last line should make files named to match the line in the input file. E.g. the 7th tree in the input file should appear in a file called |
Beta Was this translation helpful? Give feedback.
@hutumpyancha, this is not really a question about IQ-TREE, but see if this bash code works:
The last line should make files named to match the line in the input file. E.g. the 7th tree in the input file should appear in a file called
gene_7.r.tree