Workflow for MAG construction

public public 1yr ago 0 bookmarks

Workflow for MAG construction

Snakemake arguments

snakemake -p --verbose --keep-remote -j [number of available cores] --kubernetes -s Snakefile --default-remote-provider GS --default-remote-prefix [GCS Bucket] --use-conda --container-image '[Docker image if different than default]'

Examlpe snakemake -p --verbose --keep-remote -j 400 --kubernetes -s Snakefilev11 --default-remote-provider GS --default-remote-prefix hn-snakemake --use-conda --container-image 'gcr.io/tagareby/snakemake'

Building a custom Docker Image on the

You can start from the sample Dockerfile in this repo which just addes procrps which includes the linux tool free required for megahit -m flag when value less than 1

  • Auth docker using gcloud gcloud auth configure-docker

  • Build the local DOckerfile docker build -t [user]/snakemake .

  • Tag the local image docker tag [user]/snakemake gcr.io/[project_name]/snakemake

  • Push the image to the Google Cloud Container Registery docker push gcr.io/[project]/snakemake

Code Snippets

17
shell: "perl scripts/download.pl {params.id} && mv {params.id}*.fastq.gz fastq"
28
shell: "cutadapt -a AGATCGGAAGAGC -A AGATCGGAAGAGC -o {output.R1} -p {output.R2} -O 5 --minimum-length=50 {input.R1} {input.R2}"
40
shell: "megahit --continue --k-list 27,47,67,87 --kmin-1pass -m 12e+10 --presets meta-large --min-contig-len 1000 -t {threads} -1 {input.R1} -2 {input.R2} -o {output.di}"
49
50
51
52
shell:
	'''
	bwa index -p {params.idx} {input}
	'''
64
65
66
67
68
69
70
shell: 
	'''
	bwa mem -t 4 {params.idx} {input.R1} {input.R2} | samtools sort -@4 -m 500M -o {output.bam} -
	samtools index {output.bam}

	samtools flagstat {output.bam} > {output.bam}.flagstat
	'''
ShowHide 1 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/WatsonLab/GoogleMAGs
Name: googlemags
Version: 1
Badge:
workflow icon

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

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