Skip to content

Commit a4256e1

Browse files
committed
Remove samplesheet read from schema
1 parent c38019a commit a4256e1

File tree

3 files changed

+33
-18
lines changed

3 files changed

+33
-18
lines changed

main.nf

Lines changed: 18 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -20,14 +20,13 @@ include { PIPELINE_INITIALISATION } from './subworkflows/local/utils_nfcore_chip
2020
include { PIPELINE_COMPLETION } from './subworkflows/local/utils_nfcore_chipseq_pipeline'
2121
include { getGenomeAttribute } from './subworkflows/local/utils_nfcore_chipseq_pipeline'
2222

23-
2423
/*
2524
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
2625
GENOME PARAMETER VALUES
2726
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
2827
*/
2928

30-
params.fasta = getGenomeAttribute('fasta') // TODO check if the function ways with the include
29+
params.fasta = getGenomeAttribute('fasta')
3130
params.bwa_index = getGenomeAttribute('bwa')
3231
params.bowtie2_index = getGenomeAttribute('bowtie2')
3332
params.chromap_index = getGenomeAttribute('chromap')
@@ -70,10 +69,23 @@ workflow NFCORE_CHIPSEQ {
7069
ch_versions = ch_versions.mix(PREPARE_GENOME.out.versions)
7170

7271
//
73-
// WORKFLOW: Run pipeline
72+
// WORKFLOW: Run nf-core/chipseq workflow
7473
//
75-
CHIPSEQ (
76-
samplesheet
74+
ch_input = Channel.value(file(params.input, checkIfExists: true))
75+
76+
CHIPSEQ(
77+
ch_input,
78+
ch_versions,
79+
PREPARE_GENOME.out.fasta,
80+
PREPARE_GENOME.out.fai,
81+
PREPARE_GENOME.out.gtf,
82+
PREPARE_GENOME.out.gene_bed,
83+
PREPARE_GENOME.out.chrom_sizes,
84+
PREPARE_GENOME.out.filtered_bed,
85+
PREPARE_GENOME.out.bwa_index,
86+
PREPARE_GENOME.out.bowtie2_index,
87+
PREPARE_GENOME.out.chromap_index,
88+
PREPARE_GENOME.out.star_index
7789
)
7890

7991
emit:
@@ -104,9 +116,7 @@ workflow {
104116
//
105117
// WORKFLOW: Run main workflow
106118
//
107-
NFCORE_CHIPSEQ (
108-
PIPELINE_INITIALISATION.out.samplesheet //TODO check whether it works
109-
)
119+
NFCORE_CHIPSEQ ( )
110120

111121
//
112122
// SUBWORKFLOW: Run completion tasks

subworkflows/local/utils_nfcore_chipseq_pipeline/main.nf

Lines changed: 14 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -34,6 +34,8 @@ workflow PIPELINE_INITIALISATION {
3434

3535
main:
3636

37+
ch_versions = Channel.empty()
38+
3739
//
3840
// Print version and exit if required and dump pipeline parameters to JSON file
3941
//
@@ -48,30 +50,33 @@ workflow PIPELINE_INITIALISATION {
4850
//
4951
// Validate parameters and generate parameter summary to stdout
5052
//
51-
pre_help_text = nfCoreLogo(monochrome_logs)
52-
post_help_text = '\n' + workflowCitation() + '\n' + dashedLine(monochrome_logs)
53-
def String workflow_command = "nextflow run ${workflow.manifest.name} -profile <docker/singularity/.../institute> --input samplesheet.csv --genome GRCh37 --outdir <OUTDIR>"
54-
UTILS_NFVALIDATION_PLUGIN (
55-
help,
56-
workflow_command,
57-
pre_help_text,
58-
post_help_text,
53+
UTILS_NFSCHEMA_PLUGIN (
54+
workflow,
5955
validate_params,
6056
null
6157
)
6258

63-
6459
//
6560
// Check config provided to the pipeline
6661
//
6762
UTILS_NFCORE_PIPELINE (
6863
nextflow_cli_args
6964
)
65+
7066
//
7167
// Custom validation for pipeline parameters
7268
//
7369
validateInputParameters()
7470

71+
//
72+
// Create channel from input file provided through params.input
73+
//
74+
75+
ch_samplesheet = Channel.fromList(samplesheetToList(params.input, "assets/schema_input.json"))
76+
77+
emit:
78+
samplesheet = ch_samplesheet
79+
versions = ch_versions
7580
}
7681

7782
/*

workflows/chipseq.nf

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -89,7 +89,7 @@ if (anno_readme && file(anno_readme).exists()) {
8989
workflow CHIPSEQ {
9090

9191
take:
92-
ch_samplesheet // channel: samplesheet read in from --input //TODO
92+
// ch_samplesheet // channel: samplesheet read in from --input //TODO
9393
ch_input // channel: path(sample_sheet.csv)
9494
ch_versions // channel: [ path(versions.yml) ]
9595
ch_fasta // channel: path(genome.fa)

0 commit comments

Comments
 (0)