Skip to content

Commit

Permalink
Merge pull request #284 from ggabernet/fix-reference-data
Browse files Browse the repository at this point in the history
Use cached reference data by default
  • Loading branch information
ggabernet authored Oct 23, 2023
2 parents 6845784 + f695dd8 commit daa1bbd
Show file tree
Hide file tree
Showing 8 changed files with 19 additions and 80 deletions.
3 changes: 0 additions & 3 deletions .github/workflows/ci_immcantation.yml
Original file line number Diff line number Diff line change
@@ -1,9 +1,6 @@
name: nf-core CI immcantation
# This workflow runs the pipeline with the minimal test dataset to check that it completes without any syntax errors
on:
push:
branches:
- dev
pull_request:
branches-ignore:
- "master"
Expand Down
3 changes: 2 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -225,7 +225,7 @@ and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0.
- [#114](https://github.com/nf-core/bcellmagic/pull/114): Added Bcellmagic html report.
- [#114](https://github.com/nf-core/bcellmagic/pull/114): Improved documentation on amplicon protocol support.
- [#115](https://github.com/nf-core/bcellmagic/pull/115): Improved output file structure and documentation.
- [#124](https://github.com/nf-core/bcellmagic/pull/124): Template update to nf-core tools v2.0.1
- [#124](https://github.com/nf-core/bcellmagic/pull/124): Template update to nf-core tools v2.0.1.

### `Fixed`

Expand All @@ -236,6 +236,7 @@ and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0.
- [#104](https://github.com/nf-core/bcellmagic/pull/104): Fix bug in pairseq barcode copy before consensus.
- [#114](https://github.com/nf-core/bcellmagic/pull/114): Analysis not restricted to Ig heavy chains.
- [#123](https://github.com/nf-core/bcellmagic/pull/123): Fix report Rmarkdown reading for running on AWS.
- [#284](https://github.com/nf-core/bcellmagic/pull/284): Use cached IMGT and IgBlast reference data by default.

### `Dependencies`

Expand Down
1 change: 1 addition & 0 deletions conf/test_fetchimgt.config
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@ params {
input = 'https://raw.githubusercontent.com/nf-core/test-datasets/airrflow/testdata-bcr/Metadata_test_airr.tsv'
cprimers = 'https://raw.githubusercontent.com/nf-core/test-datasets/airrflow/testdata-bcr/C_primers.fasta'
vprimers = 'https://raw.githubusercontent.com/nf-core/test-datasets/airrflow/testdata-bcr/V_primers.fasta'
fetch_imgt = true

mode = 'fastq'

Expand Down
2 changes: 1 addition & 1 deletion main.nf
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ if (params.help) {

// Validate input parameters
if (params.validate_params) {
validateParameters()
validateParameters()
}

WorkflowMain.initialise(workflow, params, log)
Expand Down
65 changes: 0 additions & 65 deletions modules/local/igblast/igblast_assigngenes.nf

This file was deleted.

5 changes: 3 additions & 2 deletions nextflow.config
Original file line number Diff line number Diff line change
Expand Up @@ -60,8 +60,9 @@ params {
// -----------------------
productive_only = true
reassign = true
igblast_base = null
imgtdb_base = null
igblast_base = 'https://raw.githubusercontent.com/nf-core/test-datasets/airrflow/database-cache/igblast_base.zip'
imgtdb_base = 'https://raw.githubusercontent.com/nf-core/test-datasets/airrflow/database-cache/imgtdb_base.zip'
fetch_imgt = false
save_databases = true

// -----------------------
Expand Down
11 changes: 8 additions & 3 deletions nextflow_schema.json
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@
},
"miairr": {
"type": "string",
"default": "bcellmagic/assets/reveal/mapping_MiAIRR_BioSample_v1.3.1.tsv",
"default": "airrflow/assets/reveal/mapping_MiAIRR_BioSample_v1.3.1.tsv",
"description": "Path to MiAIRR-BioSample mapping",
"fa_icon": "fas fa-table"
}
Expand Down Expand Up @@ -286,14 +286,19 @@
"imgtdb_base": {
"type": "string",
"description": "Path to the cached IMGT database.",
"help_text": "If it is not provided, the database will be newly downloaded.",
"help_text": "By default, we provide a pre-downloaded version of the IMGT database. It is also possible to provide a custom IMGT reference database. To fetch a fresh version of IMGT, set the `--fetch_imgt` parameter instead.",
"fa_icon": "fas fa-database"
},
"igblast_base": {
"type": "string",
"description": "Path to the cached igblast database.",
"help_text": "If it is not provided, the database will be newly downloaded.",
"help_text": "By default, we provide a pre-downloaded version of the IMGT database. It is also possible to provide a custom IMGT reference database. To fetch a fresh version of IMGT, set the `--fetch_imgt` parameter instead.",
"fa_icon": "fas fa-database"
},
"fetch_imgt": {
"type": "boolean",
"description": "Set this flag to fetch the IMGT reference data at runtime.",
"fa_icon": "fas fa-cloud-download-alt"
}
},
"fa_icon": "fas fa-edit"
Expand Down
9 changes: 4 additions & 5 deletions subworkflows/local/vdj_annotation.nf
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@ include { UNZIP_DB as UNZIP_IMGT } from '../../modules/local/unzip_db'
include { CHANGEO_ASSIGNGENES } from '../../modules/local/changeo/changeo_assigngenes'
include { CHANGEO_MAKEDB } from '../../modules/local/changeo/changeo_makedb'
include { CHANGEO_PARSEDB_SPLIT } from '../../modules/local/changeo/changeo_parsedb_split'
include { IGBLAST_ASSIGNGENES } from '../../modules/local/igblast/igblast_assigngenes'
// reveal
include { FILTER_QUALITY } from '../../modules/local/reveal/filter_quality'
include { FILTER_JUNCTION_MOD3 } from '../../modules/local/reveal/filter_junction_mod3'
Expand All @@ -25,7 +24,7 @@ workflow VDJ_ANNOTATION {
// TODO: this can take a long time, and the progress shows 0%. Would be
// nice to have some better progress reporting.
// And maybe run this as 2 separate steps, one for IMGT and one for IgBLAST?
if( params.igblast_base ){
if( !params.fetch_imgt ){
if (params.igblast_base.endsWith(".zip")) {
Channel.fromPath("${params.igblast_base}")
.ifEmpty{ error "IGBLAST DB not found: ${params.igblast_base}" }
Expand All @@ -40,7 +39,7 @@ workflow VDJ_ANNOTATION {
}
}

if( params.imgtdb_base ){
if( !params.fetch_imgt ){
if (params.imgtdb_base.endsWith(".zip")) {
Channel.fromPath("${params.imgtdb_base}")
.ifEmpty{ error "IMGTDB not found: ${params.imgtdb_base}" }
Expand All @@ -50,12 +49,12 @@ workflow VDJ_ANNOTATION {
ch_versions = ch_versions.mix(UNZIP_IMGT.out.versions.ifEmpty(null))
} else {
Channel.fromPath("${params.imgtdb_base}")
.ifEmpty { error "IMGTDB not found: ${params.imgtdb_base}" }
.ifEmpty { error "IMGT DB not found: ${params.imgtdb_base}" }
.set { ch_imgt }
}
}

if (!params.igblast_base | !params.imgtdb_base) {
if (params.fetch_imgt) {
FETCH_DATABASES()
ch_igblast = FETCH_DATABASES.out.igblast
ch_imgt = FETCH_DATABASES.out.imgt
Expand Down

0 comments on commit daa1bbd

Please sign in to comment.