Skip to content

Latest commit

 

History

History
123 lines (85 loc) · 2.9 KB

example.md

File metadata and controls

123 lines (85 loc) · 2.9 KB

nano-wgs rerun instructions

This workflow is run with:

bash nano-wgs.snakejob_rerun_28062026.sh \
    metadata_patients_rerun_28062026.txt \
    /data/cephfs-2/unmirrored/projects/henssen-nanopore \
    Evolution

The arguments are:

metadata_file = metadata_patients_rerun_28062026.txt
workdir       = /data/cephfs-2/unmirrored/projects/henssen-nanopore
project       = Evolution

Input path format

The workflow expects raw FASTQ files to be located under:

{workdir}/{project}/{run}/{subdir}

In the Snakefile, the FASTQ input directories are constructed as:

fastq=lambda wildcards: [
    "{workdir}/{project}/{run}/{subdir}".format(
        workdir=wildcards.workdir,
        project=wildcards.project,
        run=row.Run,
        subdir=NAME_FASTQ_FOLDER
    )
    for index, row in metadata[metadata.Sample == wildcards.sample].iterrows()
]

Therefore, the Run column in the metadata file must contain the path relative to {workdir}/{project}, without the final pass folder.

In this case:

NAME_FASTQ_FOLDER = "pass"

So the full input path is built as:

{workdir}/{project}/{Run}/pass

Example with fastq_guppy634

If the full FASTQ directory is:

/data/cephfs-2/unmirrored/projects/henssen-nanopore/Evolution/RawData/CB1008-2nd-look_01012020/CB1008-2nd-look/CB1008-2nd-look-1/20210421_1245_MN31855_FAP90140_c703d4a8/fastq_guppy634/pass

then the metadata Run value should be:

RawData/CB1008-2nd-look_01012020/CB1008-2nd-look/CB1008-2nd-look-1/20210421_1245_MN31855_FAP90140_c703d4a8/fastq_guppy634

The workflow then adds:

pass

automatically.

Example with fastq

Another valid metadata Run value is:

RawData/CB1008-2nd-look_01012020/CB1008-2nd-look/CB1008-2nd-look-1/20210421_1245_MN31855_FAP90140_c703d4a8/fastq

In that case, the workflow will search in:

/data/cephfs-2/unmirrored/projects/henssen-nanopore/Evolution/RawData/CB1008-2nd-look_01012020/CB1008-2nd-look/CB1008-2nd-look-1/20210421_1245_MN31855_FAP90140_c703d4a8/fastq/pass

Important check before running

Before running the workflow, make sure that the constructed input path exists.

For example:

ls -lh /data/cephfs-2/unmirrored/projects/henssen-nanopore/Evolution/RawData/CB1008-2nd-look_01012020/CB1008-2nd-look/CB1008-2nd-look-1/20210421_1245_MN31855_FAP90140_c703d4a8/fastq_guppy634/pass

The key point is:

Full input path = workdir + project + Run + NAME_FASTQ_FOLDER

For this rerun:

/data/cephfs-2/unmirrored/projects/henssen-nanopore
+ Evolution
+ RawData/.../fastq_guppy634
+ pass

which becomes:

/data/cephfs-2/unmirrored/projects/henssen-nanopore/Evolution/RawData/.../fastq_guppy634/pass

If Snakemake raises a MissingInputException, first check that the Run value in the metadata file is correct and that the final constructed path exists on disk.