Skip to content
Snippets Groups Projects
Commit 9123655f authored by Amandine  PERRIN's avatar Amandine PERRIN
Browse files

Change output filename when QC only

parent d88e6379
No related branches found
No related tags found
No related merge requests found
...@@ -448,7 +448,7 @@ def write_genomes_info(genomes, kept_genomes, list_file, res_path, qc=False): ...@@ -448,7 +448,7 @@ def write_genomes_info(genomes, kept_genomes, list_file, res_path, qc=False):
# if QC, there is no 'discarded genome', just write information on all analyzed genomes # if QC, there is no 'discarded genome', just write information on all analyzed genomes
else: else:
outdisc = os.path.join(res_path, outdisc = os.path.join(res_path,
"info-genomes-" + ".".join(name_lst.split(".")[:-1]) + ".lst") "ALL-GENOMES-info-" + ".".join(name_lst.split(".")[:-1]) + ".lst")
logger.info("Writing information on genomes in {}".format(outdisc)) logger.info("Writing information on genomes in {}".format(outdisc))
with open(outdisc, "w") as outdf: with open(outdisc, "w") as outdf:
outdf.write("\t".join(["orig_name", "to_annotate", "gsize", "nb_conts", "L90"]) + "\n") outdf.write("\t".join(["orig_name", "to_annotate", "gsize", "nb_conts", "L90"]) + "\n")
...@@ -481,7 +481,7 @@ def write_lstinfo(list_file, genomes, outdir): ...@@ -481,7 +481,7 @@ def write_lstinfo(list_file, genomes, outdir):
with open(outlst, "w") as outf: with open(outlst, "w") as outf:
outf.write("\t".join(["gembase_name", "orig_name", "to_annotate", "gsize", outf.write("\t".join(["gembase_name", "orig_name", "to_annotate", "gsize",
"nb_conts", "L90"]) + "\n") "nb_conts", "L90"]) + "\n")
for genome, values in sorted(genomes.items(), key=sort_genomes): for genome, values in sorted(genomes.items(), key=sort_genomes_byname_l90_nbcont):
gembase, _, to_annote, gsize, nbcont, l90 = [str(x) for x in values] gembase, _, to_annote, gsize, nbcont, l90 = [str(x) for x in values]
to_annote_file = os.path.basename(to_annote) to_annote_file = os.path.basename(to_annote)
outf.write("\t".join([gembase, genome, to_annote_file, gsize, nbcont, l90]) + "\n") outf.write("\t".join([gembase, genome, to_annote_file, gsize, nbcont, l90]) + "\n")
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment