biocore/empress

Option to overwrite existing directory

Offen

#558 geöffnet am 20.05.2022

 (4 Kommentare) (1 Reaktion) (1 zugewiesene Person)JavaScript (32 Forks)auto 404
feature requestgood first issue

Repository-Metriken

Stars
 (56 Sterne)
PR-Merge-Metriken
 (PR-Metriken ausstehend)

Beschreibung

I'd like to use Empress in a Snakemake pipeline (see below) but I'm running into an annoying issue. If my understanding is correct (which it could very well not be), the way Snakemake works is that it sees that the results/empress directory does not exist and thus creates it before the shell command executes. However, when this occurs Empress complains that Output directory already exists!. I think what would be useful is for some sort of --overwrite option to force the creation of the visualization + support files.

In my case, I can work around this by changing some of the filepaths but I think this might be a useful option.

rule empress:
    input:
        tree="results/diversity/metagenomics/phylo_rpca/labeled-phylogeny.nwk",
        feature_md="results/tmp/feature_metadata.tmp.tsv"
    output:
        "results/empress/empress.html"
    shell:
        """
        empress tree-plot \
            --tree {input.tree} \
            --feature-metadata {input.feature_md} \
            --output-dir results/empress
        """

Contributor Guide