Running Snakemake Workflows in Binder for RNA-Seq Analysis

public public 1yr ago 0 bookmarks

To run in binder --

  1. start the binder

  2. at the command line, run

snakemake -j 4 --use-conda
  1. open rnaseq-workflow.Rmd

  2. knit to HTML

Code Snippets

 2
 3
 4
 5
 6
 7
 8
 9
10
args = commandArgs(trailingOnly=TRUE)


output_format = "html_document"
if (length(args)==1) {
  output_format = args[1]
}

rmarkdown::render("rnaseq-workflow.Rmd", output_format=output_format)
R From line 2 of latest/knit-Rmd.R
31
32
shell:
    "./knit-Rmd.R {wildcards.format}_document"
39
40
41
42
shell:
    """
    curl -L {params.download_link} -o {output}
    """
50
51
52
53
shell:
    """
    fastqc {input} --outdir {params.outdir}
    """
58
59
60
61
shell:
    """
    curl -L https://raw.githubusercontent.com/timflutre/trimmomatic/master/adapters/TruSeq2-SE.fa -o {output}
    """
69
70
71
72
shell:
    """
    trimmomatic SE {input.reads} {output} ILLUMINACLIP:{input.adapters}:2:0:15 LEADING:2 TRAILING:2 SLIDINGWINDOW:4:2 MINLEN:25    
    """
80
81
82
83
shell:
    """
    fastqc {input} --outdir {params.outdir}
    """
94
95
96
97
shell:
    """
    multiqc -f {params.raw_dir} {params.trimmed_dir} --filename {output}
    """
102
103
104
105
shell:
    """
    curl -L ftp://ftp.ensembl.org/pub/release-99/fasta/saccharomyces_cerevisiae/cdna/Saccharomyces_cerevisiae.R64-1-1.cdna.all.fa.gz -o {output}
    """
SnakeMake From line 102 of latest/Snakefile
111
112
113
114
shell:
    """
    salmon index --index {output} --transcripts {input} # --type quasi
    """
125
126
127
128
shell:
    """
    salmon quant -i {input.index_dir} --libType A -r {input.reads} -o {params.outdir} --seqBias --gcBias --validateMappings
    """
ShowHide 6 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/ngs-docs/2020-ggg-201b-rnaseq
Name: 2020-ggg-201b-rnaseq
Version: 1
Badge:
workflow icon

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

Downloaded: 0
Copyright: Public Domain
License: None
  • 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 ...