-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #8 from ICGC-TCGA-PanCancer/[email protected]
[release] [email protected]
- Loading branch information
Showing
22 changed files
with
466 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,69 @@ | ||
*.py[cod] | ||
|
||
# C extensions | ||
*.so | ||
|
||
# Packages | ||
*.egg | ||
*.egg-info | ||
dist | ||
build | ||
eggs | ||
.eggs | ||
parts | ||
bin | ||
var | ||
sdist | ||
develop-eggs | ||
.installed.cfg | ||
lib | ||
lib64 | ||
venv*/ | ||
pyvenv*/ | ||
|
||
# Installer logs | ||
pip-log.txt | ||
|
||
# Unit test / coverage reports | ||
.coverage | ||
.tox | ||
.coverage.* | ||
nosetests.xml | ||
coverage.xml | ||
htmlcov | ||
|
||
# Translations | ||
*.mo | ||
|
||
# Mr Developer | ||
.mr.developer.cfg | ||
.project | ||
.pydevproject | ||
.idea | ||
*.iml | ||
*.komodoproject | ||
|
||
# Complexity | ||
output/*.html | ||
output/*/index.html | ||
|
||
# Sphinx | ||
docs/_build | ||
|
||
.DS_Store | ||
*~ | ||
.*.sw[po] | ||
.build | ||
.ve | ||
.env | ||
.cache | ||
.pytest | ||
.bootstrap | ||
.appveyor.token | ||
*.bak | ||
*.log | ||
.vscode | ||
.python-version | ||
.nextflow* | ||
work | ||
outdir |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,32 @@ | ||
#!/usr/bin/env nextflow | ||
|
||
nextflow.enable.dsl = 2 | ||
version = '0.1.0' // package version | ||
|
||
// universal params go here, change default value as needed | ||
params.container_version = "" | ||
params.cpus = 1 | ||
params.mem = 1 // GB | ||
params.publish_dir = "" // set to empty string will disable publishDir | ||
|
||
// tool specific parmas go here, add / change as needed | ||
params.input_file = "" | ||
params.cleanup = true | ||
|
||
include { demoFastqc } from './wfpr_modules/github.com/icgc-tcga-pancancer/awesome-wfpkgs1/[email protected]/demo-fastqc' | ||
include { cleanupWorkdir; getSecondaryFiles; getBwaSecondaryFiles } from './wfpr_modules/github.com/icgc-argo/demo-wfpkgs/[email protected]/main.nf' | ||
|
||
|
||
// please update workflow code as needed | ||
workflow DemoFastqcWf { | ||
take: // update as needed | ||
input_file | ||
|
||
|
||
main: // update as needed | ||
demoFastqc(input_file) | ||
if (params.cleanup) { cleanupWorkdir(demoFastqc.out, true) } | ||
|
||
emit: // update as needed | ||
output_file = demoFastqc.out.output_file | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,30 @@ | ||
#!/usr/bin/env nextflow | ||
|
||
/* | ||
This is an example process as a local module. Local module is optional, in general | ||
is discouraged. A process can pentially be shareable in different workflows should | ||
be developed in an independently publishable package, so that it can be imported | ||
by anyone into any workflow. | ||
*/ | ||
|
||
nextflow.enable.dsl = 2 | ||
|
||
params.input_file = "" | ||
params.publish_dir = "" | ||
|
||
|
||
process demoCopyFile { | ||
publishDir "${params.publish_dir}/${task.process.replaceAll(':', '_')}", mode: "copy", enabled: "${params.publish_dir ? true : ''}" | ||
|
||
input: | ||
path input_file | ||
|
||
output: | ||
path "output_dir/*", emit: output_file | ||
|
||
script: | ||
""" | ||
mkdir output_dir | ||
cp ${input_file} output_dir/ | ||
""" | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
docker { | ||
enabled = true | ||
runOptions = '-u \$(id -u):\$(id -g)' | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,33 @@ | ||
{ | ||
"name": "demo-fastqc-wf", | ||
"version": "0.1.0", | ||
"description": "FastQC workflow", | ||
"main": "demo-fastqc-wf", | ||
"scripts": { | ||
"test": "wfpm test" | ||
}, | ||
"deprecated": false, | ||
"keywords": [ | ||
"bioinformatics", | ||
"seq", | ||
"qc metrics" | ||
], | ||
"repository": { | ||
"type": "git", | ||
"url": "https://github.com/icgc-tcga-pancancer/awesome-wfpkgs2.git" | ||
}, | ||
"dependencies": [ | ||
"github.com/icgc-argo/demo-wfpkgs/[email protected]", | ||
"github.com/icgc-tcga-pancancer/awesome-wfpkgs1/[email protected]" | ||
], | ||
"devDependencies": [], | ||
"contributors": [ | ||
{ | ||
"name": "Junjun Zhang", | ||
"email": "[email protected]" | ||
} | ||
], | ||
"license": "MIT", | ||
"bugReport": "https://github.com/icgc-tcga-pancancer/awesome-wfpkgs2/issues", | ||
"homepage": "https://github.com/icgc-tcga-pancancer/awesome-wfpkgs2#readme" | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,71 @@ | ||
#!/usr/bin/env nextflow | ||
|
||
/* | ||
This is an auto-generated checker workflow to test the generated main template workflow, it's | ||
meant to illustrate how testing works. Please update to suit your own needs. | ||
*/ | ||
|
||
nextflow.enable.dsl = 2 | ||
version = '0.1.0' // package version | ||
|
||
// universal params | ||
params.publish_dir = "" | ||
params.container_version = "" | ||
|
||
// tool specific parmas go here, add / change as needed | ||
params.input_file = "" | ||
params.expected_output = "" | ||
|
||
include { DemoFastqcWf } from '../demo-fastqc-wf' params(['cleanup': false]) | ||
// include section starts | ||
// include section ends | ||
|
||
Channel | ||
.fromPath(params.input_file, checkIfExists: true) | ||
.set { input_file } | ||
|
||
|
||
process file_smart_diff { | ||
input: | ||
path output_file | ||
path expected_file | ||
|
||
output: | ||
stdout() | ||
|
||
script: | ||
""" | ||
# Note: this is only for demo purpose, please write your own 'diff' according to your own needs. | ||
# remove date field before comparison eg, <div id="header_filename">Tue 19 Jan 2021<br/>test_rg_3.bam</div> | ||
# sed -e 's#"header_filename">.*<br/>test_rg_3.bam#"header_filename"><br/>test_rg_3.bam</div>#' | ||
diff <( cat ${output_file} | sed -e 's#"header_filename">.*<br/>#"header_filename"><br/>#' ) \ | ||
<( ([[ '${expected_file}' == *.gz ]] && gunzip -c ${expected_file} || cat ${expected_file}) | sed -e 's#"header_filename">.*<br/>#"header_filename"><br/>#' ) \ | ||
&& ( echo "Test PASSED" && exit 0 ) || ( echo "Test FAILED, output file mismatch." && exit 1 ) | ||
""" | ||
} | ||
|
||
|
||
workflow checker { | ||
take: | ||
input_file | ||
expected_output | ||
|
||
main: | ||
DemoFastqcWf( | ||
input_file | ||
) | ||
|
||
file_smart_diff( | ||
DemoFastqcWf.out.output_file, | ||
expected_output | ||
) | ||
} | ||
|
||
|
||
workflow { | ||
checker( | ||
file(params.input_file), | ||
file(params.expected_output) | ||
) | ||
} |
Binary file not shown.
Binary file not shown.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
This folder contains tiny data files for testing. |
Binary file not shown.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
includeConfig '../nextflow.config' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
{ | ||
"input_file": "input/test_rg_3.bam", | ||
"expected_output": "expected/expected.test_rg_3_fastqc.out.gz", | ||
"publish_dir": "outdir", | ||
"cpus": 1, | ||
"mem": 0.5 | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
../wfpr_modules |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
../wfpr_modules |
5 changes: 5 additions & 0 deletions
5
wfpr_modules/github.com/icgc-tcga-pancancer/awesome-wfpkgs1/[email protected]/.dockerignore
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
.gitignore | ||
.nextflow* | ||
tests | ||
work | ||
outdir |
69 changes: 69 additions & 0 deletions
69
wfpr_modules/github.com/icgc-tcga-pancancer/awesome-wfpkgs1/[email protected]/.gitignore
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,69 @@ | ||
*.py[cod] | ||
|
||
# C extensions | ||
*.so | ||
|
||
# Packages | ||
*.egg | ||
*.egg-info | ||
dist | ||
build | ||
eggs | ||
.eggs | ||
parts | ||
bin | ||
var | ||
sdist | ||
develop-eggs | ||
.installed.cfg | ||
lib | ||
lib64 | ||
venv*/ | ||
pyvenv*/ | ||
|
||
# Installer logs | ||
pip-log.txt | ||
|
||
# Unit test / coverage reports | ||
.coverage | ||
.tox | ||
.coverage.* | ||
nosetests.xml | ||
coverage.xml | ||
htmlcov | ||
|
||
# Translations | ||
*.mo | ||
|
||
# Mr Developer | ||
.mr.developer.cfg | ||
.project | ||
.pydevproject | ||
.idea | ||
*.iml | ||
*.komodoproject | ||
|
||
# Complexity | ||
output/*.html | ||
output/*/index.html | ||
|
||
# Sphinx | ||
docs/_build | ||
|
||
.DS_Store | ||
*~ | ||
.*.sw[po] | ||
.build | ||
.ve | ||
.env | ||
.cache | ||
.pytest | ||
.bootstrap | ||
.appveyor.token | ||
*.bak | ||
*.log | ||
.vscode | ||
.python-version | ||
.nextflow* | ||
work | ||
outdir |
9 changes: 9 additions & 0 deletions
9
wfpr_modules/github.com/icgc-tcga-pancancer/awesome-wfpkgs1/[email protected]/Dockerfile
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
FROM pegi3s/fastqc:0.11.9 | ||
|
||
LABEL org.opencontainers.image.source https://github.com/icgc-tcga-pancancer/awesome-wfpkgs1 | ||
|
||
ENV PATH="/tools:${PATH}" | ||
|
||
COPY *.py /tools/ | ||
|
||
CMD ["/bin/bash"] |
Oops, something went wrong.