Skip to content

Commit 34cb83f

Browse files
authored
sync with develop (#3)
* general formatting * add stub for the snippy core * change the url
1 parent 59a293d commit 34cb83f

File tree

3 files changed

+81
-17
lines changed

3 files changed

+81
-17
lines changed

LICENSE

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
MIT License
22

3-
Copyright (c) 2020 BioDragao-Org
3+
Copyright (c) 2020 Abhinav Sharma (@abhi18av)
44

55
Permission is hereby granted, free of charge, to any person obtaining a copy
66
of this software and associated documentation files (the "Software"), to deal

README.md

Lines changed: 54 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,56 @@
1-
# rdanalyzer_fq_process
1+
# Nextflow wrapper for `rd-analyzer` process.
22

3-
The nextflow wrapper for the `rdanalyzer` process.
3+
## Pre-requisites
44

5-
https://github.com/nextflow-hub/trimmed_rdanalyzer_fq
5+
- Nextflow
6+
- Docker
7+
8+
**NOTE** If you plan to setup a basic server, then you can refer [minimal-nextflow-setup](https://github.com/nextflow-hub/minimal-nextflow-setup)
9+
10+
## Usage
11+
12+
```
13+
nextflow run https://github.com/nextflow-hub/rd-analyzer
14+
```
15+
16+
## Options
17+
18+
19+
- `filePattern`
20+
21+
By default, the process assumes the files to follow the `*_{R1,R2}.fastq.gz` pattern, which could be customized using this option
22+
23+
```
24+
nextflow run https://github.com/nextflow-hub/rd-analyzer --filePattern './*_{1,2}.fastq.gz'
25+
```
26+
27+
- `resultsDir`
28+
29+
By default, it stores the result files locally inside the `results` directory.
30+
31+
```
32+
nextflow run https://github.com/nextflow-hub/rd-analyzer --resultsDir /path/to/custom/resultsDir
33+
```
34+
35+
- `saveMode`
36+
37+
By default, the pipeline publishes the results in the `resultsDir` by copying the relevant output.
38+
39+
You can update this behavior by simply specifying the alternative such as `move` or `link` etc.
40+
41+
```
42+
nextflow run https://github.com/nextflow-hub/rd-analyzer --saveMode move
43+
```
44+
45+
For more information please refer [Nextflow documentation](https://www.nextflow.io/docs/latest/process.html#publishdir)
46+
47+
## Customizing the script
48+
49+
The sole purpose of process wrappers in `nextflow-hub` is to keep the code small, clean and hackable with some basic knowledge of `nextflow` scripting.
50+
51+
If you have specific requirements, you are encouraged to fork/clone and update your version to accomodate your needs.
52+
53+
54+
## Contribution
55+
56+
Contribution, in all forms, is most welcome!

main.nf

Lines changed: 26 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -1,31 +1,36 @@
11
#!/usr/bin/env nextflow
22

33
/*
4-
################
5-
params
6-
################
4+
#==============================================
5+
code documentation
6+
#==============================================
77
*/
88

99

10-
params.saveBy = 'copy'
11-
12-
10+
/*
11+
#==============================================
12+
params
13+
#==============================================
14+
*/
1315

16+
params.saveMode = 'copy'
17+
params.resultsDir = 'results/rdAnalyzer'
18+
params.filePattern = "./*_{R1,R2}.fastq.gz"
1419

15-
Channel.fromFilePairs("./*_{R1,R2}.p.fastq")
20+
Channel.fromFilePairs(params.filePattern)
1621
.into { ch_in_rdanalyzer }
1722

1823

24+
1925
/*
20-
###############
21-
RD-Analyzer
22-
###############
26+
#==============================================
27+
RD-analyzer
28+
#==============================================
2329
*/
2430

25-
2631
process rdAnalyzer {
2732
container 'abhi18av/rdanalyzer'
28-
publishDir 'results/rdAnalyzer', mode: params.saveBy
33+
publishDir params.resultsDir, mode: params.saveMode
2934

3035
input:
3136
set genomeFileName, file(genomeReads) from ch_in_rdanalyzer
@@ -35,9 +40,17 @@ process rdAnalyzer {
3540

3641

3742
script:
38-
genomeName= genomeFileName.toString().split("\\_")[0]
43+
genomeName = genomeFileName.toString().split("\\_")[0]
3944

4045
"""
4146
python /RD-Analyzer/RD-Analyzer.py -o ./${genomeName} ${genomeReads[0]} ${genomeReads[1]}
4247
"""
4348
}
49+
50+
51+
52+
/*
53+
#==============================================
54+
# extra
55+
#==============================================
56+
*/

0 commit comments

Comments
 (0)