Skip to content

Commit

Permalink
ARDaP reworks v1.5 for Nextflow
Browse files Browse the repository at this point in the history
  • Loading branch information
esteinig committed Jul 19, 2019
1 parent 04b588b commit e73b0d0
Show file tree
Hide file tree
Showing 17 changed files with 108,238 additions and 0 deletions.
612 changes: 612 additions & 0 deletions ardap.nf

Large diffs are not rendered by default.

94 changes: 94 additions & 0 deletions card.nf
Original file line number Diff line number Diff line change
@@ -0,0 +1,94 @@
#!/usr/bin/env nextflow

/*
*
* Pipeline ARDaP - CARD support pipeline
* Version 1.4
* Description Download and index CARD DB
* Notes This is a support script for updating indices
* of the CARD DB for ARDaP.
*
*/


//Overwrites data in resources/card/latest, can be changed here or on CLI:

params.outdir = "$baseDir/resources/card/latest"
params.window = 10000

process Download {

executor 'local'
publishDir "${params.outdir}", pattern: "*.txt", mode: "copy"
publishDir "${params.outdir}", pattern: "card.fasta", mode: "copy"


output:
file('date.txt')
file("card.fasta") into (card_bwa, card_sam, card_bed)

shell:

"""
wget https://card.mcmaster.ca/latest/data -O card-data.tar.bz2
tar xvjf card-data.tar.bz2
wget https://card.mcmaster.ca/latest/ontology -O card-ontology.tar.bz2
tar xvjf card-ontology.tar.bz2
mv nucleotide_fasta_protein_homolog_model.fasta card.fasta
date > date.txt
"""

}

process BWAIndex {

label "index"
publishDir "${params.outdir}", mode: "copy"

input:
file(ref) from card_bwa

output:
file("card.*")

"""
bwa index -a is $ref
"""

}

process SAMtoolsIndex {

label "index"
publishDir "${params.outdir}", mode: "copy"

input:
file(ref) from card_sam

output:
file("${ref}.fai") into card_bed_fai

"""
samtools faidx $ref
"""

}

process BEDtoolsIndex {

label "card"
publishDir "${params.outdir}", mode: "copy"

input:
file(ref) from card_bed
file(ref_index) from card_bed_fai

output:
file("${ref.baseName}.bed")
file("${ref.baseName}.coverage.bed")

"""
bedtools makewindows -g $ref_index -w $params.window > ${ref.baseName}.bed && bedtools makewindows -g $ref_index -w 90000000 > ${ref.baseName}.coverage.bed
"""

}
21 changes: 21 additions & 0 deletions configs/gatk.config
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
params {

CLUSTER_SNP = 3
CLUSTER_WINDOW_SNP = 10
MLEAF_SNP = 0.95
QD_SNP = 10.0
MQ_SNP = 30.0
FS_SNP = 60.0
QUAL_SNP = 30.0
LOW_DEPTH = 2
HIGH_DEPTH = 3

MLEAF_INDEL = 0.95
QD_INDEL = 10.0
MQ_INDEL = 30.0
FS_INDEL = 200.0
QUAL_INDEL = 30.0
LOW_DEPTH_INDEL = 2
HIGH_DEPTH_INDEL = 3

}
Empty file added env.yaml
Empty file.
73 changes: 73 additions & 0 deletions nextflow.config
Original file line number Diff line number Diff line change
@@ -0,0 +1,73 @@
params {

fastq = "test/*_{1,2}.fastq.gz"
reference = "test/K96243.fasta"
gwas = true
matrix = true
annotate = true
mixtures = true
phylogeny = false
antibiotic_res = true
strain = "all"
tech = "Illumina"
pairing = "PE"
window = 10000
indel_merge = true
tri_tetra_allelic = false
size = 6000000
snpeff = "Burkholderia_pseudomallei_k96243"
phred = "-phred33"
org = "haploid"
}

includeConfig 'configs/gatk.config'

process {

errorStrategy = "ignore"

conda = "/home/esteinig/miniconda3/envs/ardap"

withLabel: card {
cpus = 1
memory = "4G"
time = "2h"
}

withLabel: index {
cpus = 1
memory = "4G"
time = "2h"
}

withLabel: spandx_default {
cpus = 2
memory = "4G"
time = "2h"
}

withLabel: spandx_alignment {
cpus = 8
memory = "8G"
time = "2h"
}

withLabel: spandx_gatk {
cpus = 8
memory = "8G"
time = "2h"
}

withLabel: spandx_snpeff {
cpus = 4
memory = "4G"
time = "2h"
}

withLabel: spandx_pindel {
cpus = 8
memory = "8G"
time = "2h"
}

}
Binary file not shown.
Binary file not shown.
54 changes: 54 additions & 0 deletions resources/trimmomatic/all_adapters.fa
Original file line number Diff line number Diff line change
@@ -0,0 +1,54 @@
>PrefixNX/1
AGATGTGTATAAGAGACAG
>PrefixNX/2
AGATGTGTATAAGAGACAG
>Trans1
TCGTCGGCAGCGTCAGATGTGTATAAGAGACAG
>Trans1_rc
CTGTCTCTTATACACATCTGACGCTGCCGACGA
>Trans2
GTCTCGTGGGCTCGGAGATGTGTATAAGAGACAG
>Trans2_rc
CTGTCTCTTATACACATCTCCGAGCCCACGAGAC
>PrefixPE/1
AATGATACGGCGACCACCGAGATCTACACTCTTTCCCTACACGACGCTCTTCCGATCT
>PrefixPE/2
CAAGCAGAAGACGGCATACGAGATCGGTCTCGGCATTCCTGCTGAACCGCTCTTCCGATCT
>PCR_Primer1
AATGATACGGCGACCACCGAGATCTACACTCTTTCCCTACACGACGCTCTTCCGATCT
>PCR_Primer1_rc
AGATCGGAAGAGCGTCGTGTAGGGAAAGAGTGTAGATCTCGGTGGTCGCCGTATCATT
>PCR_Primer2
CAAGCAGAAGACGGCATACGAGATCGGTCTCGGCATTCCTGCTGAACCGCTCTTCCGATCT
>PCR_Primer2_rc
AGATCGGAAGAGCGGTTCAGCAGGAATGCCGAGACCGATCTCGTATGCCGTCTTCTGCTTG
>FlowCell1
TTTTTTTTTTAATGATACGGCGACCACCGAGATCTACAC
>FlowCell2
TTTTTTTTTTCAAGCAGAAGACGGCATACGA
>TruSeq2_SE
AGATCGGAAGAGCTCGTATGCCGTCTTCTGCTTG
>TruSeq2_PE_f
AGATCGGAAGAGCGTCGTGTAGGGAAAGAGTGT
>TruSeq2_PE_r
AGATCGGAAGAGCGGTTCAGCAGGAATGCCGAG
>PrefixPE/1
TACACTCTTTCCCTACACGACGCTCTTCCGATCT
>PrefixPE/2
GTGACTGGAGTTCAGACGTGTGCTCTTCCGATCT
>PE1
TACACTCTTTCCCTACACGACGCTCTTCCGATCT
>PE1_rc
AGATCGGAAGAGCGTCGTGTAGGGAAAGAGTGTA
>PE2
GTGACTGGAGTTCAGACGTGTGCTCTTCCGATCT
>PE2_rc
AGATCGGAAGAGCACACGTCTGAACTCCAGTCAC
>PrefixPE/1
TACACTCTTTCCCTACACGACGCTCTTCCGATCT
>PrefixPE/2
GTGACTGGAGTTCAGACGTGTGCTCTTCCGATCT
>TruSeq3_IndexedAdapter
AGATCGGAAGAGCACACGTCTGAACTCCAGTCAC
>TruSeq3_UniversalAdapter
AGATCGGAAGAGCGTCGTGTAGGGAAAGAGTGTA
Loading

0 comments on commit e73b0d0

Please sign in to comment.