Skip to content

Commit

Permalink
v1.0.4
Browse files Browse the repository at this point in the history
Characters "|" and "@" are not allowed in query ids
  • Loading branch information
GDKO committed Apr 3, 2024
1 parent 2a284a3 commit 359f233
Show file tree
Hide file tree
Showing 5 changed files with 11 additions and 4 deletions.
4 changes: 4 additions & 0 deletions aux_scripts/calculate_ai.py
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,8 @@ def main():
egp_taxid.add(2787823)
egp_taxid.add(2787854)

forbidden_chars = ["|", "@"]

#Setting up NCBI Taxonomy
ncbi = NCBITaxa()
number_of_lost_taxids = 0
Expand All @@ -64,6 +66,8 @@ def main():
skip += 1
else:
gene = elements[0]
if any(char in gene for char in forbidden_chars):
sys.exit("[x] Query Ids should not contain | or @ characters")
list_genes.append(gene)
hit = elements[1]
iden = elements[2]
Expand Down
2 changes: 1 addition & 1 deletion avp
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
#!/usr/bin/env python3
#v1.0.3
#v1.0.4

from depot.interface import main

Expand Down
1 change: 0 additions & 1 deletion depot/evaluate.py
Original file line number Diff line number Diff line change
Expand Up @@ -126,7 +126,6 @@ def main():
con = open(con_path,'w')

FNULL = open(os.devnull, 'w')
all_trees_path = os.path.join(out_path,gene + ".trees")

if fastml:
# Constaint file for FastTree
Expand Down
2 changes: 1 addition & 1 deletion depot/interface.py
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@
from docopt import docopt

def main():
args = docopt(__doc__,version='1.0.3', options_first=True)
args = docopt(__doc__,version='1.0.4', options_first=True)
if args['<module>'] == 'prepare':
import depot.prepare as prepare
prepare.main()
Expand Down
6 changes: 5 additions & 1 deletion depot/prepare.py
Original file line number Diff line number Diff line change
Expand Up @@ -113,6 +113,8 @@ def main():
selection = selection.replace("ahs","float(row[i_ahs])>"+str(ahs_cutoff))
selection = selection.replace("outg_pct","float(row[i_pct])>"+str(pct_cutoff))

forbidden_chars = ["|", "@"]

if trim:
check_programs("trimal")
trim_folder = os.path.join(output_dir,"trim")
Expand All @@ -127,7 +129,7 @@ def main():
elif data_type == "DNA":
dbtype = "nucl"
else:
sys.exit("data_type should be either AA or DNA")
sys.exit("[x] data_type should be either AA or DNA")

#Setting up NCBI Taxonomy
ncbi = NCBITaxa()
Expand Down Expand Up @@ -185,6 +187,8 @@ def main():
if('#' not in line):
L_hitqline = line.rstrip('\n').split('\t')
query_id = L_hitqline[0]
if any(char in query_id for char in forbidden_chars):
sys.exit("[x] Query Ids should not contain | or @ characters")
if query_id in queries_info.keys(): # Queries that pass the initial selection
if(len(query_dict_set[query_id]) <= queries_info[query_id]["pos"]):
query_hit_id = L_hitqline[1]
Expand Down

0 comments on commit 359f233

Please sign in to comment.