Skip to content

Remove requirement to run seabreeze within the repository directory #2

Description

@dr-joe-wirth

The problem

Currently, users are required to place all of their input files into a directory named data within the repository itself. This means that users would need to replace (or move) this directory if a second run was being performed on different inputs. This introduces opportunities for user error and feels kind of clunky. It would significantly improve the user experience if users could run the program in the directory of their choice.

Proposed solution

Although by default, snakemake looks for Snakefile in ./, this is not required. It is possible to run snakemake elsewhere by using following syntax:

snakemake -d ./my/working/directory/ --snakefile path/to/seabreeze/Snakefile --cores 42

Within the Snakefile, you can reference the directory containing the snakefile with variable workflow.basedir and the working directory with the variable workflow.overwrite_workdir. This will allow you to do something like:

query_path = os.path.join(workflow.overwrite_workdir, '02_genomes', '{sample}.fasta')
script = os.path.join(workflow.basedir, 'bin', 'scripts', 'find_reindex_bases.py')

instead of hardcoding it like this

query_path = 'data/02_genomes/{sample}.fasta')
script = 'bin/scripts/find_reindex_bases.py'

This is part of the review at openjournals/joss-reviews#8065

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions