Snakemake pipeline to detect miRNA

public public 1yr ago 0 bookmarks

Snakemake Workflow for miRNA detection

This is a snakemake pipeline to detect miRNA in samples.

Edit the configfile

You will need to edit your config file as described below:

Config Variable Description
SAMPLES name of file containing your samples names, default: samples.tsv
GENOME Path to your genome file
PREFIX Name of the prefix of the genome to align to "mature"
miRNA default is "mature.fa" pulled automatically from mirbase
PAIRED True if your samples are paired, false otherwise

The pipeline takes samples with a suffix 'r_1.fq.gz' and 'r_2.fq.gz' if the samples are paired. Or it takes samples with suffix 'fq.gz' if the samples is single-end reads.

Regardless your samples are paired, single-ended, samples names should be samples.tsv without the suffix.

The pipeline uses by default "mature.fa" from mirbase.

Run the pipeline

snakemake -jn

where n is the number of cores for example for 10 cores use:

snakemake -j10

Use conda

For less froodiness, use conda:

snakemake -jn --use-conda

For example, for 10 cores use:

snakemake -j10 --use-conda

This will pull automatically the same versiosn of tools we used. Conda has to be installed in the system, in addition to snakemake.

Dry Run

For a dry run use:

snakemake -j1 -n

and to print command in dry run use:

snakemake -j1 -n -p

Use Corresponding configfile:

Just update your config file to include all your sample names, edit your interval.list file to include your intervals of interest, your path, etc for example:

snakemake -j1 --configfile config-WES.yaml

or:

snakemake -j1 configfile config-WGS.yaml

Code Snippets

21
22
23
24
25
shell: 
    """
    wget https://mirbase.org/ftp/CURRENT/mature.fa.gz 
    gunzip -c mature.fa.gz > {output}
    """
40
41
42
43
shell: 
   """
   bowtie-build {input.genome} {params.PREFIX}  
   """
57
58
59
60
61
shell:
   """
    mkdir -p fastp
    fastp --in1 {input.r1} --in2 {input.r2} --out1 {output.val1} --out2 {output.val2} -l 50 -h {output.html} -g &> {log}
   """
71
72
73
74
shell: 
  """
  bowtie -x {params.PREFIX} -1 {input[0]} -2 {input[1]} 
  """ 
85
86
87
88
89
shell:
   """
    mkdir -p fastp
    fastp --in1 {input}  --out1 {output.val1} -l 50 -h {output.html} -g &> {log}
   """
 98
 99
100
101
shell:
 """
 bowtie -x {params.PREFIX} {input[0]} 
 """
ShowHide 4 more snippets with no or duplicated tags.

Login to post a comment if you would like to share your experience with this workflow.

Do you know this workflow well? If so, you can request seller status , and start supporting this workflow.

Free

Created: 1yr ago
Updated: 1yr ago
Maitainers: public
URL: https://github.com/SherineAwad/miRNA
Name: mirna
Version: 1
Badge:
workflow icon

Insert copied code into your website to add a link to this workflow.

Other Versions:
Downloaded: 0
Copyright: Public Domain
License: BSD 3-Clause "New" or "Revised" License
  • Future updates

Related Workflows

cellranger-snakemake-gke
snakemake workflow to run cellranger on a given bucket using gke.
A Snakemake workflow for running cellranger on a given bucket using Google Kubernetes Engine. The usage of this workflow ...