Skip to content

Commit 09a299f

Browse files
committed
Record types [wip]
1 parent e5dbade commit 09a299f

37 files changed

Lines changed: 1208 additions & 907 deletions

File tree

main.nf

Lines changed: 257 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -21,15 +21,259 @@ include { PIPELINE_COMPLETION } from './subworkflows/local/utils_nfcore_
2121
include { getGenomeAttribute } from './subworkflows/local/utils_nfcore_methylseq_pipeline'
2222
include { METHYLSEQ } from './workflows/methylseq/'
2323

24+
include { Sample } from './subworkflows/nf-core/fastq_align_dedup_bismark/main'
25+
2426
/*
2527
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
2628
GENOME PARAMETER VALUES
2729
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
2830
*/
29-
params.fasta = getGenomeAttribute('fasta')
30-
params.fasta_index = getGenomeAttribute('fasta_index')
31-
params.bwameth_index = getGenomeAttribute('bwameth')
32-
params.bismark_index = params.aligner == 'bismark_hisat' ? getGenomeAttribute('bismark_hisat2') : getGenomeAttribute('bismark')
31+
32+
params {
33+
34+
// Path to comma-separated file containing information about the samples in the experiment.
35+
input : String
36+
37+
// The output directory where the results will be saved. You have to use absolute paths to storage on Cloud infrastructure.
38+
outdir : String
39+
40+
// Email address for completion summary.
41+
email : String
42+
43+
// MultiQC report title. Printed as page header, used for filename if not otherwise specified.
44+
multiqc_title : String
45+
46+
// Save reference(s) to results directory
47+
save_reference : Boolean
48+
49+
// Save aligned intermediates to results directory
50+
save_align_intermeds : Boolean
51+
52+
// Bismark only - Save unmapped reads to FastQ files
53+
unmapped : Boolean
54+
55+
// Save trimmed reads to results directory.
56+
save_trimmed : Boolean
57+
58+
// Name of iGenomes reference.
59+
genome : String
60+
61+
// Path to FASTA genome file
62+
fasta : Path = getGenomeAttribute('fasta')
63+
64+
// Path to Fasta index file.
65+
fasta_index : Path = getGenomeAttribute('fasta_index')
66+
67+
// Path to a directory containing a Bismark reference index.
68+
bismark_index : Path = params.aligner == 'bismark_hisat' ? getGenomeAttribute('bismark_hisat2') : getGenomeAttribute('bismark')
69+
70+
// bwameth index filename base
71+
bwameth_index : Path = getGenomeAttribute('bwameth')
72+
73+
// Do not load the iGenomes reference config.
74+
igenomes_ignore : Boolean
75+
76+
// The base path to the igenomes reference files
77+
igenomes_base : String = 's3://ngi-igenomes/igenomes/'
78+
79+
// Alignment tool to use.
80+
aligner : String = 'bismark'
81+
82+
// Use BWA-MEM2 algorithm for BWA-Meth indexing and alignment.
83+
use_mem2 : Boolean = false
84+
85+
// Preset for working with PBAT libraries.
86+
pbat : Boolean
87+
88+
// Turn on if dealing with MspI digested material.
89+
rrbs : Boolean
90+
91+
// Run bismark in SLAM-seq mode.
92+
slamseq : Boolean
93+
94+
// Preset for EM-seq libraries.
95+
em_seq : Boolean
96+
97+
// Trimming preset for single-cell bisulfite libraries.
98+
single_cell : Boolean
99+
100+
// Trimming preset for the Accel kit.
101+
accel : Boolean
102+
103+
// Trimming preset for the Zymo kit.
104+
zymo : Boolean
105+
106+
// Trim bases from the 5' end of read 1 (or single-end reads).
107+
clip_r1 : Integer = 0
108+
109+
// Trim bases from the 5' end of read 2 (paired-end only).
110+
clip_r2 : Integer = 0
111+
112+
// Trim bases from the 3' end of read 1 AFTER adapter/quality trimming.
113+
three_prime_clip_r1 : Integer = 0
114+
115+
// Trim bases from the 3' end of read 2 AFTER adapter/quality trimming
116+
three_prime_clip_r2 : Integer = 0
117+
118+
// Trim bases below this quality value from the 3' end of the read, ignoring high-quality G bases
119+
nextseq_trim : Integer = 0
120+
121+
// Discard reads that become shorter than INT because of either quality or adapter trimming.
122+
length_trim : Integer
123+
124+
// Skip presetting trimming parameters entirely
125+
skip_trimming_presets : Boolean = false
126+
127+
// Run alignment against all four possible strands.
128+
non_directional : Boolean
129+
130+
// Output stranded cytosine report, following Bismark's bismark_methylation_extractor step.
131+
cytosine_report : Boolean
132+
133+
// Turn on to relax stringency for alignment (set allowed penalty with --num_mismatches).
134+
relax_mismatches : Boolean
135+
136+
// 0.6 will allow a penalty of bp * -0.6 - for 100bp reads (bismark default is 0.2)
137+
num_mismatches : Float = 0.6
138+
139+
// Specify a minimum read coverage to report a methylation call
140+
meth_cutoff : Integer
141+
142+
// Ignore read 2 methylation when it overlaps read 1
143+
no_overlap : Boolean = true
144+
145+
// Ignore methylation in first n bases of 5' end of R1
146+
ignore_r1 : Integer = 0
147+
148+
// Ignore methylation in first n bases of 5' end of R2
149+
ignore_r2 : Integer = 2
150+
151+
// Ignore methylation in last n bases of 3' end of R1
152+
ignore_3prime_r1 : Integer = 0
153+
154+
// Ignore methylation in last n bases of 3' end of R2
155+
ignore_3prime_r2 : Integer = 2
156+
157+
// Supply a .gtf file containing known splice sites (bismark_hisat only).
158+
known_splices : String
159+
160+
// Allow soft-clipping of reads (potentially useful for single-cell experiments).
161+
local_alignment : Boolean
162+
163+
// The minimum insert size for valid paired-end alignments.
164+
minins : Integer
165+
166+
// The maximum insert size for valid paired-end alignments.
167+
maxins : Integer
168+
169+
// Sample is NOMe-seq or NMT-seq. Runs coverage2cytosine.
170+
nomeseq : Boolean
171+
172+
// Merges methylation calls for every strand into a single, context dependent file.
173+
comprehensive : Boolean
174+
175+
// Call methylation in all three CpG, CHG and CHH contexts.
176+
all_contexts : Boolean
177+
178+
// Merges methylation metrics of the Cytosines in a given context.
179+
merge_context : Boolean
180+
181+
// Specify a minimum read coverage for MethylDackel to report a methylation call.
182+
min_depth : Integer = 0
183+
184+
// MethylDackel - ignore SAM flags
185+
ignore_flags : Boolean
186+
187+
// Save files for use with methylKit
188+
methyl_kit : Boolean
189+
190+
// A GFF or BED file containing the target regions which will be passed to Qualimap/Bamqc.
191+
bamqc_regions_file : String
192+
193+
// A BED file containing the target regions
194+
target_regions_file : String
195+
196+
// Run Picard CollectHsMetrics in the targeted analysis
197+
collecthsmetrics : Boolean
198+
199+
// Skip read trimming.
200+
skip_trimming : Boolean
201+
202+
// Skip deduplication step after alignment.
203+
skip_deduplication : Boolean
204+
205+
// Skip FastQC
206+
skip_fastqc : Boolean
207+
208+
// Skip MultiQC
209+
skip_multiqc : Boolean
210+
211+
// Run preseq/lcextrap tool
212+
run_preseq : Boolean
213+
214+
// Run qualimap/bamqc tool
215+
run_qualimap : Boolean
216+
217+
// Run advanced analysis for targeted methylation kits with enrichment of specific regions
218+
run_targeted_sequencing : Boolean
219+
220+
// Git commit id for Institutional configs.
221+
custom_config_version : String = 'master'
222+
223+
// Base directory for Institutional configs.
224+
custom_config_base : String = 'https://raw.githubusercontent.com/nf-core/configs/master'
225+
226+
// Institutional config name.
227+
config_profile_name : String
228+
229+
// Institutional config description.
230+
config_profile_description : String
231+
232+
// Institutional config contact information.
233+
config_profile_contact : String
234+
235+
// Institutional config URL link.
236+
config_profile_url : String
237+
238+
// Display version and exit.
239+
version : Boolean
240+
241+
// Method used to save pipeline results to output directory.
242+
publish_dir_mode : String = 'copy'
243+
244+
// Email address for completion summary, only when pipeline fails.
245+
email_on_fail : String
246+
247+
// Send plain-text email instead of HTML.
248+
plaintext_email : Boolean
249+
250+
// File size limit when attaching MultiQC reports to summary emails.
251+
max_multiqc_email_size : String = '25.MB'
252+
253+
// Do not use coloured log outputs.
254+
monochrome_logs : Boolean
255+
256+
// Incoming hook URL for messaging service
257+
hook_url : String
258+
259+
// Custom config file to supply to MultiQC.
260+
multiqc_config : String
261+
262+
// Custom logo file to supply to MultiQC. File name must also be set in the MultiQC config file
263+
multiqc_logo : String
264+
265+
// Custom MultiQC yaml file containing HTML including a methods description.
266+
multiqc_methods_description : String
267+
268+
// Boolean whether to validate parameters against the schema at runtime
269+
validate_params : Boolean = true
270+
271+
// Base URL or local path to location of pipeline test dataset files
272+
pipelines_testdata_base_path : String = 'https://raw.githubusercontent.com/nf-core/test-datasets/methylseq/'
273+
274+
// Suffix to add to the trace report filename. Default is the date and time in the format yyyy-MM-dd_HH-mm-ss.
275+
trace_report_suffix : String
276+
}
33277

34278
/*
35279
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
@@ -43,27 +287,18 @@ params.bismark_index = params.aligner == 'bismark_hisat' ? getGenomeAttribute('b
43287
workflow NFCORE_METHYLSEQ {
44288

45289
take:
46-
samplesheet // channel: samplesheet read in from --input
290+
ch_samples: Channel<Sample>
47291

48292
main:
49293

50-
51-
//
52-
// Initialize file channels or values based on params
53-
//
54-
ch_fasta = params.fasta ? channel.fromPath(params.fasta).map{ it -> [ [id:it.baseName], it ] } : channel.empty()
55-
ch_or_val_fasta_index = params.fasta_index ? channel.fromPath(params.fasta_index).map{ it -> [ [id:it.baseName], it ] } : []
56-
ch_or_val_bismark_index = params.bismark_index ? channel.fromPath(params.bismark_index).map{ it -> [ [id:it.baseName], it ] } : []
57-
ch_or_val_bwameth_index = params.bwameth_index ? channel.fromPath(params.bwameth_index).map{ it -> [ [id:it.baseName], it ] } : []
58-
59294
//
60295
// SUBWORKFLOW: Prepare any required reference genome indices
61296
//
62297
FASTA_INDEX_BISMARK_BWAMETH(
63-
ch_fasta,
64-
ch_or_val_fasta_index,
65-
ch_or_val_bismark_index,
66-
ch_or_val_bwameth_index,
298+
params.fasta,
299+
params.fasta_index,
300+
params.bismark_index,
301+
params.bwameth_index,
67302
params.aligner,
68303
params.collecthsmetrics,
69304
params.use_mem2
@@ -74,15 +309,16 @@ workflow NFCORE_METHYLSEQ {
74309
//
75310

76311
METHYLSEQ (
77-
samplesheet,
312+
ch_samples,
78313
FASTA_INDEX_BISMARK_BWAMETH.out.fasta,
79314
FASTA_INDEX_BISMARK_BWAMETH.out.fasta_index,
80315
FASTA_INDEX_BISMARK_BWAMETH.out.bismark_index,
81316
FASTA_INDEX_BISMARK_BWAMETH.out.bwameth_index,
317+
params
82318
)
83319

84320
emit:
85-
multiqc_report = METHYLSEQ.out.multiqc_report // channel: [ path(multiqc_report.html ) ]
321+
multiqc_report = METHYLSEQ.out.multiqc_report
86322

87323
}
88324
/*
@@ -98,6 +334,7 @@ workflow {
98334
// SUBWORKFLOW: Run initialisation tasks
99335
//
100336
PIPELINE_INITIALISATION (
337+
params.input,
101338
params.version,
102339
params.validate_params,
103340
params.monochrome_logs,

modules/nf-core/bedtools/intersect/main.nf

Lines changed: 24 additions & 20 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)