Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 5 additions & 5 deletions bin/run_sequenza.R
Original file line number Diff line number Diff line change
Expand Up @@ -48,19 +48,19 @@ CP.example <- sequenza.fit(seqzdata, mc.cores = n_cores)

## Sequenza.extract seems to fail if too few mutations
num_mutations <- unlist(lapply(seqzdata$mutations, nrow))
chrom_list1 <- names(num_mutations)[num_mutations > 3]
chrom_list <- names(num_mutations)[num_mutations > 3]
## Also fails if segments <2
num_segments <- unlist(lapply(seqzdata$segments, nrow))
chrom_list2 <- names(num_mutations)[num_segments > 1]
#num_segments <- unlist(lapply(seqzdata$segments, nrow))
#chrom_list2 <- names(num_mutations)[num_segments > 1]
#chrom_list <- intersect(chrom_list1,chrom_list2)

chrom_list <- intersect(chrom_list1,chrom_list2)
not_included <- setdiff(names(num_mutations), chrom_list)
print("Printing results...")
if (length(not_included) > 0) {
print("Excluding these chromosomes because of too few mutations and/or segments...")
print(not_included)
}
sequenza.results(sequenza.extract = seqzdata,cp.table = CP.example, sample.id = sampleid, out.dir=out_dir, chromosome.list=chrom_list)
sequenza.results(sequenza.extract = seqzdata,cp.table = CP.example, sample.id = sampleid, out.dir=out_dir)

date()
print("Done")
2 changes: 1 addition & 1 deletion conf/base.config
Original file line number Diff line number Diff line change
Expand Up @@ -83,7 +83,7 @@ process {
memory = { check_max( 96.GB * task.attempt, 'memory' ) }
time = { check_max( 72.h * task.attempt, 'time' ) }
}
withName:'qualimap' {
withName:'qualimap_bamqc' {
cpus = { check_max( 8 * task.attempt, 'cpus' ) }
memory = { check_max( 96.GB * task.attempt, 'memory' ) }
time = { check_max( 24.h * task.attempt, 'time' ) }
Expand Down
2 changes: 1 addition & 1 deletion conf/biowulf.config
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@ process {
cpus = { check_max( 4 * task.attempt, 'cpus' ) }
memory = { check_max( 24.GB * task.attempt, 'memory' ) }
time = { check_max( 120.h * task.attempt, 'time' ) }
clusterOptions = ' --gres=lscratch:300 '
clusterOptions = ' --gres=lscratch:500 '
}

}
28 changes: 17 additions & 11 deletions conf/genomes.config
Original file line number Diff line number Diff line change
Expand Up @@ -28,8 +28,9 @@ params {
annotsvgenome = "GRCh38"
octopus_sforest= "--somatic-forest /data/CCBR_Pipeliner/Pipelines/LOGAN/resources/hg38/octopus/somatic.v0.7.4.forest"
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']
SEQUENZAGC = "/data/CCBR_Pipeliner/Pipelines/XAVIER/resources/hg38/SEQUENZA/hg38.gc200Base.wig.gz"
SEQUENZAGC_EXOME = "/data/CCBR_Pipeliner/Pipelines/XAVIER/resources/hg38/SEQUENZA/hg38.gc50Base.wig.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']
//HMFTOOLS
GENOMEVER = "38"
HMFGENOME = "/data/CCBR_Pipeliner/Pipelines/XAVIER/resources/hg38/bwamem2/GRCh38.d1.vd1.fa"
Expand Down Expand Up @@ -72,7 +73,8 @@ params {
dbsnp = "/fdb/GATK_resource_bundle/hg19-2.8/dbsnp_138.hg19.vcf.gz"
germline_resource = "/data/CCBR_Pipeliner/Pipelines/LOGAN/resources/hg19/GATKbundle/af-only-gnomad.raw.sites.liftover.hg19.vcf.gz"
gnomad = '--germline-resource /data/CCBR_Pipeliner/Pipelines/LOGAN/resources/hg19/GATKbundle/af-only-gnomad.raw.sites.liftover.hg19.vcf.gz'
pon = "/data/CCBR_Pipeliner/Pipelines/LOGAN/resources/hg19/GATKbundle/hg19.liftGRCh37.noCOSMIC_ClinVar.pon.vcf.gz"
PON = "/data/CCBR_Pipeliner/Pipelines/LOGAN/resources/hg19/GATKbundle/hg19.liftGRCh37.noCOSMIC_ClinVar.pon.vcf.gz"
tonly_PON = "/data/CCBR_Pipeliner/Pipelines/LOGAN/resources/hg19/GATKbundle/hg19.liftGRCh37.noCOSMIC_ClinVar.pon.vcf.gz"
KRAKENBACDB = "/data/CCBR_Pipeliner/Pipelines/XAVIER/resources/hg38/kraken/20180907_standard_kraken2"
snpeff_genome = "GRCh37.75"
snpeff_config = "/usr/local/apps/snpEff/4.3t/snpEff.config"
Expand All @@ -85,8 +87,9 @@ params {
annotsvgenome = "GRCh37"
octopus_sforest= "" //NO hg19 somaticforest"--somatic-forest /data/CCBR_Pipeliner/Pipelines/LOGAN/resources/hg38/octopus/somatic.v0.7.4.forest"
octopus_gforest= "" //no hg19 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']
SEQUENZAGC = "/data/CCBR_Pipeliner/Pipelines/LOGAN/resources/hg19/SEQUENZA/hg19.gc200Base.wig.gz"
SEQUENZAGC_EXOME = "/data/CCBR_Pipeliner/Pipelines/LOGAN/resources/hg19/SEQUENZA/hg19.gc50Base.wig.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']
//HMFTOOLS
GENOMEVER = "37"
HMFGENOME = "/data/CCBR_Pipeliner/db/PipeDB/lib/hs37d5.fa"
Expand Down Expand Up @@ -142,14 +145,15 @@ params {
annotsvgenome = "mm10"
octopus_sforest = ""
octopus_gforest = ""
SEQUENZAGC = '/data/CCBR_Pipeliner/Pipelines/XAVIER/resources/mm10/SEQUENZA/mm10.gc50Base.wig.gz'
SEQUENZAGC = '/data/CCBR_Pipeliner/Pipelines/XAVIER/resources/mm10/SEQUENZA/mm10.gc200Base.wig.gz'
SEQUENZAGC_EXOME = '/data/CCBR_Pipeliner/Pipelines/XAVIER/resources/mm10/SEQUENZA/mm10.gc50Base.wig.gz'
FREEC {
FREECLENGTHS = "/data/CCBR_Pipeliner/Pipelines/XAVIER/resources/mm10/FREEC/mm10.fa.fai"
FREECCHROMS = "/data/CCBR_Pipeliner/Pipelines/XAVIER/resources/mm10/FREEC/Chromosomes"
FREECPILEUP = "/data/CCBR_Pipeliner/Pipelines/XAVIER/resources/mm10/FREEC/mm10_dbSNP137.ucsc.freec.bed"
FREECSNPS= "/data/CCBR_Pipeliner/Pipelines/XAVIER/resources/mm10/FREEC/mm10_dbSNP137.ucsc.freec.txt"
}
chromosomes = ['chr1','chr2','chr3','chr4','chr5','chr6','chr7','chr8','chr9','chr10','chr11','chr12','chr13','chr14','chr15','chr16','chr17','chr18','chr19','chrX','chrY','chrM']
chromosomes = ['chr1','chr2','chr3','chr4','chr5','chr6','chr7','chr8','chr9','chr10','chr11','chr12','chr13','chr14','chr15','chr16','chr17','chr18','chr19','chrX','chrY']
//CNVKIT
REFFLAT = "/data/CCBR_Pipeliner/Pipelines/LOGAN/resources/mm10/cnvkit/refFlat.txt"
ACCESS = "/data/CCBR_Pipeliner/Pipelines/LOGAN/resources/mm10/cnvkit/access-10kb.mm10.bed"
Expand Down Expand Up @@ -183,8 +187,9 @@ params {
annotsvgenome = "GRCh38"
octopus_sforest= "--somatic-forest /data/CCBR_Pipeliner/Pipelines/LOGAN/resources/hg38/octopus/somatic.v0.7.4.forest"
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']
SEQUENZAGC = "/data/CCBR_Pipeliner/Pipelines/XAVIER/resources/hg38/SEQUENZA/hg38.gc200Base.wig.gz"
SEQUENZAGC_EXOME = "/data/CCBR_Pipeliner/Pipelines/XAVIER/resources/hg38/SEQUENZA/hg38.gc50Base.wig.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']
//HMFTOOLS
GENOMEVER = "38"
HMFGENOME = "/data/CCBR_Pipeliner/Pipelines/XAVIER/resources/hg38/bwamem2/GRCh38.d1.vd1.fa"
Expand Down Expand Up @@ -237,8 +242,9 @@ params {
annotsvgenome = "GRCh38"
octopus_sforest= "--somatic-forest /data/CCBR_Pipeliner/Pipelines/LOGAN/resources/hg38/octopus/somatic.v0.7.4.forest"
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']
SEQUENZAGC = "/data/CCBR_Pipeliner/Pipelines/XAVIER/resources/hg38/SEQUENZA/hg38.gc200Base.wig.gz"
SEQUENZAGC_EXOME = "/data/CCBR_Pipeliner/Pipelines/XAVIER/resources/hg38/SEQUENZA/hg38.gc50Base.wig.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']
//HMFTOOLS
GENOMEVER = "38"
HMFGENOME = "/data/CCBR_Pipeliner/Pipelines/XAVIER/resources/hg38/genome_noalt/bwamem2/GCA_000001405.15_GRCh38_no_alt_analysis_set.fasta"
Expand Down
1 change: 0 additions & 1 deletion modules/local/bwamem/bwamem2.nf
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,6 @@ process bwamem2 {
else if (task.attempt == 3) return '200 GB'
}


input:
tuple val(samplename),
path("${samplename}.R1.trimmed.fastq.gz"),
Expand Down
9 changes: 5 additions & 4 deletions modules/local/deepvariant.nf
Original file line number Diff line number Diff line change
Expand Up @@ -95,6 +95,7 @@ process deepvariant_step3 {
"""
postprocess_variants \
--ref $GENOMEREF \
--sample_name ${samplename} \
--infile outdv/${samplename}_call_variants_output.tfrecord.gz \
--outfile ${samplename}_${bed}.vcf.gz \
--gvcf_outfile ${samplename}_${bed}.gvcf.gz \
Expand Down Expand Up @@ -151,19 +152,19 @@ process glnexus {

"""
glnexus_cli --config DeepVariant_unfiltered \
*.gvcf.gz --threads 8 > germline.v.bcf
*.gvcf.gz --threads $task.cpus > germline.v.bcf

bcftools norm \
-m - \
-Oz \
--threads 8 \
--threads $task.cpus \
-f $GENOMEREF \
-o germline.norm.vcf.gz \
germline.v.bcf

bcftools index \
-f -t \
--threads 8 \
--threads $task.cpus \
germline.norm.vcf.gz
"""

Expand Down Expand Up @@ -198,7 +199,7 @@ process deepvariant_combined {
--reads=${bam} \
--output_gvcf=${samplename}.gvcf.gz \
--output_vcf=${samplename}.vcf.gz \
--num_shards=16
--num_shards=$task.cpus
"""


Expand Down
9 changes: 3 additions & 6 deletions modules/local/gridss.nf
Original file line number Diff line number Diff line change
Expand Up @@ -82,13 +82,10 @@ process gridss_tonly {

output:
tuple val(tumorname),
path("${tumorname}.vcf.gz"),
path("${tumorname}.vcf.gz.tbi"),
path("${tumorname}.vcf.gz"), path("${tumorname}.vcf.gz.tbi"),
path("${tumorname}.vcf.gz.assembly.bam"),
path("${tumorname}.gripss.vcf.gz"),
path("${tumorname}.gripss.vcf.gz.tbi"),
path("${tumorname}.gripss.filtered.vcf.gz"),
path("${tumorname}.gripss.filtered.vcf.gz.tbi")
path("${tumorname}.gripss.vcf.gz"), path("${tumorname}.gripss.vcf.gz.tbi"),
path("${tumorname}.gripss.filtered.vcf.gz"), path("${tumorname}.gripss.filtered.vcf.gz.tbi")

script:
"""
Expand Down
15 changes: 11 additions & 4 deletions modules/local/purple.nf
Original file line number Diff line number Diff line change
Expand Up @@ -16,8 +16,9 @@ GERMLINEHOTSPOTS = file(params.genomes[params.genome].GERMLINEHOTSPOTS)

process amber_tonly {
container = "${params.containers.logan}"

label 'process_medium'
errorStrategy 'ignore'


input:
tuple val(tumorname), path(tumor), path(tumorbai)
Expand Down Expand Up @@ -49,8 +50,8 @@ process amber_tonly {

process amber_tn {
container = "${params.containers.logan}"

label 'process_medium'
errorStrategy 'ignore'

input:
tuple val(tumorname), path(tumor), path(tumorbai),
Expand Down Expand Up @@ -85,6 +86,7 @@ process amber_tn {
process cobalt_tonly {
container = "${params.containers.logan}"
label 'process_medium'
errorStrategy 'ignore'

input:
tuple val(tumorname), path(tumor), path(tumorbai)
Expand Down Expand Up @@ -116,6 +118,7 @@ process cobalt_tonly {
process cobalt_tn {
container = "${params.containers.logan}"
label 'process_medium'
errorStrategy 'ignore'

input:
tuple val(tumorname), path(tumor), path(tumorbai),
Expand Down Expand Up @@ -149,6 +152,7 @@ process cobalt_tn {
process purple {
container = "${params.containers.logan}"
label 'process_medium'
errorStrategy 'ignore'

input:
tuple val(id), val(tumorname), val(normalname),
Expand Down Expand Up @@ -190,6 +194,7 @@ process purple {
process purple_novc {
container = "${params.containers.logan}"
label 'process_medium'
errorStrategy 'ignore'

input:
tuple val(id), val(tumorname), val(normalname),
Expand Down Expand Up @@ -229,6 +234,7 @@ process purple_novc {
process purple_tonly {
container = "${params.containers.logan}"
label 'process_medium'
errorStrategy 'ignore'

input:
tuple val(tumorname),
Expand All @@ -251,7 +257,7 @@ process purple_tonly {
$ENSEMBLCACHE \
-somatic_vcf ${somaticvcf} \
-driver_gene_panel $DRIVERS \
-somatic_hotspots $HOTSPOTS \
-somatic_hotspots $SOMATICHOTSPOTS \
-threads $task.cpus \
-output_dir ${tumorname}
"""
Expand All @@ -269,7 +275,8 @@ process purple_tonly {
process purple_tonly_novc {
container = "${params.containers.logan}"
label 'process_medium'

errorStrategy 'ignore'

input:
tuple val(tumorname), val(normalname),
path(cobaltin), path(amberin)
Expand Down
Loading
Loading