Skip to content

Commit b982a89

Browse files
committed
Merge remote-tracking branch 'origin/feat_nftemplate' into docker
2 parents dab67aa + dfce469 commit b982a89

18 files changed

+572
-483
lines changed

bin/freec_paired.pl bin/make_freec_genome_paired.pl

+6-5
Original file line numberDiff line numberDiff line change
@@ -26,18 +26,19 @@
2626
print C "chrFiles = $chrFiles\n";
2727
print C "minimalSubclonePresence = 20\nmaxThreads = 8\n";
2828
print C "outputDir = $ARGV[0]\n\n";
29-
29+
3030
print C '[sample]' . "\n\n";
31-
31+
3232
print C "mateFile = $tumormateFile\n";
3333
print C "inputFormat = BAM\nmateOrientation = FR\n\n";
3434

35-
print C '[BAF]' . "\n\n";
35+
print C '[control]' . "\n\n";
3636

3737
print C "mateFile = $controlmateFile\n";
3838
print C "inputFormat = BAM\nmateOrientation = FR\n\n";
39-
39+
40+
print C '[BAF]' . "\n\n";
4041
print C "makePileup = $makePileup\n";
4142
print C "fastaFile = $fastaFile\n";
4243
print C "minimalCoveragePerPosition = 20\nminimalQualityPerPosition = 20\n";
43-
print C "SNPfile = $SNPfile";
44+
print C "SNPfile = $SNPfile";

conf/base.config

+16
Original file line numberDiff line numberDiff line change
@@ -51,11 +51,27 @@ process {
5151
withLabel:process_high_memory {
5252
memory = { check_max( 200.GB * task.attempt, 'memory' ) }
5353
}
54+
withLabel:process_somaticcaller {
55+
cpus = { check_max( 4 * task.attempt, 'cpus' ) }
56+
memory = { check_max( 64.GB * task.attempt, 'memory' ) }
57+
time = { check_max( 72.h * task.attempt, 'time' ) }
58+
}
59+
withLabel:process_somaticcaller_high {
60+
cpus = { check_max( 16 * task.attempt, 'cpus' ) }
61+
memory = { check_max( 70.GB * task.attempt, 'memory' ) }
62+
time = { check_max( 48.h * task.attempt, 'time' ) }
63+
}
64+
withLabel:process_highmem {
65+
cpus = { check_max( 4 * task.attempt, 'cpus' ) }
66+
memory = { check_max( 48.GB * task.attempt, 'memory' ) }
67+
time = { check_max( 72.h * task.attempt, 'time' ) }
68+
}
5469
withLabel:error_ignore {
5570
errorStrategy = 'ignore'
5671
}
5772
withLabel:error_retry {
5873
errorStrategy = 'retry'
5974
maxRetries = 2
6075
}
76+
6177
}

conf/biowulf.config

+2-2
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ singularity {
2222
autoMounts = true
2323
cacheDir = "/data/CCBR_Pipeliner/SIFS"
2424
envWhitelist = 'https_proxy,http_proxy,ftp_proxy,DISPLAY,SLURM_JOBID,SINGULARITY_BINDPATH'
25-
runOptions = '-B /gs10,/gs11,/gs12,/gs9,/spin1,/data/CCBR_Pipeliner/,/data/CCBR_Pipeliner/Pipelines/XAVIER/resources/,/data/nousomedr/,/data/CCBR/projects/,/vf/users,/gpfs,/fdb'
25+
runOptions = '-B /gs10,/gs11,/gs12,/gs9,/spin1,/data/CCBR_Pipeliner/,/data/CCBR/projects/,/vf/users,/gpfs,/fdb'
2626
}
2727

2828
env.SINGULARITY_CACHEDIR = "/data/CCBR_Pipeliner/SIFS"
@@ -34,4 +34,4 @@ process {
3434
stageOutMode = 'rsync'
3535
// for running pipeline on group sharing data directory, this can avoid inconsistent files timestamps
3636
cache = 'lenient'
37-
}
37+
}

conf/containers.config

+4-1
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,9 @@
22
params {
33
containers {
44
base = 'nciccbr/ccbr_ubuntu_base_20.04:v6.1'
5-
logan = 'docker://dnousome/ccbr_logan_base:v0.3.0'
5+
logan = 'docker://dnousome/ccbr_logan_base:v0.3.3'
6+
vcf2maf = 'docker://dnousome/ccbr_vcf2maf:v102.0.0'
7+
octopus = 'docker://dancooke/octopus:latest'
8+
69
}
710
}

conf/genomes.config

+7-10
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,11 @@
11
params {
22
genomes {
33
'hg38' {
4-
genome = "/data/CCBR_Pipeliner/CCBR_Pipeliner_Legacy/Exome-seek/hg38/bwamem2/Homo_sapiens_assembly38.fasta"
5-
genomefai = "/data/CCBR_Pipeliner/CCBR_Pipeliner_Legacy/Exome-seek/hg38/bwamem2/Homo_sapiens_assembly38.fasta.fai"
4+
genome = "/data/CCBR_Pipeliner/CCBR_Pipeliner_Legacy/Exome-seek/hg38/bwamem2/Homo_sapiens_assembly38.fasta"
5+
genomefai = "/data/CCBR_Pipeliner/CCBR_Pipeliner_Legacy/Exome-seek/hg38/bwamem2/Homo_sapiens_assembly38.fasta.fai"
66
bwagenome= "/data/CCBR_Pipeliner/CCBR_Pipeliner_Legacy/Exome-seek/hg38/genome/Homo_sapiens_assembly38.fasta"
77
genomedict= "/data/CCBR_Pipeliner/CCBR_Pipeliner_Legacy/Exome-seek/hg38/genome/Homo_sapiens_assembly38.dict"
8-
wgsregion = "/data/nousomedr/annotation/resources_broad_hg38_v0_wgs_calling_regions.hg38.interval_list"
8+
wgsregion = "/data/CCBR_Pipeliner/Pipelines/LOGAN/resources/hg38/resources_broad_hg38_v0_wgs_calling_regions.hg38.interval_list"
99
intervals= "${projectDir}/assets/hg38_v0_wgs_calling_regions.hg38.bed"
1010
//millsindel = "/data/CCBR_Pipeliner/CCBR_Pipeliner_Legacy/Exome-seek/hg38/GATK_resource_bundle/Mills_and_1000G_gold_standard.indels.hg38.vcf.gz" //Mills_and_1000G_gold_standard.indels.hg38.vcf.gz"
1111
//shapeitindel = "/data/CCBR_Pipeliner/CCBR_Pipeliner_Legacy/Exome-seek/hg38/GATK_resource_bundle/ALL.wgs.1000G_phase3.GRCh38.ncbi_remapper.20150424.shapeit2_indels.vcf.gz" //ALL.wgs.1000G_phase3.GRCh38.ncbi_remapper.20150424.shapeit2_indels.vcf.gz" //file(params.gold_indels2) //
@@ -14,7 +14,7 @@ params {
1414
dbsnp = "/data/CCBR_Pipeliner/CCBR_Pipeliner_Legacy/Exome-seek/hg38/GATK_resource_bundle/dbsnp_138.hg38.vcf.gz"
1515
dbsnp_indel = "/data/CCBR_Pipeliner/CCBR_Pipeliner_Legacy/Exome-seek/hg38/GATK_resource_bundle/dbsnp_indel.vcf"
1616
gnomad = '--germline-resource /data/CCBR_Pipeliner/CCBR_Pipeliner_Legacy/Exome-seek/hg38/GNOMAD/somatic-hg38-af-only-gnomad.hg38.vcf.gz' // /data/CCBR_Pipeliner/CCBR_Pipeliner_Legacy/Exome-seek/hg38/GNOMAD/somatic-hg38-af-only-gnomad.hg38.vcf.gz
17-
pon = "/data/nousomedr/wgs/updatedpon.vcf.gz" //pon="/data/CCBR_Pipeliner/CCBR_Pipeliner_Legacy/Exome-seek/hg38/PON/hg38.noCOSMIC_ClinVar.pon.vcf.gz" //file{params.pon}
17+
pon = "/data/CCBR_Pipeliner/Pipelines/LOGAN/resources/hg38/PON/updatedpon.vcf.gz" //pon="/data/CCBR_Pipeliner/CCBR_Pipeliner_Legacy/Exome-seek/hg38/PON/hg38.noCOSMIC_ClinVar.pon.vcf.gz" //file{params.pon}
1818
kgp = "/data/CCBR_Pipeliner/CCBR_Pipeliner_Legacy/Exome-seek/hg38/GATK_resource_bundle/1000G_phase1.snps.high_confidence.hg38.vcf.gz"
1919
KRAKENBACDB = "/data/CCBR_Pipeliner/CCBR_Pipeliner_Legacy/Exome-seek/hg38/kraken/20180907_standard_kraken2"
2020
snpeff_genome = "GRCh38.86"
@@ -29,11 +29,11 @@ params {
2929
octopus_gforest= "--forest /data/CCBR_Pipeliner/Pipelines/LOGAN/resources/hg38/octopus/germline.v0.7.4.forest"
3030
SEQUENZAGC = "/data/CCBR_Pipeliner/Pipelines/XAVIER/resources/hg38/SEQUENZA/hg38_gc50Base.txt.gz"
3131
chromosomes = ['chr1','chr2','chr3','chr4','chr5','chr6','chr7','chr8','chr9','chr10','chr11','chr12','chr13','chr14','chr15','chr16','chr17','chr18','chr19','chr20','chr21','chr22','chrX','chrY','chrM']
32-
}
32+
}
3333

3434
'mm10' {
35-
genome = "/data/CCBR_Pipeliner/Pipelines/XAVIER/resources/mm10/genome/bwamem2index/genome.fa" // file(params.genome)
36-
genomefai = "/data/CCBR_Pipeliner/Pipelines/XAVIER/resources/mm10/genome/bwamem2index/genome.fa.fai" // file(params.genome)
35+
genome = "/data/CCBR_Pipeliner/Pipelines/XAVIER/resources/mm10/genome/bwamem2index/genome.fa" // file(params.genome)
36+
genomefai = "/data/CCBR_Pipeliner/Pipelines/XAVIER/resources/mm10/genome/bwamem2index/genome.fa.fai" // file(params.genome)
3737
bwagenome= "/data/CCBR_Pipeliner/Pipelines/XAVIER/resources/mm10/genome/bwaindex/genome.fa"
3838
genomedict= "/data/CCBR_Pipeliner/Pipelines/XAVIER/resources/mm10/genome/bwamem2index/genome.dict"
3939
intervals="/data/CCBR_Pipeliner/Pipelines/XAVIER/resources/mm10/genome/bwamem2index/mm10_wgsregions.bed"
@@ -66,6 +66,3 @@ params {
6666
}
6767
}
6868
}
69-
70-
71-

conf/interactive.config

+4-2
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ params {
44
max_cpus = 56
55
max_time = '12 h'
66

7-
7+
88
}
99
process.scratch = false
1010

@@ -14,4 +14,6 @@ singularity {
1414
autoMounts = true
1515
cacheDir = "/data/CCBR_Pipeliner/SIFS"
1616
envWhitelist='https_proxy,http_proxy,ftp_proxy,DISPLAY,SLURM_JOBID,SINGULARITY_BINDPATH'
17-
}
17+
}
18+
19+
env.SINGULARITY_CACHEDIR = "/data/CCBR_Pipeliner/SIFS"

conf/modules.config

+6-10
Original file line numberDiff line numberDiff line change
@@ -9,27 +9,22 @@ process {
99
errorStrategy = 'finish'
1010

1111
withName:'sequenza' {
12-
container = 'dnousome/ccbr_logan_base:v0.3.0'
1312
publishDir = [
1413
path: { "${params.outdir}/cnv/sequenza" },
1514
mode: 'copy'
1615
]
1716
}
1817

19-
2018
withName: 'freec_paired' {
2119
publishDir = [
22-
path: { "${params.outdir}/cnv/freec" },
20+
path: { "${params.outdir}/cnv/freec_paired" },
2321
mode: 'copy'
2422
]
25-
container = 'dnousome/ccbr_logan_base:v0.3.0'
26-
2723
}
2824

29-
withName:'freec' {
30-
container = 'dnousome/ccbr_logan_base:v0.3.0'
25+
withName: 'freec' {
3126
publishDir = [
32-
path: { "${params.outdir}/cnv/freec" },
27+
path: { "${params.outdir}/cnv/freec_unpaired" },
3328
mode: 'copy'
3429
]
3530
}
@@ -192,7 +187,7 @@ process {
192187
mode: 'copy'
193188
]
194189
}
195-
190+
196191
withName: 'annotsv_tn' {
197192
publishDir = [
198193
path: { "${params.outdir}/SV/annotated" },
@@ -291,5 +286,6 @@ process {
291286
path: { "${params.outdir}/vcfs/combined" },
292287
mode: 'copy'
293288
]
294-
}
289+
}
290+
295291
}

main.nf

+27-31
Original file line numberDiff line numberDiff line change
@@ -5,14 +5,12 @@ date = new Date().format( 'yyyyMMdd' )
55

66

77
log.info """\
8-
L O G A N P I P E L I N E
8+
L O G A N P I P E L I N E
99
=============================
1010
genome: ${params.genome}
1111
outdir: ${params.outdir}
1212
Sample Sheet: ${params.sample_sheet}
13-
Samples: ${params.fastq_input} ${params.file_input} ${params.bam_input}
14-
NF version : $nextflow.version
15-
13+
Samples: ${params.fastq_input} ${params.fastq_file_input} ${params.bam_input} ${params.bam_file_input}
1614
"""
1715
.stripIndent()
1816

@@ -40,8 +38,7 @@ workflow.onComplete {
4038

4139
//Final Workflow
4240
workflow {
43-
DETERMINEBAM()
44-
if ([params.fastq_input,params.file_input].any() && params.sample_sheet && !params.BAMINPUT){
41+
if ([params.fastq_input,params.fastq_file_input].any() && params.sample_sheet){
4542
println "Tumor-Normal FASTQ"
4643
INPUT()
4744
ALIGN(INPUT.out.fastqinput,INPUT.out.sample_sheet)
@@ -52,10 +49,10 @@ workflow {
5249
//Tumor-Normal VC, SV, CNV
5350
if (params.vc){
5451
VC(ALIGN.out.bamwithsample,ALIGN.out.splitout,ALIGN.out.sample_sheet)
55-
}
52+
}
5653
if (params.sv){
5754
SV(ALIGN.out.bamwithsample)
58-
}
55+
}
5956
if (params.cnv){
6057
if (params.genome == "mm10"){
6158
CNVmouse(ALIGN.out.bamwithsample)
@@ -67,41 +64,41 @@ workflow {
6764
CNVhuman(ALIGN.out.bamwithsample,VC.out.somaticcall_input)
6865
}
6966
}
70-
}
67+
}
7168
if (params.qc && params.gl){
7269
QC_GL(ALIGN.out.fastqin,ALIGN.out.fastpout,ALIGN.out.bqsrout,GL.out.glnexusout,GL.out.bcfout)
7370
} else if (params.qc){
7471
QC_NOGL(ALIGN.out.fastqin,ALIGN.out.fastpout,ALIGN.out.bqsrout)
75-
}
72+
}
7673

7774
}
78-
75+
7976
//TUMOR-NOMRAL BAM INPUT
80-
if ([params.bam_input,params.file_input].any() && params.sample_sheet && BAMINPUT){
77+
if ([params.bam_input,params.bam_file_input].any() && params.sample_sheet){
8178
println "Tumor-Normal with BAMs"
8279
INPUT_BAM()
8380
if (params.vc){
8481
VC(INPUT_BAM.out.bamwithsample,INPUT_BAM.out.splitout,INPUT_BAM.out.sample_sheet)
85-
}
82+
}
8683
if (params.sv){
8784
SV(INPUT_BAM.out.bamwithsample)
88-
}
85+
}
8986
if (params.cnv){
9087
if (params.genome == "mm10"){
9188
CNVmouse(INPUT_BAM.out.bamwithsample)
9289
} else if (params.genome== "hg38"){
9390
if (!params.vc){
9491
VC(INPUT_BAM.out.bamwithsample,INPUT_BAM.out.splitout,INPUT_BAM.out.sample_sheet)
9592
CNVhuman(INPUT_BAM.out.bamwithsample,VC.out.somaticcall_input)
96-
}else {
93+
}else {
9794
CNVhuman(INPUT_BAM.out.bamwithsample,VC.out.somaticcall_input)
9895
}
9996
}
10097
}
101-
}
102-
98+
}
99+
103100
///Tumor Only Pipelines
104-
if ([params.fastq_input,params.file_input].any() && !params.sample_sheet && !params.BAMINPUT){
101+
if ([params.fastq_input,params.file_input].any() && !params.sample_sheet){
105102
println "Tumor-Only FASTQ"
106103
INPUT_TONLY()
107104
ALIGN_TONLY(INPUT_TONLY.out.fastqinput,INPUT_TONLY.out.sample_sheet)
@@ -118,7 +115,7 @@ workflow {
118115
if (!params.vc){
119116
VC_TONLY(ALIGN_TONLY.out.bamwithsample,ALIGN_TONLY.out.splitout,ALIGN_TONLY.out.sample_sheet)
120117
CNVhuman_tonly(ALIGN_TONLY.out.bamwithsample,VC_TONLY.out.somaticcall_input)
121-
} else{
118+
} else {
122119
CNVhuman_tonly(ALIGN_TONLY.out.bamwithsample,VC_TONLY.out.somaticcall_input)
123120
}
124121
}
@@ -129,28 +126,27 @@ workflow {
129126
}
130127

131128
//Variant Calling from BAM-Tumor Only Mode
132-
if ([params.bam_input,params.file_input].any() && !params.sample_sheet && params.BAMINPUT){
129+
if ([params.bam_input,params.bam_file_input].any() && !params.sample_sheet){
133130
println "Tumor-Only BAM"
134131
INPUT_TONLY_BAM()
135132
if (params.vc){
136133
VC_TONLY(INPUT_TONLY_BAM.out.bamwithsample,INPUT_TONLY_BAM.out.splitout,INPUT_TONLY_BAM.out.sample_sheet)
137134
}
138135
if (params.sv){
139136
SV_TONLY(INPUT_TONLY_BAM.out.bamwithsample)
140-
}
137+
}
141138
if (params.cnv){
142139
if (params.genome == "mm10"){
143140
CNVmouse_tonly(INPUT_TONLY_BAM.out.bamwithsample)
144141
} else if (params.genome== "hg38"){
145-
VC_TONLY(INPUT_TONLY_BAM.out.bamwithsample,INPUT_TONLY_BAM.out.splitout,INPUT_TONLY_BAM.out.sample_sheet)
146-
CNVhuman_tonly(INPUT_TONLY_BAM.out.bamwithsample,VC_TONLY.out.somaticcall_input)
147-
}
148-
}
149-
150-
}
142+
if (!params.vc){
143+
VC_TONLY(INPUT_TONLY_BAM.out.bamwithsample,INPUT_TONLY_BAM.out.splitout,INPUT_TONLY_BAM.out.sample_sheet)
144+
CNVhuman_tonly(INPUT_TONLY_BAM.out.bamwithsample,VC_TONLY.out.somaticcall_input)
145+
} else {
146+
CNVhuman_tonly(INPUT_TONLY_BAM.out.bamwithsample,VC_TONLY.out.somaticcall_input)
147+
}
151148

149+
}
150+
}
151+
}
152152
}
153-
154-
155-
156-

0 commit comments

Comments
 (0)