Skip to content

Commit

Permalink
Standardize directory structure
Browse files Browse the repository at this point in the history
  • Loading branch information
lczech committed Jul 11, 2024
1 parent 2fee981 commit f66d941
Show file tree
Hide file tree
Showing 99 changed files with 24 additions and 13 deletions.
4 changes: 4 additions & 0 deletions .snakemake-workflow-catalog.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
usage:
software-stack-deployment:
conda: true
report: true
File renamed without changes.
6 changes: 3 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@

![grenepipe logo](/doc/logo/grenepipe.png?raw=true)

Snakemake pipeline for variant calling from raw sample sequences, with lots of bells and whistles.
Snakemake workflow for variant calling from raw sample sequences, with lots of bells and whistles.

**Advantages**:

Expand All @@ -23,8 +23,8 @@ Getting Started
See [**--> the Wiki pages <--**](https://github.com/lczech/grenepipe/wiki) for setup and documentation.

For **questions, bug reports, and feature requests**, please
[open an issue](https://github.com/lczech/grenepipe/issues).
Please do not send emails with questions or requests, as others might be having them as well,
[open an issue](https://github.com/lczech/grenepipe/issues).
Please do not send emails with questions or requests, as others might be having them as well,
and so it is better to discuss them where they can be found.

Pipeline Overview
Expand Down
7 changes: 7 additions & 0 deletions config/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
# Configuring grenepipe

The `config.yaml` contains all settings concerning the data, tools, and their parameters
that are needed for analyzing your data. The file itself contains comments explaining
each setting - see there for details.

Furthermore, for the general usage of grenepipe, see our [wiki](https://github.com/moiexpositoalonsolab/grenepipe/wiki). See there to get started with grenepipe.
File renamed without changes.
2 changes: 1 addition & 1 deletion test/run.sh
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@ cat ./test/samples.tsv | egrep -v "^S3" > ./test/samples-pe.tsv
make_config() {
local TARGET=$1

cp ./config.yaml ${TARGET}
cp ./config/config.yaml ${TARGET}
# cat ./config.yaml | sed "s?#BASEPATH#?${BASEPATH}?g" > ${TARGET}
sed -i.bak -e "s?/path/to/data/samples.tsv?${BASEPATH}/test/samples.tsv?g" ${TARGET}
sed -i.bak -e "s?/path/to/data/genome.fa?${BASEPATH}/test/reference/TAIR10_chr_all.fa?g" ${TARGET}
Expand Down
2 changes: 1 addition & 1 deletion Snakefile → workflow/Snakefile
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@

# We first need to load the common functionality, which gives us access to the config file,
# generates the sample list, and prepares some other things for us that are needed below.
include: "rules/common.smk"
include: "rules/init.smk"

# =================================================================================================
# Default "All" Target Rule
Expand Down
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
2 changes: 1 addition & 1 deletion rules/annotation.smk → workflow/rules/annotation.smk
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,7 @@ rule snpeff:
# annotated calls (vcf, bcf, or vcf.gz)
calls=report(
"annotated/snpeff.vcf.gz",
caption="../reports/vcf.rst",
caption="../report/vcf.rst",
category="Calls"
),

Expand Down
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
2 changes: 1 addition & 1 deletion rules/frequency.smk → workflow/rules/frequency.smk
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ def get_packages_dir():
# https://snakemake.readthedocs.io/en/stable/project_info/faq.html#how-does-snakemake-interpret-relative-paths
# However, neither of them is working... So we use a different way of getting the path
# to our Snakemake base directory: https://stackoverflow.com/a/73202976/4184258
return os.path.join( snakemake.workflow.basedir, "packages" )
return os.path.join( snakemake.workflow.basedir, "../packages" )

def get_hafpipe_bins():
harp_bin = os.path.join( get_packages_dir(), "harp/bin/harp" )
Expand Down
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
2 changes: 1 addition & 1 deletion rules/prep.smk → workflow/rules/prep.smk
Original file line number Diff line number Diff line change
Expand Up @@ -182,7 +182,7 @@ rule reference_seqkit:
# =================================================================================================

# We need the variants entry in the config to be either an empty list or a file path, which we
# already ensure in common.smk. This is because snakemake does not accept empty strings as input
# already ensure in init.smk. This is because snakemake does not accept empty strings as input
# files - it has to be either a file path or an empty list. So here we need to do a bit of trickery
# to allow for the case that no known variants file is given in the config:
# We define a local variable that is always a string. If it is empty, that does not seem to matter
Expand Down
File renamed without changes.
File renamed without changes.
File renamed without changes.
2 changes: 1 addition & 1 deletion rules/qc.smk → workflow/rules/qc.smk
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ rule multiqc:
"damageprofiler/damageprofiler.done" if config["settings"]["damageprofiler"] else []

output:
report("qc/multiqc.html", caption="../reports/multiqc.rst", category="Quality control"),
report("qc/multiqc.html", caption="../report/multiqc.rst", category="Quality control"),
"qc/multiqc.zip",
params:
config["params"]["multiqc"]["extra"],
Expand Down
6 changes: 3 additions & 3 deletions rules/stats.smk → workflow/rules/stats.smk
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ rule vcf_to_tsv:
input:
"annotated/snpeff.vcf.gz"
output:
report("tables/calls.tsv.gz", caption="../reports/calls.rst", category="Calls")
report("tables/calls.tsv.gz", caption="../report/calls.rst", category="Calls")
log:
"logs/vcf_to_tsv.log"
conda:
Expand All @@ -30,8 +30,8 @@ rule plot_stats:
input:
"tables/calls.tsv.gz"
output:
depths=report("plots/depths.svg", caption="../reports/depths.rst", category="Plots"),
freqs=report("plots/allele-freqs.svg", caption="../reports/freqs.rst", category="Plots")
depths=report("plots/depths.svg", caption="../report/depths.rst", category="Plots"),
freqs=report("plots/allele-freqs.svg", caption="../report/freqs.rst", category="Plots")
log:
"logs/plot-depths.log"
conda:
Expand Down
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
2 changes: 1 addition & 1 deletion scripts/hafpipe.py → workflow/scripts/hafpipe.py
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@
# For all these steps, we get the directory where this python script file is in,
# and then work our way up from there through our grenepipe directory.
script_path = os.path.dirname(os.path.realpath(__file__))
packages_path = os.path.join( script_path, "../packages" )
packages_path = os.path.join( script_path, "../../packages" )

harp_path = os.path.join( packages_path, "harp/bin/" )
harp_bin = os.path.join( packages_path, "harp/bin/harp" )
Expand Down
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.

0 comments on commit f66d941

Please sign in to comment.