lacklab/MuSTARRd
(Analysis of Saturation) Mu(tagenesis) STARR(seq) d(ata)
Overview
Topics: bioinformatics sequencing starrseq ngs snakemake
Latest release: None, Last update: 2023-02-15
Linting: linting: failed, Formatting:formatting: passed
Deployment
Step 1: Install Snakemake and Snakedeploy
Snakemake and Snakedeploy are best installed via the Mamba package manager (a drop-in replacement for conda). If you have neither Conda nor Mamba, it is recommended to install Miniforge. More details regarding Mamba can be found here.
When using Mamba, run
mamba create -c conda-forge -c bioconda --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
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/lacklab/MuSTARRd . --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 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
.
In order to configure your analysis, make changes to config.yaml
.
-
SAMPLES
: A tab-separated file with the following example should be provided to specify the samples:
sample | condition | type |
---|---|---|
ETOH.R1 | EtOH | RNA |
ETOH.R2 | EtOH | RNA |
ETOH.R3 | EtOH | RNA |
DHT.R1 | DHT | RNA |
DHT.R2 | DHT | RNA |
DHT.R3 | DHT | RNA |
INPUT | DNA |
sample: Sample name
condition: Treatment condition (blank if none; blank for DNA)
type: Sample type (RNA or DNA)
-
UNITS
: A tab-separated file with the following example should be provided to specify the units (replicates or lanes):
sample | unit | fq1 | fq2 |
---|---|---|---|
ETOH.R1 | 1 | reads/EM_LNCaP_R1_EtOH_L1_1.fq.gz | reads/EM_LNCaP_R1_EtOH_L1_2.fq.gz |
ETOH.R2 | 1 | reads/EM_LNCaP_R2_EtOH_L1_1.fq.gz | reads/EM_LNCaP_R2_EtOH_L1_2.fq.gz |
ETOH.R3 | 1 | reads/EM_LNCaP_R3_EtOH_L1_1.fq.gz | reads/EM_LNCaP_R3_EtOH_L1_2.fq.gz |
ETOH.R3 | 2 | reads/EM_LNCaP_R3_EtOH_L2_1.fq.gz | reads/EM_LNCaP_R3_EtOH_L2_2.fq.gz |
DHT.R1 | 1 | reads/EM_LNCaP_R1_DHT_L1_1.fq.gz | reads/EM_LNCaP_R1_DHT_L1_2.fq.gz |
DHT.R2 | 1 | reads/EM_LNCaP_R2_DHT_L1_1.fq.gz | reads/EM_LNCaP_R2_DHT_L1_2.fq.gz |
DHT.R3 | 1 | reads/EM_LNCaP_R3_DHT_L1_1.fq.gz | reads/EM_LNCaP_R3_DHT_L1_2.fq.gz |
INPUT | 1 | reads/NL18_L2_1.fq.gz | reads/NL18_L2_2.fq.gz |
sample: Sample name (same as in samples.tsv)
unit: Unit no
fq1: Path to the 1st FASTQ file
fq2: Path to the 2nd FASTQ file
-
PRIMERS
: A tab-separated file with the following specificiations (and example row) should be provided to specify the regions of analysis:
Region name | Forward primer | Reverse primer | Chromosome | Start | End |
---|---|---|---|---|---|
overlapped_read_114 | AGCGCGGCTTAGTGA | TACCAGGAGACTATTTCCAACA | chr8 | 6456903 | 6457213 |
This file shouldn't have a header. The primers should be 5' to 3' and the positions should be BED-like (0-based).
-
REF
-
FA
: Path to the FASTA file of the reference genome -
BWA_IDX
: Path to the BWA index files (prefix) -
FIXED
: Path to the FASTA file matching the wild type plasmids (or the same asFA
)
-
-
SEQ
-
UMI1_LEN
: Length of the 5' UMI -
UMI2_LEN
: Length of the 3' UMI -
EXPECTED_TLEN
: Template (insert) length of the plasmids (excluding UMIs but including primers)
-
Linting and formatting
Linting results
Lints for rule merge_DNA_reads (line 1, /tmp/tmpew7ma_mb/workflow/rules/association.smk):
* Do not access input and output files individually by index in shell commands:
When individual access to input or output files is needed (i.e., just
writing '{input}' is impossible), use names ('{input.somename}') instead
of index based access.
Also see:
https://snakemake.readthedocs.io/en/latest/snakefiles/rules.html#rules
* No log directive defined:
Without a log directive, all output will be printed to the terminal. In
distributed environments, this means that errors are harder to discover.
In local environments, output of concurrent jobs will be mixed and become
unreadable.
Also see:
https://snakemake.readthedocs.io/en/stable/snakefiles/rules.html#log-files
Lints for rule map_DNA_reads (line 32, /tmp/tmpew7ma_mb/workflow/rules/association.smk):
* Do not access input and output files individually by index in shell commands:
When individual access to input or output files is needed (i.e., just
writing '{input}' is impossible), use names ('{input.somename}') instead
of index based access.
... (truncated)
Formatting results
None