Skip to content

Commit

Permalink
Merge pull request #673 from maxibor/dev
Browse files Browse the repository at this point in the history
Fix kraken db loading fromPath
  • Loading branch information
apeltzer authored Feb 3, 2021
2 parents 85dbda0 + d89b4cc commit cc3ff23
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 2 deletions.
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@ and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0.
- [#631](https://github.com/nf-core/eager/issues/631): - Update minimum Nextflow version to 20.07.1, due to unfortunate bug in Nextflow 20.04.1 causing eager to crash if patch pulled
- Made MultiQC crash behaviour stricter when dealing with large datasets, as reported by @ashildv
- Added note to documentation that when using `--skip_collapse` this will use _paired-end_ alignment mode with mappers when using PE data. `
- [#673](https://github.com/nf-core/eager/pull/673): Fix Kraken database loading when loading from directory instead of compressed file.

### `Dependencies`

Expand Down
6 changes: 4 additions & 2 deletions main.nf
Original file line number Diff line number Diff line change
Expand Up @@ -3108,14 +3108,16 @@ if (params.run_metagenomic_screening && params.database.endsWith(".tar.gz") && p
path(dbname) into ch_krakendb

script:
dbname = params.database.tokenize("/")[-1].tokenize(".")[0]
dbname = ckdb.toString() - '.tar.gz'
"""
tar xvzf $ckdb
mkdir -p $dbname
mv *.k2d $dbname || echo "nothing to do"
"""
}

} else if (! params.database.endsWith(".tar.gz") && params.run_metagenomic_screening && params.metagenomic_tool == 'kraken') {
ch_krakendb = path(params.database)
ch_krakendb = Channel.fromPath(params.database).first()
} else {
ch_krakendb = Channel.empty()
}
Expand Down

0 comments on commit cc3ff23

Please sign in to comment.