Repository for the Microbiology Resource Announcements paper on five complete Streptococcus suis genomes

public public 1yr ago 0 bookmarks

Repository for the Microbiology Resource Announcements paper on several closed Streptococcus suis genomes

Introduction

We sequenced 5 Streptococcus suis strains using Nanopore MinION sequencing technology. For these str

Code Snippets

 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
if [ -f $1 ]
then
	echo "Using $1 to get accession numbers"
else
	echo "Cannot access $1. Exiting..."
	exit 1
fi

NCOLS=$(awk '{print NF}' $1 | sort | uniq)

if [[ "$NCOLS" -eq 3 ]]
then
	echo "$1 contains three columns. Continuing..."
else
	echo "Please check if all rows of $1 contain three columns. Exiting..."
	exit 1
fi

echo "Will try to download data for $(($(wc -l $1 | awk '{print $1}') - 1)) samples"

awk 'NR>1 {print $0}' $1 | while read isolate illumina nanopore
do
	fasterq-dump ${illumina} --skip-technical -O raw_illumina
	mv raw_illumina/${illumina}_1.fastq raw_illumina/${isolate}_1.fastq
	mv raw_illumina/${illumina}_2.fastq raw_illumina/${isolate}_2.fastq
	gzip raw_illumina/${isolate}_1.fastq raw_illumina/${isolate}_2.fastq
	fasterq-dump ${nanopore} --skip-technical -O raw_nanopore
	mv raw_nanopore/${nanopore}.fastq raw_nanopore/${isolate}.fastq
	gzip raw_nanopore/${isolate}.fastq
done
2
seqtk comp $1 | awk '{gc += ($4 + $5)} {at += ($3 + $6)} END {print gc/(gc + at)}'
35
36
37
38
shell:
	"""
	bash scripts/download_data.sh {input}
	"""
57
58
59
60
shell:
	"""
	fastp -w {threads} -z {params.compression_level} -i {input.fw} -o {output.fw} -I {input.rv} -O {output.rv} {params.general} --html {output.html} --json {output.json} 2>&1>{log}
	"""
76
77
78
79
shell:
	"""
	filtlong --target_bases {params.target_bases} --illumina_1 {input.fw} --illumina_2 {input.rv} --trim {input.nanopore} | gzip > {output} 2>{log}
	"""
91
92
93
94
95
shell:
	"""
	mkdir -p {output}
	fastqc -t {threads} --outdir {output} {input} 2>&1>{log}
	"""
111
112
113
114
shell:
	"""
	unicycler -1 {input.fw} -2 {input.rv} --long {input.nanopore} -o {params.outdir} --threads {threads}
	"""
125
126
127
128
shell:
	"""
	quast -o {output} {input.assembly}
	"""
139
140
141
142
shell:
	"""
	mlst {input.assembly} 1> {output.mlst} 2>{log}
	"""
157
158
159
160
shell:
	"""
	abricate --db {params.db} --mincov {params.mincov} --minid {params.minid} {input.assembly} 1> {output} 2>{log}
	"""
175
176
177
178
shell:
	"""
	abricate --db {params.db} --mincov {params.mincov} --minid {params.minid} {input.assembly} 1> {output} 2>{log}
	"""
196
197
198
199
200
shell:
	"""
	prokka {params.general} --force --compliant --centre XXX --outdir {output} --genus {params.genus} --species {params.species} --kingdom {params.kingdom} --cpus {threads} --prefix {params.prefix} {input.assembly} 2>&1>{log}
	if [ -f {output}/*.gff ]; then echo "{output} exists"; else exit 1; fi
	"""
216
217
218
219
shell:
	"""
	minimap2 -a -x {params.minimap_x} -t {threads} {input.assembly} {input.fw} {input.rv} | samtools sort -l 0 --threads {threads} | bedtools genomecov -d -ibam stdin | awk '{{t += $3}} END {{print t/NR}}' 1>{output} 2>{log}
	"""
234
235
236
237
shell:
	"""
	minimap2 -a -x {params.minimap_x} -t {threads} {input.assembly} {input.reads} | samtools sort -l 0 --threads {threads} | bedtools genomecov -d -ibam stdin | awk '{{t += $3}} END {{print t/NR}}' 1>{output} 2>{log}
	"""
248
249
250
251
shell:
	"""
	bash scripts/get_gc.sh {input} > {output} 2>{log}
	"""
SnakeMake From line 248 of master/Snakefile
ShowHide 5 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/boasvdp/MRA_Streptococcus_suis
Name: mra_streptococcus_suis
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 ...