Skip to content

Commit

Permalink
Merge remote-tracking branch 'origin/feat_nftemplate' into docker
Browse files Browse the repository at this point in the history
  • Loading branch information
dnousome committed Jan 12, 2024
2 parents dab67aa + dfce469 commit b982a89
Show file tree
Hide file tree
Showing 18 changed files with 572 additions and 483 deletions.
11 changes: 6 additions & 5 deletions bin/freec_paired.pl → bin/make_freec_genome_paired.pl
Original file line number Diff line number Diff line change
Expand Up @@ -26,18 +26,19 @@
print C "chrFiles = $chrFiles\n";
print C "minimalSubclonePresence = 20\nmaxThreads = 8\n";
print C "outputDir = $ARGV[0]\n\n";

print C '[sample]' . "\n\n";

print C "mateFile = $tumormateFile\n";
print C "inputFormat = BAM\nmateOrientation = FR\n\n";

print C '[BAF]' . "\n\n";
print C '[control]' . "\n\n";

print C "mateFile = $controlmateFile\n";
print C "inputFormat = BAM\nmateOrientation = FR\n\n";


print C '[BAF]' . "\n\n";
print C "makePileup = $makePileup\n";
print C "fastaFile = $fastaFile\n";
print C "minimalCoveragePerPosition = 20\nminimalQualityPerPosition = 20\n";
print C "SNPfile = $SNPfile";
print C "SNPfile = $SNPfile";
16 changes: 16 additions & 0 deletions conf/base.config
Original file line number Diff line number Diff line change
Expand Up @@ -51,11 +51,27 @@ process {
withLabel:process_high_memory {
memory = { check_max( 200.GB * task.attempt, 'memory' ) }
}
withLabel:process_somaticcaller {
cpus = { check_max( 4 * task.attempt, 'cpus' ) }
memory = { check_max( 64.GB * task.attempt, 'memory' ) }
time = { check_max( 72.h * task.attempt, 'time' ) }
}
withLabel:process_somaticcaller_high {
cpus = { check_max( 16 * task.attempt, 'cpus' ) }
memory = { check_max( 70.GB * task.attempt, 'memory' ) }
time = { check_max( 48.h * task.attempt, 'time' ) }
}
withLabel:process_highmem {
cpus = { check_max( 4 * task.attempt, 'cpus' ) }
memory = { check_max( 48.GB * task.attempt, 'memory' ) }
time = { check_max( 72.h * task.attempt, 'time' ) }
}
withLabel:error_ignore {
errorStrategy = 'ignore'
}
withLabel:error_retry {
errorStrategy = 'retry'
maxRetries = 2
}

}
4 changes: 2 additions & 2 deletions conf/biowulf.config
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ singularity {
autoMounts = true
cacheDir = "/data/CCBR_Pipeliner/SIFS"
envWhitelist = 'https_proxy,http_proxy,ftp_proxy,DISPLAY,SLURM_JOBID,SINGULARITY_BINDPATH'
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'
runOptions = '-B /gs10,/gs11,/gs12,/gs9,/spin1,/data/CCBR_Pipeliner/,/data/CCBR/projects/,/vf/users,/gpfs,/fdb'
}

env.SINGULARITY_CACHEDIR = "/data/CCBR_Pipeliner/SIFS"
Expand All @@ -34,4 +34,4 @@ process {
stageOutMode = 'rsync'
// for running pipeline on group sharing data directory, this can avoid inconsistent files timestamps
cache = 'lenient'
}
}
5 changes: 4 additions & 1 deletion conf/containers.config
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,9 @@
params {
containers {
base = 'nciccbr/ccbr_ubuntu_base_20.04:v6.1'
logan = 'docker://dnousome/ccbr_logan_base:v0.3.0'
logan = 'docker://dnousome/ccbr_logan_base:v0.3.3'
vcf2maf = 'docker://dnousome/ccbr_vcf2maf:v102.0.0'
octopus = 'docker://dancooke/octopus:latest'

}
}
17 changes: 7 additions & 10 deletions conf/genomes.config
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
params {
genomes {
'hg38' {
genome = "/data/CCBR_Pipeliner/CCBR_Pipeliner_Legacy/Exome-seek/hg38/bwamem2/Homo_sapiens_assembly38.fasta"
genomefai = "/data/CCBR_Pipeliner/CCBR_Pipeliner_Legacy/Exome-seek/hg38/bwamem2/Homo_sapiens_assembly38.fasta.fai"
genome = "/data/CCBR_Pipeliner/CCBR_Pipeliner_Legacy/Exome-seek/hg38/bwamem2/Homo_sapiens_assembly38.fasta"
genomefai = "/data/CCBR_Pipeliner/CCBR_Pipeliner_Legacy/Exome-seek/hg38/bwamem2/Homo_sapiens_assembly38.fasta.fai"
bwagenome= "/data/CCBR_Pipeliner/CCBR_Pipeliner_Legacy/Exome-seek/hg38/genome/Homo_sapiens_assembly38.fasta"
genomedict= "/data/CCBR_Pipeliner/CCBR_Pipeliner_Legacy/Exome-seek/hg38/genome/Homo_sapiens_assembly38.dict"
wgsregion = "/data/nousomedr/annotation/resources_broad_hg38_v0_wgs_calling_regions.hg38.interval_list"
wgsregion = "/data/CCBR_Pipeliner/Pipelines/LOGAN/resources/hg38/resources_broad_hg38_v0_wgs_calling_regions.hg38.interval_list"
intervals= "${projectDir}/assets/hg38_v0_wgs_calling_regions.hg38.bed"
//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"
//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) //
Expand All @@ -14,7 +14,7 @@ params {
dbsnp = "/data/CCBR_Pipeliner/CCBR_Pipeliner_Legacy/Exome-seek/hg38/GATK_resource_bundle/dbsnp_138.hg38.vcf.gz"
dbsnp_indel = "/data/CCBR_Pipeliner/CCBR_Pipeliner_Legacy/Exome-seek/hg38/GATK_resource_bundle/dbsnp_indel.vcf"
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
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}
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}
kgp = "/data/CCBR_Pipeliner/CCBR_Pipeliner_Legacy/Exome-seek/hg38/GATK_resource_bundle/1000G_phase1.snps.high_confidence.hg38.vcf.gz"
KRAKENBACDB = "/data/CCBR_Pipeliner/CCBR_Pipeliner_Legacy/Exome-seek/hg38/kraken/20180907_standard_kraken2"
snpeff_genome = "GRCh38.86"
Expand All @@ -29,11 +29,11 @@ params {
octopus_gforest= "--forest /data/CCBR_Pipeliner/Pipelines/LOGAN/resources/hg38/octopus/germline.v0.7.4.forest"
SEQUENZAGC = "/data/CCBR_Pipeliner/Pipelines/XAVIER/resources/hg38/SEQUENZA/hg38_gc50Base.txt.gz"
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']
}
}

'mm10' {
genome = "/data/CCBR_Pipeliner/Pipelines/XAVIER/resources/mm10/genome/bwamem2index/genome.fa" // file(params.genome)
genomefai = "/data/CCBR_Pipeliner/Pipelines/XAVIER/resources/mm10/genome/bwamem2index/genome.fa.fai" // file(params.genome)
genome = "/data/CCBR_Pipeliner/Pipelines/XAVIER/resources/mm10/genome/bwamem2index/genome.fa" // file(params.genome)
genomefai = "/data/CCBR_Pipeliner/Pipelines/XAVIER/resources/mm10/genome/bwamem2index/genome.fa.fai" // file(params.genome)
bwagenome= "/data/CCBR_Pipeliner/Pipelines/XAVIER/resources/mm10/genome/bwaindex/genome.fa"
genomedict= "/data/CCBR_Pipeliner/Pipelines/XAVIER/resources/mm10/genome/bwamem2index/genome.dict"
intervals="/data/CCBR_Pipeliner/Pipelines/XAVIER/resources/mm10/genome/bwamem2index/mm10_wgsregions.bed"
Expand Down Expand Up @@ -66,6 +66,3 @@ params {
}
}
}



6 changes: 4 additions & 2 deletions conf/interactive.config
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ params {
max_cpus = 56
max_time = '12 h'


}
process.scratch = false

Expand All @@ -14,4 +14,6 @@ singularity {
autoMounts = true
cacheDir = "/data/CCBR_Pipeliner/SIFS"
envWhitelist='https_proxy,http_proxy,ftp_proxy,DISPLAY,SLURM_JOBID,SINGULARITY_BINDPATH'
}
}

env.SINGULARITY_CACHEDIR = "/data/CCBR_Pipeliner/SIFS"
16 changes: 6 additions & 10 deletions conf/modules.config
Original file line number Diff line number Diff line change
Expand Up @@ -9,27 +9,22 @@ process {
errorStrategy = 'finish'

withName:'sequenza' {
container = 'dnousome/ccbr_logan_base:v0.3.0'
publishDir = [
path: { "${params.outdir}/cnv/sequenza" },
mode: 'copy'
]
}


withName: 'freec_paired' {
publishDir = [
path: { "${params.outdir}/cnv/freec" },
path: { "${params.outdir}/cnv/freec_paired" },
mode: 'copy'
]
container = 'dnousome/ccbr_logan_base:v0.3.0'

}

withName:'freec' {
container = 'dnousome/ccbr_logan_base:v0.3.0'
withName: 'freec' {
publishDir = [
path: { "${params.outdir}/cnv/freec" },
path: { "${params.outdir}/cnv/freec_unpaired" },
mode: 'copy'
]
}
Expand Down Expand Up @@ -192,7 +187,7 @@ process {
mode: 'copy'
]
}

withName: 'annotsv_tn' {
publishDir = [
path: { "${params.outdir}/SV/annotated" },
Expand Down Expand Up @@ -291,5 +286,6 @@ process {
path: { "${params.outdir}/vcfs/combined" },
mode: 'copy'
]
}
}

}
58 changes: 27 additions & 31 deletions main.nf
Original file line number Diff line number Diff line change
Expand Up @@ -5,14 +5,12 @@ date = new Date().format( 'yyyyMMdd' )


log.info """\
L O G A N P I P E L I N E
L O G A N P I P E L I N E
=============================
genome: ${params.genome}
outdir: ${params.outdir}
Sample Sheet: ${params.sample_sheet}
Samples: ${params.fastq_input} ${params.file_input} ${params.bam_input}
NF version : $nextflow.version
Samples: ${params.fastq_input} ${params.fastq_file_input} ${params.bam_input} ${params.bam_file_input}
"""
.stripIndent()

Expand Down Expand Up @@ -40,8 +38,7 @@ workflow.onComplete {

//Final Workflow
workflow {
DETERMINEBAM()
if ([params.fastq_input,params.file_input].any() && params.sample_sheet && !params.BAMINPUT){
if ([params.fastq_input,params.fastq_file_input].any() && params.sample_sheet){
println "Tumor-Normal FASTQ"
INPUT()
ALIGN(INPUT.out.fastqinput,INPUT.out.sample_sheet)
Expand All @@ -52,10 +49,10 @@ workflow {
//Tumor-Normal VC, SV, CNV
if (params.vc){
VC(ALIGN.out.bamwithsample,ALIGN.out.splitout,ALIGN.out.sample_sheet)
}
}
if (params.sv){
SV(ALIGN.out.bamwithsample)
}
}
if (params.cnv){
if (params.genome == "mm10"){
CNVmouse(ALIGN.out.bamwithsample)
Expand All @@ -67,41 +64,41 @@ workflow {
CNVhuman(ALIGN.out.bamwithsample,VC.out.somaticcall_input)
}
}
}
}
if (params.qc && params.gl){
QC_GL(ALIGN.out.fastqin,ALIGN.out.fastpout,ALIGN.out.bqsrout,GL.out.glnexusout,GL.out.bcfout)
} else if (params.qc){
QC_NOGL(ALIGN.out.fastqin,ALIGN.out.fastpout,ALIGN.out.bqsrout)
}
}

}

//TUMOR-NOMRAL BAM INPUT
if ([params.bam_input,params.file_input].any() && params.sample_sheet && BAMINPUT){
if ([params.bam_input,params.bam_file_input].any() && params.sample_sheet){
println "Tumor-Normal with BAMs"
INPUT_BAM()
if (params.vc){
VC(INPUT_BAM.out.bamwithsample,INPUT_BAM.out.splitout,INPUT_BAM.out.sample_sheet)
}
}
if (params.sv){
SV(INPUT_BAM.out.bamwithsample)
}
}
if (params.cnv){
if (params.genome == "mm10"){
CNVmouse(INPUT_BAM.out.bamwithsample)
} else if (params.genome== "hg38"){
if (!params.vc){
VC(INPUT_BAM.out.bamwithsample,INPUT_BAM.out.splitout,INPUT_BAM.out.sample_sheet)
CNVhuman(INPUT_BAM.out.bamwithsample,VC.out.somaticcall_input)
}else {
}else {
CNVhuman(INPUT_BAM.out.bamwithsample,VC.out.somaticcall_input)
}
}
}
}
}

///Tumor Only Pipelines
if ([params.fastq_input,params.file_input].any() && !params.sample_sheet && !params.BAMINPUT){
if ([params.fastq_input,params.file_input].any() && !params.sample_sheet){
println "Tumor-Only FASTQ"
INPUT_TONLY()
ALIGN_TONLY(INPUT_TONLY.out.fastqinput,INPUT_TONLY.out.sample_sheet)
Expand All @@ -118,7 +115,7 @@ workflow {
if (!params.vc){
VC_TONLY(ALIGN_TONLY.out.bamwithsample,ALIGN_TONLY.out.splitout,ALIGN_TONLY.out.sample_sheet)
CNVhuman_tonly(ALIGN_TONLY.out.bamwithsample,VC_TONLY.out.somaticcall_input)
} else{
} else {
CNVhuman_tonly(ALIGN_TONLY.out.bamwithsample,VC_TONLY.out.somaticcall_input)
}
}
Expand All @@ -129,28 +126,27 @@ workflow {
}

//Variant Calling from BAM-Tumor Only Mode
if ([params.bam_input,params.file_input].any() && !params.sample_sheet && params.BAMINPUT){
if ([params.bam_input,params.bam_file_input].any() && !params.sample_sheet){
println "Tumor-Only BAM"
INPUT_TONLY_BAM()
if (params.vc){
VC_TONLY(INPUT_TONLY_BAM.out.bamwithsample,INPUT_TONLY_BAM.out.splitout,INPUT_TONLY_BAM.out.sample_sheet)
}
if (params.sv){
SV_TONLY(INPUT_TONLY_BAM.out.bamwithsample)
}
}
if (params.cnv){
if (params.genome == "mm10"){
CNVmouse_tonly(INPUT_TONLY_BAM.out.bamwithsample)
} else if (params.genome== "hg38"){
VC_TONLY(INPUT_TONLY_BAM.out.bamwithsample,INPUT_TONLY_BAM.out.splitout,INPUT_TONLY_BAM.out.sample_sheet)
CNVhuman_tonly(INPUT_TONLY_BAM.out.bamwithsample,VC_TONLY.out.somaticcall_input)
}
}

}
if (!params.vc){
VC_TONLY(INPUT_TONLY_BAM.out.bamwithsample,INPUT_TONLY_BAM.out.splitout,INPUT_TONLY_BAM.out.sample_sheet)
CNVhuman_tonly(INPUT_TONLY_BAM.out.bamwithsample,VC_TONLY.out.somaticcall_input)
} else {
CNVhuman_tonly(INPUT_TONLY_BAM.out.bamwithsample,VC_TONLY.out.somaticcall_input)
}

}
}
}
}




Loading

0 comments on commit b982a89

Please sign in to comment.