Commit 6381fb8f authored by Erwan DELAGE's avatar Erwan DELAGE
Browse files

Merge branch 'develop'

parents ad1b7e72 9f09e6ac
Pipeline #23451 failed with stages
in 51 minutes and 41 seconds
......@@ -47,19 +47,18 @@ def initialize_pipeline(arguments):
# Initialize logger
init_logger()
# If no configuration file has been specified via the snakemake command line, use the one specified at the top of this snakefile
global json_config_path
if "--configfile" not in arguments and "--configfiles" not in arguments:
configfile: config_file
json_config_path = ("snakefile", config_file)
else:
try:
try :
json_config_path = ("command line", arguments[arguments.index("--configfile") + 1])
except ValueError:
except ValueError :
json_config_path = ("command line", arguments[arguments.index("--configfiles") + 1])
# Check the configuration file
# Check the configuration file
check_config()
# Check if the MANIFEST file is conform
......@@ -1093,7 +1092,7 @@ if "denoiser" in config["global"]:
qiime taxa barplot --i-table {input[2]} --i-taxonomy {output[0]} --m-metadata-file {input[3]} --o-visualization {output[2]}
qiime tools export --input-path {output[1]} --output-path `dirname {output[3]}`
qiime tools export --input-path {output[2]} --output-path `dirname {output[4]}`
python scripts/format_taxo.py {output[4]}
python scripts/format_taxo.py {output[[5]}
echo "\nTaxonomy.....OK" >> {params.logfile}
"""
......
......@@ -6,8 +6,10 @@ if __name__ == "__main__":
# Load taxo file
TAXONOMY_FILE = sys.argv[1]
taxo = pd.read_csv(TAXONOMY_FILE, sep="\t", index_col=0)
taxo.drop("#q2:types", inplace=True)
try :
taxo.drop("#q2:types", inplace=True)
except KeyError :
pass
# Associate taxorank with corresponding prefix letter
taxo["Domain"] = ""
taxo["Phylum"] = ""
......
......@@ -20,7 +20,11 @@ def plot_prevalence_abundance():
asv_table["Abundance"] = abundance
# Get taxo at pyhlum level
taxo_table.drop("#q2:types", inplace=True)
try :
taxo_table.drop("#q2:types", inplace=True)
except KeyError :
pass
# If classification was perfomred with greengenes, a letter index the taxo rank
if taxo_table.iloc[0, 0].startswith("k__"):
sep = "p__"
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment