Skip to content

Commit ae68777

Browse files
committed
Merge branch 'master' of https://github.com/dstrib/CnR-flow
2 parents 3313bc2 + 21a0a41 commit ae68777

File tree

83 files changed

+2115
-299
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

83 files changed

+2115
-299
lines changed

Citations.bib

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -42,6 +42,15 @@ @article{meers2019peak
4242
publisher={Springer}
4343
}
4444

45+
@Manual{,
46+
title = {R: A Language and Environment for Statistical Computing},
47+
author = {{R Core Team}},
48+
organization = {R Foundation for Statistical Computing},
49+
address = {Vienna, Austria},
50+
year = {2017},
51+
url = {https://www.R-project.org/},
52+
}
53+
4554
@article{langmead2012fast,
4655
title={Fast gapped-read alignment with Bowtie 2},
4756
author={Langmead, Ben and Salzberg, Steven L},

Citations.txt

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,9 @@ Zhu, Qian, et al. "CUT&RUNTools: a flexible pipeline for CUT&RUN processing and
1010
SEACR:
1111
Meers, Michael P., Dan Tenenbaum, and Steven Henikoff. "Peak calling by Sparse Enrichment Analysis for CUT&RUN chromatin profiling." Epigenetics & chromatin 12.1 (2019): 42.
1212

13+
R:
14+
R Core Team (2017). R: A language and environment for statistical computing. R Foundation for Statistical Computing, Vienna, Austria. URL https://www.R-project.org/
15+
1316
Bowtie2:
1417
Langmead, Ben, and Steven L. Salzberg. "Fast gapped-read alignment with Bowtie 2." Nature methods 9.4 (2012): 357.
1518

@@ -31,6 +34,6 @@ Quinlan AR and Hall IM, 2010. BEDTools: a flexible suite of utilities for compar
3134
bedGraphToBigWig:
3235
BigWig and BigBed tools: Kent WJ, Zweig AS, Barber G, Hinrichs AS, Karolchik D. BigWig and BigBed: enabling browsing of large distributed data sets. Bioinformatics. 2010 Sep 1;26(17):2204-7.
3336

34-
Macs2:
37+
MACS2:
3538
Zhang et al. Model-based Analysis of ChIP-Seq (MACS). Genome Biol (2008) vol. 9 (9) pp. R137
3639

CnR-flow.nf

Lines changed: 11 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -2,21 +2,21 @@
22
//Daniel Stribling
33
//Renne Lab, University of Florida
44
//
5-
//This file is part of CnR-Flow.
6-
//CnR-Flow is free software: you can redistribute it and/or modify
5+
//This file is part of CnR-flow.
6+
//CnR-flow is free software: you can redistribute it and/or modify
77
//it under the terms of the GNU General Public License as published by
88
//the Free Software Foundation, either version 3 of the License, or
99
//(at your option) any later version.
10-
//CnR-Flow is distributed in the hope that it will be useful,
10+
//CnR-flow is distributed in the hope that it will be useful,
1111
//but WITHOUT ANY WARRANTY; without even the implied warranty of
1212
//MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
1313
//GNU General Public License for more details.
1414
//You should have received a copy of the GNU General Public License
15-
//along with CnR-Flow. If not, see <https://www.gnu.org/licenses/>.
15+
//along with CnR-flow. If not, see <https://www.gnu.org/licenses/>.
1616

1717
// To prevent duplication, all required paramaters are listed in the bundled files:
1818
// /CnR-flow/nextflow.config
19-
// /CnR-flow/templates/nextflow.config.master (backup)
19+
// /CnR-flow/templates/nextflow.config.backup
2020

2121
// --------------- Setup Default Pipe Variables: ---------------
2222
params.verbose = false
@@ -28,7 +28,6 @@ params.out_front_pad = 4
2828
params.out_prop_pad = 17
2929

3030
// --------------- Check (and Describe) "--mode" param: ---------------
31-
//params.mode='run' //DEBUG
3231
modes = ['initiate', 'validate', 'validate_all', 'prep_fasta',
3332
'list_refs', 'dry_run', 'run', 'help', 'version']
3433
usage = """\
@@ -92,7 +91,6 @@ if( params.help || params.h ) {
9291

9392
print_in_files = []
9493

95-
9694
// If mode is 'prep_fasta', ensure "ref_fasta" has been provided.
9795
if( ['prep_fasta'].contains(params.mode) ) {
9896
test_params_key(params, 'ref_fasta')
@@ -221,7 +219,7 @@ if( ['prep_fasta'].contains(params.mode) ) {
221219

222220
// Keys and Params for merging langes
223221
if( params.do_merge_lanes ) {
224-
null//No custom settings
222+
null // No custom settings
225223
}
226224
// Keys and Params for FastQC
227225
if( params.do_fastqc ) {
@@ -448,7 +446,6 @@ if( ['initiate'].contains( params.mode ) ) {
448446
println ""
449447
}
450448

451-
452449
// -- Run Mode: validate
453450
if( ['validate', 'validate_all'].contains( params.mode ) ) {
454451
process CnR_Validate {
@@ -503,10 +500,8 @@ if( ['validate', 'validate_all'].contains( params.mode ) ) {
503500
validate_outs
504501
.collect()
505502
.view { it -> "\nDependencies Have been Validated, Results:\n $it\n" }
506-
507503
}
508504

509-
510505
def get_refs_locations(params) {
511506
refs_locations = [
512507
'refs_dir': params.refs_dir,
@@ -612,7 +607,7 @@ if( params.mode == 'prep_fasta' ) {
612607

613608
process CnR_Prep_GetFasta {
614609
tag { name }
615-
d label 'big_mem'
610+
label 'big_mem'
616611
beforeScript { task_details(task) }
617612
stageInMode 'copy'
618613
echo true
@@ -783,7 +778,6 @@ d label 'big_mem'
783778
["${name}.refinfo.txt", details]
784779
}
785780
.view { "Database Prepared and published in:\n ${params.refs_dir}/${it}\nDetails:\n${it.text}" }
786-
787781
}
788782

789783
// -- Run Mode: 'dry_run'
@@ -1031,7 +1025,6 @@ if( params.mode == 'run' ) {
10311025

10321026
// Prepare Step 0/1 Input Channels
10331027
use_fastqs.into { fastqcPre_inputs; trim_inputs }
1034-
10351028

10361029
// Step 0, Part C, FastQC Analysis (If Enabled)
10371030
if( params.do_fastqc ) {
@@ -1042,7 +1035,7 @@ if( params.mode == 'run' ) {
10421035
conda get_conda(params, 'fastqc')
10431036
}
10441037
tag { name }
1045-
label 'norm_mem'
1038+
label 'small_mem'
10461039
beforeScript { task_details(task) }
10471040
cpus 1 //Multiple CPUS for FastQC are for multiple files.
10481041

@@ -1075,7 +1068,6 @@ if( params.mode == 'run' ) {
10751068
}
10761069
}
10771070

1078-
10791071
// Step 1, Part A, Trim Reads using Trimmomatic (if_enabled)
10801072
if( params.do_trim ) {
10811073
process CnR_S1_A_Trim {
@@ -1210,8 +1202,9 @@ if( params.mode == 'run' ) {
12101202
conda get_conda(params, 'fastqc')
12111203
}
12121204
tag { name }
1213-
label 'norm_mem'
1205+
label 'small_mem'
12141206
beforeScript { task_details(task) }
1207+
cpus 1 //Multiple CPUS for FastQC are for multiple files.
12151208

12161209
input:
12171210
tuple val(name), val(cond), val(group), path(fastq) from fastqcPost_inputs
@@ -1731,7 +1724,6 @@ if( params.mode == 'run' ) {
17311724
17321725
echo -e "name,fq_pairs,spike_aln_pairs,spike_aln_pct,cross_aln_pairs,cross_aln_pct,adj_aln_pairs,adj_aln_pct" > !{aln_count_csv}
17331726
echo -e "!{name},${PAIR_NUM},${SPIKE_COUNT},${SPIKE_PERCENT},${CROSS_COUNT},CROSS_PCT,${ADJ_COUNT},${ADJ_PERCENT}" >> !{aln_count_csv}
1734-
17351727
17361728
echo "Step 3, Part A, Spike-In Alignment, Complete."
17371729
'''
@@ -1830,7 +1822,6 @@ if( params.mode == 'run' ) {
18301822
label 'norm_mem'
18311823
beforeScript { task_details(task) }
18321824
cpus 1
1833-
errorStrategy 'ignore' //Debug
18341825

18351826
input:
18361827
tuple val(name), val(cond), val(group), val(aln_type), path(aln) from make_bigwig_alns
@@ -2078,7 +2069,6 @@ if( params.mode == 'run' ) {
20782069
}
20792070
}
20802071
}
2081-
20822072

20832073
// --------------- Groovy Helper Functions ---------------
20842074
def return_as_list(item) {
@@ -2186,13 +2176,12 @@ def has_conda(params, name, def_val="") {
21862176
use_conda != def_val
21872177
}
21882178

2189-
//Return Boolean true if resources exist for name(s).
2179+
// Return Boolean true if resources exist for name(s).
21902180
def has_resources(params, name) {
21912181
def resources = get_resources(params, name, def_val="")
21922182
( resources[0].toBoolean() || resources[1].toBoolean() )
21932183
}
21942184

2195-
21962185
def test_params_key(params, key, allowed_opts=null) {
21972186
if( !params.containsKey(key) ) {
21982187
log.error "Required parameter key not provided:"

0 commit comments

Comments
 (0)