gabrielfranco89/fastq_to_ucram

Transform fastq files to ucram to save space and keep all sequencing in a single file

Overview

Latest release: None, Last update: 2026-04-01

Share link: https://snakemake.github.io/snakemake-workflow-catalog?wf=gabrielfranco89/fastq_to_ucram

Quality control: linting: failed formatting: failed

Deployment

Step 1: Install Snakemake and Snakedeploy

Snakemake and Snakedeploy are best installed via the Conda package manager. It is recommended to install conda via Miniforge. Run

conda create -c conda-forge -c bioconda -c nodefaults --name snakemake snakemake snakedeploy

to install both Snakemake and Snakedeploy in an isolated environment. For all following commands ensure that this environment is activated via

conda activate snakemake

For other installation methods, refer to the Snakemake and Snakedeploy documentation.

Step 2: Deploy workflow

With Snakemake and Snakedeploy installed, the workflow can be deployed as follows. First, create an appropriate project working directory on your system and enter it:

mkdir -p path/to/project-workdir
cd path/to/project-workdir

In all following steps, we will assume that you are inside of that directory. Then run

snakedeploy deploy-workflow https://github.com/gabrielfranco89/fastq_to_ucram . --tag None

Snakedeploy will create two folders, workflow and config. The former contains the deployment of the chosen workflow as a Snakemake module, the latter contains configuration files which will be modified in the next step in order to configure the workflow to your needs.

Step 3: Configure workflow

To configure the workflow, adapt config/config.yml to your needs following the instructions below.

Step 4: Run workflow

The deployment method is controlled using the --software-deployment-method (short --sdm) argument.

To run the workflow using apptainer/singularity, use

snakemake --cores all --sdm apptainer

To run the workflow using a combination of conda and apptainer/singularity for software deployment, use

snakemake --cores all --sdm conda apptainer

To run the workflow with automatic deployment of all required software via conda/mamba, use

snakemake --cores all --sdm conda

Snakemake will automatically detect the main Snakefile in the workflow subfolder and execute the workflow module that has been defined by the deployment in step 2.

For further options such as cluster and cloud execution, see the docs.

Step 5: Generate report

After finalizing your data analysis, you can automatically generate an interactive visual HTML report for inspection of results together with parameters and code inside of the browser using

snakemake --report report.zip

Configuration

The following section is imported from the workflow’s config/README.md.

Workflow overview

The workflow is built using snakemake and consists of the following steps:

  1. Create checksums for fastq files

  2. Transform fastq files to unmapped CRAMs (uCRAM)

  3. Decompress uCRAMs back to fastq to check if the reads are the same as original

  4. Report if they match

  5. (Optional) Run a fastqc/multiqc on reads

Running the workflow

Input data

The input files should be listed on config.yaml under samplesheet The sample sheet has the following layout:

| sample | group | | lane | replicate | read1 | read2 | | ——- | ——— | ——- | ——— | ————————– | ————————– | | sample1 | S1 | L001 | 001 | sample1.read1.fastq.gz | sample1.read2.fastq.gz | | sample2 | S1 | L002 | 001 | sample2.read1.fastq.gz | sample2.read2.fastq.gz |

Parameters

This table lists all parameters that can be used to run the workflow.

parameter

type

details

default

samplesheet

path

str

path to samplesheet, mandatory

“config/samples.tsv”

get_genome

outdir

str

path to where it should be write the results, mandatory

Workflow parameters

The following table is automatically parsed from the workflow’s config.schema.y(a)ml file.

Parameter

Type

Description

Required

Default

samplesheet

string

path to sample-sheet TSV file

yes

Linting and formatting

Linting results
 1Lints for snakefile /tmp/tmpi6gv7hxh/workflow/rules/process_reads.smk:
 2    * Mixed rules and functions in same snakefile.:
 3      Small one-liner functions used only once should be defined as lambda
 4      expressions. Other functions should be collected in a common module, e.g.
 5      'rules/common.smk'. This makes the workflow steps more readable.
 6      Also see:
 7      https://snakemake.readthedocs.io/en/latest/snakefiles/modularization.html#includes
 8
 9Lints for rule merge_split_fastq (line 6, /tmp/tmpi6gv7hxh/workflow/rules/process_reads.smk):
10    * Specify a conda environment or container for each rule.:
11      This way, the used software for each specific step is documented, and the
12      workflow can be executed on any machine without prerequisites.
13      Also see:
14      https://snakemake.readthedocs.io/en/latest/snakefiles/deployment.html#integrated-package-management
15      https://snakemake.readthedocs.io/en/latest/snakefiles/deployment.html#running-jobs-in-containers
16
17Lints for rule create_tsv_merged_fastq (line 30, /tmp/tmpi6gv7hxh/workflow/rules/process_reads.smk):
18    * No log directive defined:
19      Without a log directive, all output will be printed to the terminal. In
20      distributed environments, this means that errors are harder to discover.
21      In local environments, output of concurrent jobs will be mixed and become
22      unreadable.
23      Also see:
24      https://snakemake.readthedocs.io/en/stable/snakefiles/rules.html#log-files
25    * Specify a conda environment or container for each rule.:
26      This way, the used software for each specific step is documented, and the
27      workflow can be executed on any machine without prerequisites.
28      Also see:
29      https://snakemake.readthedocs.io/en/latest/snakefiles/deployment.html#integrated-package-management
30      https://snakemake.readthedocs.io/en/latest/snakefiles/deployment.html#running-jobs-in-containers
31
32Lints for rule multiqc (line 32, /tmp/tmpi6gv7hxh/workflow/rules/qc.smk):
33    * Param outdir is a prefix of input or output file but hardcoded:
34      If this is meant to represent a file path prefix, it will fail when
35      running workflow in environments without a shared filesystem. Instead,
36      provide a function that infers the appropriate prefix from the input or
37      output file, e.g.: lambda w, input: os.path.splitext(input[0])[0]
38      Also see:
39      https://snakemake.readthedocs.io/en/stable/snakefiles/rules.html#non-file-parameters-for-rules
40      https://snakemake.readthedocs.io/en/stable/tutorial/advanced.html#tutorial-input-functions
Formatting results
 1[DEBUG] 
 2[DEBUG] In file "/tmp/tmpi6gv7hxh/workflow/rules/qc.smk":  Formatted content is different from original
 3[DEBUG] 
 4[DEBUG] In file "/tmp/tmpi6gv7hxh/workflow/Snakefile":  Formatted content is different from original
 5[DEBUG] 
 6[DEBUG] In file "/tmp/tmpi6gv7hxh/workflow/rules/process_reads.smk":  Formatted content is different from original
 7[DEBUG] 
 8[DEBUG] In file "/tmp/tmpi6gv7hxh/workflow/rules/common.smk":  Formatted content is different from original
 9[INFO] 4 file(s) would be changed 😬
10
11snakefmt version: 0.11.5