Skip to content

Commit

Permalink
Merge pull request #6 from icgc-argo-workflows/update_stage_input
Browse files Browse the repository at this point in the history
Update stage input
  • Loading branch information
lindaxiang authored Apr 23, 2024
2 parents 68610b3 + aeed6c4 commit f7164f4
Show file tree
Hide file tree
Showing 43 changed files with 2,327 additions and 237 deletions.
17 changes: 14 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,15 +11,26 @@ The pipeline is built using [Nextflow](https://www.nextflow.io), a workflow tool

2. Install [`Docker`](https://docs.docker.com/engine/installation/).

3. Download the pipeline and test it on a minimal dataset with a single command:
3. Test the workflow running in `Local` mode on a minimal dataset with a single command:

```bash
nextflow run icgc-argo-workflows/prealnqc -profile test,standard
```

4. Start running your own analysis!
4. Test the workflow running in `RDPC` mode with a single command if you have access to `RDPC-QA` env and have your valid api_token available:
```bash
nextflow run icgc-argo-workflows/prealnqc --input samplesheet.csv --outdir <OUTDIR> -profile standard
nextflow run icgc-argo-workflows/prealnqc -profile rdpc_qa,test_rdpc_qa,standard --api_token <YOUR_API_TOKEN>
```

5. Start running your own analysis!

If you are getting the input data from & sending output data to ICGC-ARGO data center, and you have valid api_token, you can run the workflow with:
```bash
nextflow run icgc-argo-workflows/prealnqc -profile <rdpc,rdpc_qa,rdpc_dev>,standard --api_token <YOUR_API_TOKEN> --study_id <STUDY_ID> --analysis_ids <ANALYSIS_IDS>
```
Otherwise, you can provide the path to the input data in `samplesheet.csv` and run the workflow with:
```bash
nextflow run icgc-argo-workflows/prealnqc -profile standard --input samplesheet.csv --outdir <OUTDIR>
```

## Pipeline summary
Expand Down
8 changes: 4 additions & 4 deletions assets/tests/csv/sample_sheet.csv
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
sample,lane,fastq_1,fastq_2
TEST,C0HVY.2,https://raw.githubusercontent.com/icgc-argo-workflows/dna-seq-processing-wfs/main/tests/data/C0HVY.2_r1.fq.gz,https://raw.githubusercontent.com/icgc-argo-workflows/dna-seq-processing-wfs/main/tests/data/C0HVY.2_r2.fq.gz
TEST,D0RE2.1,https://raw.githubusercontent.com/icgc-argo-workflows/dna-seq-processing-wfs/main/tests/data/D0RE2.1_r1.fq.gz,https://raw.githubusercontent.com/icgc-argo-workflows/dna-seq-processing-wfs/main/tests/data/D0RE2.1_r2.fq.gz
TEST,D0RH0.2,https://raw.githubusercontent.com/icgc-argo-workflows/dna-seq-processing-wfs/main/tests/data/D0RH0.2_r1.fq.gz,https://raw.githubusercontent.com/icgc-argo-workflows/dna-seq-processing-wfs/main/tests/data/D0RH0.2_r2.fq.gz
sample,lane,fastq_1,fastq_2,read_group_count,single_end
TEST,C0HVY.2,https://raw.githubusercontent.com/icgc-argo-workflows/dna-seq-processing-wfs/main/tests/data/C0HVY.2_r1.fq.gz,https://raw.githubusercontent.com/icgc-argo-workflows/dna-seq-processing-wfs/main/tests/data/C0HVY.2_r2.fq.gz,3,False
TEST,D0RE2.1,https://raw.githubusercontent.com/icgc-argo-workflows/dna-seq-processing-wfs/main/tests/data/D0RE2.1_r1.fq.gz,https://raw.githubusercontent.com/icgc-argo-workflows/dna-seq-processing-wfs/main/tests/data/D0RE2.1_r2.fq.gz,3,False
TEST,D0RH0.2,https://raw.githubusercontent.com/icgc-argo-workflows/dna-seq-processing-wfs/main/tests/data/D0RH0.2_r1.fq.gz,https://raw.githubusercontent.com/icgc-argo-workflows/dna-seq-processing-wfs/main/tests/data/D0RH0.2_r2.fq.gz,3,False
6 changes: 6 additions & 0 deletions conf/modules.config
Original file line number Diff line number Diff line change
Expand Up @@ -32,5 +32,11 @@ process {
]
}

withName: 'SONG.*|SCORE.*' {
ext.prefix = ""
ext.api_download_token = params.api_download_token ?: params.api_token
ext.api_upload_token = params.api_upload_token ?: params.api_token
}

}

2 changes: 1 addition & 1 deletion conf/test.config
Original file line number Diff line number Diff line change
Expand Up @@ -21,5 +21,5 @@ params {

// input data
local_mode = true
input = 'assets/tests/csv/sample_sheet.csv'
input = "${projectDir}/assets/tests/csv/sample_sheet.csv"
}
2 changes: 1 addition & 1 deletion conf/test_rdpc_qa.config
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,6 @@ params {
// Input data for rdpc mode
local_mode = false
study_id = "TEST-QA"
analysis_ids = "875ef550-e536-4456-9ef5-50e5362456df"
analysis_ids = "875ef550-e536-4456-9ef5-50e5362456df,9bb63c49-86c8-44e2-b63c-4986c804e274"

}
41 changes: 28 additions & 13 deletions modules.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,9 +5,14 @@
"https://github.com/icgc-argo-workflows/argo-modules.git": {
"modules": {
"icgc-argo-workflows": {
"checkinput": {
"branch": "main",
"git_sha": "e1f2b946b457eac191c0fa97ae1d159a15874c6b",
"installed_by": ["stage_input"]
},
"cleanup": {
"branch": "main",
"git_sha": "517b0a82ed697564891e18ff5dba35a70f9da225",
"git_sha": "8d014598ef81d65bece3684bd67aef7afae2cda9",
"installed_by": ["modules"]
},
"payload/qcmetrics": {
Expand All @@ -22,38 +27,48 @@
},
"prep/sample": {
"branch": "main",
"git_sha": "4ae27e792724f69f7211db10bcd9e3373abc1837",
"git_sha": "dbd4c7b18c86be15f2ca341085d90c0488545d53",
"installed_by": ["stage_input"]
},
"samtools/index": {
"branch": "main",
"git_sha": "3f8cbdb457ed1b642b4f9b079850f2a92da9fcc0",
"installed_by": ["modules", "stage_input"]
},
"score/download": {
"branch": "main",
"git_sha": "f5e2d027a4f886a8702f5c4be825801513b578d0",
"git_sha": "19ee48fdf1672ef9723e3093531be7ddea3e27ec",
"installed_by": ["song_score_download"]
},
"score/upload": {
"branch": "main",
"git_sha": "f5e2d027a4f886a8702f5c4be825801513b578d0",
"git_sha": "19ee48fdf1672ef9723e3093531be7ddea3e27ec",
"installed_by": ["song_score_upload"]
},
"song/get": {
"branch": "main",
"git_sha": "f5e2d027a4f886a8702f5c4be825801513b578d0",
"git_sha": "19ee48fdf1672ef9723e3093531be7ddea3e27ec",
"installed_by": ["song_score_download"]
},
"song/manifest": {
"branch": "main",
"git_sha": "f5e2d027a4f886a8702f5c4be825801513b578d0",
"git_sha": "19ee48fdf1672ef9723e3093531be7ddea3e27ec",
"installed_by": ["song_score_upload"]
},
"song/publish": {
"branch": "main",
"git_sha": "f5e2d027a4f886a8702f5c4be825801513b578d0",
"git_sha": "19ee48fdf1672ef9723e3093531be7ddea3e27ec",
"installed_by": ["song_score_upload"]
},
"song/submit": {
"branch": "main",
"git_sha": "f5e2d027a4f886a8702f5c4be825801513b578d0",
"git_sha": "19ee48fdf1672ef9723e3093531be7ddea3e27ec",
"installed_by": ["song_score_upload"]
},
"tabix/tabix": {
"branch": "main",
"git_sha": "e1f2b946b457eac191c0fa97ae1d159a15874c6b",
"installed_by": ["stage_input"]
}
}
},
Expand All @@ -71,7 +86,7 @@
},
"stage_input": {
"branch": "main",
"git_sha": "4ae27e792724f69f7211db10bcd9e3373abc1837",
"git_sha": "e9dfe346ae3334973f406be3051a1091cad1dca6",
"installed_by": ["subworkflows"]
}
}
Expand All @@ -82,22 +97,22 @@
"nf-core": {
"custom/dumpsoftwareversions": {
"branch": "master",
"git_sha": "c8e35eb2055c099720a75538d1b8adb3fb5a464c",
"git_sha": "8ec825f465b9c17f9d83000022995b4f7de6fe93",
"installed_by": ["modules"]
},
"cutadapt": {
"branch": "master",
"git_sha": "c8e35eb2055c099720a75538d1b8adb3fb5a464c",
"git_sha": "07881e42938b4f0070e864b45d424b01745bc3a4",
"installed_by": ["modules"]
},
"fastqc": {
"branch": "master",
"git_sha": "c8e35eb2055c099720a75538d1b8adb3fb5a464c",
"git_sha": "c9488585ce7bd35ccd2a30faa2371454c8112fb9",
"installed_by": ["modules"]
},
"multiqc": {
"branch": "master",
"git_sha": "c8e35eb2055c099720a75538d1b8adb3fb5a464c",
"git_sha": "8ec825f465b9c17f9d83000022995b4f7de6fe93",
"installed_by": ["modules"]
}
}
Expand Down
56 changes: 56 additions & 0 deletions modules/icgc-argo-workflows/checkinput/main.nf
Original file line number Diff line number Diff line change
@@ -0,0 +1,56 @@
process CHECKINPUT {
tag "$samplesheet"
label 'process_single'

conda "conda-forge::python=3.8.3"
container "${ workflow.containerEngine == 'singularity' && !task.ext.singularity_pull_docker_container ?
'https://depot.galaxyproject.org/singularity/python:3.8.3' :
'quay.io/biocontainers/python:3.8.3' }"

input:
path samplesheet
val workflow_name

output:
path 'samplesheet.valid.csv', emit: csv
path "versions.yml", emit: versions

when:
task.ext.when == null || task.ext.when

script:
"""
case '$workflow_name' in
'Pre Alignment QC')
echo $workflow_name detected;
prealnqc.py \\
$samplesheet \\
samplesheet.valid.csv
;;
'DNA Alignment QC')
dnaalnqc.py \\
$samplesheet \\
samplesheet.valid.csv
;;
'DNA Alignment')
dnaaln.py \\
$samplesheet \\
samplesheet.valid.csv
;;
'Germline Variant Call')
germlinevar.py \\
$samplesheet \\
samplesheet.valid.csv
;;
*)
echo -n "Unknown workflow"
exit 1
;;
esac
cat <<-END_VERSIONS > versions.yml
"${task.process}":
python: \$(python --version | sed 's/Python //g')
END_VERSIONS
"""
}
43 changes: 43 additions & 0 deletions modules/icgc-argo-workflows/checkinput/meta.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,43 @@
---
# yaml-language-server: $schema=https://raw.githubusercontent.com/nf-core/modules/master/modules/yaml-schema.json
name: "checkinput"
## TODO nf-core: Add a description of the module and list keywords
description: write your description here
keywords:
- sort
- example
- genomics
tools:
- "checkinput":
## TODO nf-core: Add a description and other details for the software below
description: ""
homepage: ""
documentation: ""
tool_dev_url: ""
doi: ""
licence: ""

## TODO nf-core: Add a description of all of the variables used as input
input:
#
## TODO nf-core: Delete / customise this example input
- bam:
type: file
description: Sorted BAM/CRAM/SAM file
pattern: "*.{bam,cram,sam}"

## TODO nf-core: Add a description of all of the variables used as output
output:
#
- versions:
type: file
description: File containing software versions
pattern: "versions.yml"
## TODO nf-core: Delete / customise this example output
- bam:
type: file
description: Sorted BAM/CRAM/SAM file
pattern: "*.{bam,cram,sam}"

authors:
- "@edsu7"
Loading

0 comments on commit f7164f4

Please sign in to comment.