Skip to content
Closed
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
27 changes: 25 additions & 2 deletions lib/WorkflowMain.groovy
Original file line number Diff line number Diff line change
Expand Up @@ -74,8 +74,31 @@ class WorkflowMain {

// Check input has been provided
if (!params.input) {
log.error "Please provide an input samplesheet to the pipeline e.g. '--input samplesheet.csv'"
System.exit(1)
log.warn "No samplesheet specified, attempting to restart from csv files present in ${params.outdir}"

switch (params.step) {
case 'mapping': log.warn "Can't start with step $params.step without samplesheet"
System.exit(1);
break
//case 'markduplicates': log.warn "Using file ${params.outdir}/preprocessing/csv/markduplicates_no_table.csv"
// params.input = "${params.outdir}/preprocessing/csv/markduplicates_no_table.csv";
// break
case 'prepare_recalibration': log.warn "Using file ${params.outdir}/preprocessing/csv/markduplicates_no_table.csv"
params.input = "${params.outdir}/preprocessing/csv/markduplicates_no_table.csv";
break
case 'recalibrate': log.warn "Using file ${params.outdir}/preprocessing/csv/markduplicates.csv"
params.input = "${params.outdir}/preprocessing/csv/markduplicates.csv";
break
case 'variant_calling': log.warn "Using file ${params.outdir}/preprocessing/csv/recalibrated.csv"
params.input = "${params.outdir}/preprocessing/csv/recalibrated.csv";
break
// // case 'controlfreec': csv_file = file("${params.outdir}/variant_calling/csv/control-freec_mpileup.csv", checkIfExists: true); break
// case 'annotate': csv_file = file("${params.outdir}/variant_calling/csv/recalibrated.csv", checkIfExists: true); break
default: log.warn "Please provide an input samplesheet to the pipeline e.g. '--input samplesheet.csv'"
exit 1, "Unknown step $params.step"

//log.warn "Please provide an input samplesheet to the pipeline e.g. '--input samplesheet.csv'"
//System.exit(1)
}
}

Expand Down
1 change: 0 additions & 1 deletion nextflow.config
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,6 @@ params {
cf_window = null // by default we are not using this in Control-FREEC

generate_gvcf = false // g.vcf are not produced by HaplotypeCaller by default
no_strelka_bp = false // Strelka will use Manta candidateSmallIndels if available
pon = null // No default PON (Panel of Normals) file for GATK Mutect2 / Sentieon TNscope
pon_tbi = null // No default PON index for GATK Mutect2 / Sentieon TNscope
ignore_soft_clipped_bases = false // no --dont-use-soft-clipped-bases for GATK Mutect2
Expand Down
8 changes: 1 addition & 7 deletions nextflow_schema.json
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
"type": "object",
"fa_icon": "fas fa-terminal",
"description": "Define where the pipeline should find input data and save output data.",
"required": ["step", "input", "outdir"],
"required": ["step", "outdir"],
"properties": {
"step": {
"type": "string",
Expand Down Expand Up @@ -294,12 +294,6 @@
"fa_icon": "fas fa-copy",
"description": "Generate g.vcf output from GATK HaplotypeCaller."
},
"no_strelka_bp": {
"type": "boolean",
"fa_icon": "fas fa-ban",
"description": "Will not use Manta candidateSmallIndels for Strelka.",
"help_text": "Not recommended by Best Practices."
},
"pon": {
"type": "string",
"fa_icon": "fas fa-file",
Expand Down
32 changes: 16 additions & 16 deletions workflows/sarek.nf
Original file line number Diff line number Diff line change
Expand Up @@ -46,22 +46,22 @@ def checkPathParamList = [
for (param in checkPathParamList) if (param) file(param, checkIfExists: true)

// Check mandatory parameters
if (params.input) csv_file = file(params.input)
else {
log.warn "No samplesheet specified, attempting to restart from csv files present in ${params.outdir}"
switch (params.step) {
case 'mapping': exit 1, "Can't start with step $params.step without samplesheet"
//case 'markduplicates': csv_file = file("${params.outdir}/preprocessing/csv/markduplicates_no_table.csv", checkIfExists: true); break
case 'prepare_recalibration': csv_file = file("${params.outdir}/preprocessing/csv/markduplicates_no_table.csv", checkIfExists: true); break
case 'recalibrate': csv_file = file("${params.outdir}/preprocessing/csv/markduplicates.csv", checkIfExists: true); break
case 'variant_calling': csv_file = file("${params.outdir}/preprocessing/csv/recalibrated.csv", checkIfExists: true); break
// case 'controlfreec': csv_file = file("${params.outdir}/variant_calling/csv/control-freec_mpileup.csv", checkIfExists: true); break
case 'annotate': csv_file = file("${params.outdir}/variant_calling/csv/recalibrated.csv", checkIfExists: true); break
default: exit 1, "Unknown step $params.step"
}
}

ch_input_sample = extract_csv(csv_file)
// if (params.input) csv_file = file(params.input, checkIfExists: true)
// else {
// log.warn "No samplesheet specified, attempting to restart from csv files present in ${params.outdir}"
// // switch (params.step) {
// // case 'mapping': exit 1, "Can't start with step $params.step without samplesheet"
// // //case 'markduplicates': csv_file = file("${params.outdir}/preprocessing/csv/markduplicates_no_table.csv", checkIfExists: true); break
// // case 'prepare_recalibration': csv_file = file("${params.outdir}/preprocessing/csv/markduplicates_no_table.csv", checkIfExists: true); break
// // case 'recalibrate': csv_file = file("${params.outdir}/preprocessing/csv/markduplicates.csv", checkIfExists: true); break
// // case 'variant_calling': csv_file = file("${params.outdir}/preprocessing/csv/recalibrated.csv", checkIfExists: true); break
// // // case 'controlfreec': csv_file = file("${params.outdir}/variant_calling/csv/control-freec_mpileup.csv", checkIfExists: true); break
// // case 'annotate': csv_file = file("${params.outdir}/variant_calling/csv/recalibrated.csv", checkIfExists: true); break
// // default: exit 1, "Unknown step $params.step"
// // }
// }

ch_input_sample = extract_csv(file(params.input, checkIfExists: true))

if (params.wes) {
if (params.intervals && !params.intervals.endsWith("bed")) exit 1, "Target file must be in BED format"
Expand Down