When I was originally inputting a custom aligned file and custom tree file, I was getting the errors below:
Traceback (most recent call last):
File "/space/s1/ayeshamahfuz/MSA_score/gotcha_test/gotcha.py", line 1953, in
seq_quality_filters()
File "/space/s1/ayeshamahfuz/MSA_score/gotcha_test/gotcha.py", line 591, in seq_quality_filters
os.rename('tmp.aln', 'tmptmp.aln')
FileNotFoundError: [Errno 2] No such file or directory: 'tmp.aln' -> 'tmptmp.aln'
Traceback (most recent call last):
File "/space/s1/ayeshamahfuz/MSA_score/gotcha_test/gotcha.py", line 1992, in
def_tre_file, def_aln_file = tree_inverence()
^^^^^^^^^^^^^^^^
File "/space/s1/ayeshamahfuz/MSA_score/gotcha_test/gotcha.py", line 893, in tree_inverence
os.rename('tmp.partitions.treefile' , def_tre_file)
FileNotFoundError: [Errno 2] No such file or directory: 'tmp.partitions.treefile' -> 'CO1_cluster2_MSAtree_probes.nwk'
In order to subvert these errors, I added the lines below in the gotcha.py file (starting at line 245):
os.makedirs(args.out + "/tmp")
if (args.custom_aln != ""):
shutil.copy(args.custom_aln, args.out + "/tmp")
shutil.copy(args.custom_nwk, args.out + "/tmp")
os.chdir(args.out + "/tmp")
However, now I am getting another error regarding the tree file, shown below:
File "/space/s1/ayeshamahfuz/MSA_score/gotcha_test/gotcha.py", line 1993, in
bait_finder()
File "/space/s1/ayeshamahfuz/MSA_score/gotcha_test/gotcha.py", line 1053, in bait_finder
t=Tree("nodes.phylo.txt",1)
^^^^^^^^^^^^^^^^^^^^^^^^^
File "/home/ayeshamahfuz/miniforge3/envs/gotcha_env/lib/python3.12/site-packages/ete3/coretype/tree.py", line 212, in init
read_newick(newick, root_node = self, format=format,
File "/home/ayeshamahfuz/miniforge3/envs/gotcha_env/lib/python3.12/site-packages/ete3/parser/newick.py", line 264, in read_newick
raise NewickError('Unexisting tree file or Malformed newick tree structure.')
ete3.parser.newick.NewickError: Unexisting tree file or Malformed newick tree structure.
You may want to check other newick loading flags like 'format' or 'quoted_node_names'.
I believe this error is occurring because of how the tree_inverence function is written. Starting at line 1006, the code is trying to construct the relevant tree files (brlen.phylo.txt and nodes.phylo.txt) using the rst file in the tmp directory. However, the rst file doesn't include any actual information about the tree except for the file where it is written. I have included an image of my rat file below for clarity. Furthermore, the for loop doesn't seem like it is properly reading the information from a tree file in order to construct brlen.phylo.txt and nodes.phylo.txt. Thus, when nodes.phylo.txt is called in bait_finder (line 1050), the program errors as this file is empty.

When I was originally inputting a custom aligned file and custom tree file, I was getting the errors below:
Traceback (most recent call last):
File "/space/s1/ayeshamahfuz/MSA_score/gotcha_test/gotcha.py", line 1953, in
seq_quality_filters()
File "/space/s1/ayeshamahfuz/MSA_score/gotcha_test/gotcha.py", line 591, in seq_quality_filters
os.rename('tmp.aln', 'tmptmp.aln')
FileNotFoundError: [Errno 2] No such file or directory: 'tmp.aln' -> 'tmptmp.aln'
Traceback (most recent call last):
File "/space/s1/ayeshamahfuz/MSA_score/gotcha_test/gotcha.py", line 1992, in
def_tre_file, def_aln_file = tree_inverence()
^^^^^^^^^^^^^^^^
File "/space/s1/ayeshamahfuz/MSA_score/gotcha_test/gotcha.py", line 893, in tree_inverence
os.rename('tmp.partitions.treefile' , def_tre_file)
FileNotFoundError: [Errno 2] No such file or directory: 'tmp.partitions.treefile' -> 'CO1_cluster2_MSAtree_probes.nwk'
In order to subvert these errors, I added the lines below in the gotcha.py file (starting at line 245):
However, now I am getting another error regarding the tree file, shown below:
File "/space/s1/ayeshamahfuz/MSA_score/gotcha_test/gotcha.py", line 1993, in
bait_finder()
File "/space/s1/ayeshamahfuz/MSA_score/gotcha_test/gotcha.py", line 1053, in bait_finder
t=Tree("nodes.phylo.txt",1)
^^^^^^^^^^^^^^^^^^^^^^^^^
File "/home/ayeshamahfuz/miniforge3/envs/gotcha_env/lib/python3.12/site-packages/ete3/coretype/tree.py", line 212, in init
read_newick(newick, root_node = self, format=format,
File "/home/ayeshamahfuz/miniforge3/envs/gotcha_env/lib/python3.12/site-packages/ete3/parser/newick.py", line 264, in read_newick
raise NewickError('Unexisting tree file or Malformed newick tree structure.')
ete3.parser.newick.NewickError: Unexisting tree file or Malformed newick tree structure.
You may want to check other newick loading flags like 'format' or 'quoted_node_names'.
I believe this error is occurring because of how the tree_inverence function is written. Starting at line 1006, the code is trying to construct the relevant tree files (brlen.phylo.txt and nodes.phylo.txt) using the rst file in the tmp directory. However, the rst file doesn't include any actual information about the tree except for the file where it is written. I have included an image of my rat file below for clarity. Furthermore, the for loop doesn't seem like it is properly reading the information from a tree file in order to construct brlen.phylo.txt and nodes.phylo.txt. Thus, when nodes.phylo.txt is called in bait_finder (line 1050), the program errors as this file is empty.
