Skip to content

Commit

Permalink
Address review comments
Browse files Browse the repository at this point in the history
  • Loading branch information
JoseEspinosa committed Apr 2, 2024
1 parent 367a550 commit eb1285a
Show file tree
Hide file tree
Showing 3 changed files with 14 additions and 23 deletions.
2 changes: 1 addition & 1 deletion main.nf
Original file line number Diff line number Diff line change
Expand Up @@ -80,7 +80,7 @@ workflow NFCORE_ATACSEQ {
ch_versions = ch_versions.mix(PREPARE_GENOME.out.versions)

//
// WORKFLOW: Run nf-core/rnaseq workflow
// WORKFLOW: Run nf-core/atacseq workflow
//
ch_samplesheet = Channel.value(file(params.input, checkIfExists: true))

Expand Down
33 changes: 12 additions & 21 deletions subworkflows/local/utils_nfcore_atacseq_pipeline/main.nf
Original file line number Diff line number Diff line change
Expand Up @@ -111,6 +111,10 @@ workflow PIPELINE_COMPLETION {
imNotification(summary_params, hook_url)
}
}

workflow.onError {
log.error "Pipeline failed. Please refer to troubleshooting docs: https://nf-co.re/docs/usage/troubleshooting"
}
}

/*
Expand All @@ -119,27 +123,6 @@ workflow PIPELINE_COMPLETION {
========================================================================================
*/

//
// Function to validate channels from input samplesheet
//
def validateInputSamplesheet(input) {
def (metas, fastqs) = input[1..2]

// Check that multiple runs of the same sample are of the same strandedness
def strandedness_ok = metas.collect{ it.strandedness }.unique().size == 1
if (!strandedness_ok) {
error("Please check input samplesheet -> Multiple runs of a sample must have the same strandedness!: ${metas[0].id}")
}

// Check that multiple runs of the same sample are of the same datatype i.e. single-end / paired-end
def endedness_ok = metas.collect{ it.single_end }.unique().size == 1
if (!endedness_ok) {
error("Please check input samplesheet -> Multiple runs of a sample must be of the same datatype i.e. single-end or paired-end: ${metas[0].id}")
}

return [ metas[0], fastqs ]
}

//
// Check and validate pipeline parameters
//
Expand All @@ -158,6 +141,14 @@ def validateInputParameters() {
if (params.gtf && params.gff) {
gtfGffWarn(log)
}

if (!params.macs_gsize) {
macsGsizeWarn(log)
}

if (!params.read_length && !params.macs_gsize) {
error ("Both '--read_length' and '--macs_gsize' not specified! Please specify either to infer MACS2 genome size for peak calling.")
}
}

//
Expand Down
2 changes: 1 addition & 1 deletion workflows/atacseq.nf
Original file line number Diff line number Diff line change
Expand Up @@ -684,7 +684,7 @@ workflow ATACSEQ {
// Collate and save software versions
//
softwareVersionsToYAML(ch_versions)
.collectFile(storeDir: "${params.outdir}/pipeline_info", name: 'nf_core_rnaseq_software_mqc_versions.yml', sort: true, newLine: true)
.collectFile(storeDir: "${params.outdir}/pipeline_info", name: 'nf_core_atacseq_software_mqc_versions.yml', sort: true, newLine: true)
.set { ch_collated_versions }

//
Expand Down

0 comments on commit eb1285a

Please sign in to comment.