Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix gtdb dirrectory input #583

Merged
merged 5 commits into from
Feb 12, 2024
Merged
Show file tree
Hide file tree
Changes from 4 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,8 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0

### `Fixed`

- [#582](https://github.com/nf-core/mag/pull/575) - Fix GTDB database input when directory supplied (fix by @jfy133)

### `Dependencies`

### `Deprecated`
Expand Down
2 changes: 2 additions & 0 deletions conf/test.config
Original file line number Diff line number Diff line change
Expand Up @@ -29,5 +29,7 @@ params {
busco_db = "https://busco-data.ezlab.org/v5/data/lineages/bacteria_odb10.2024-01-08.tar.gz"
busco_clean = true
skip_gtdbtk = true
gtdbtk_min_completeness = 0
skip_concoct = true

}
1 change: 1 addition & 0 deletions conf/test_adapterremoval.config
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,7 @@ params {
max_unbinned_contigs = 2
busco_db = "https://busco-data.ezlab.org/v5/data/lineages/bacteria_odb10.2024-01-08.tar.gz"
skip_gtdbtk = true
gtdbtk_min_completeness = 0
clip_tool = 'adapterremoval'
skip_concoct = true
bin_domain_classification = true
Expand Down
1 change: 1 addition & 0 deletions conf/test_ancient_dna.config
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,7 @@ params {
max_unbinned_contigs = 2
busco_db = "https://busco-data.ezlab.org/v5/data/lineages/bacteria_odb10.2024-01-08.tar.gz"
skip_gtdbtk = true
gtdbtk_min_completeness = 0
ancient_dna = true
binning_map_mode = 'own'
skip_spades = false
Expand Down
1 change: 1 addition & 0 deletions conf/test_bbnorm.config
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,7 @@ params {
busco_db = "https://busco-data.ezlab.org/v5/data/lineages/bacteria_odb10.2024-01-08.tar.gz"
busco_clean = true
skip_gtdbtk = true
gtdbtk_min_completeness = 0
bbnorm = true
coassemble_group = true
}
1 change: 1 addition & 0 deletions conf/test_binrefinement.config
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,7 @@ params {
max_unbinned_contigs = 2
busco_db = "https://busco-data.ezlab.org/v5/data/lineages/bacteria_odb10.2024-01-08.tar.gz"
skip_gtdbtk = true
gtdbtk_min_completeness = 0
refine_bins_dastool = true
refine_bins_dastool_threshold = 0
// TODO not using 'both' until #489 merged
Expand Down
1 change: 1 addition & 0 deletions conf/test_busco_auto.config
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@ params {
min_length_unbinned_contigs = 1
max_unbinned_contigs = 2
skip_gtdbtk = true
gtdbtk_min_completeness = 0
skip_prokka = true
skip_prodigal = true
skip_quast = true
Expand Down
1 change: 1 addition & 0 deletions conf/test_host_rm.config
Original file line number Diff line number Diff line change
Expand Up @@ -26,5 +26,6 @@ params {
max_unbinned_contigs = 2
busco_db = "https://busco-data.ezlab.org/v5/data/lineages/bacteria_odb10.2024-01-08.tar.gz"
skip_gtdbtk = true
gtdbtk_min_completeness = 0
skip_concoct = true
}
1 change: 1 addition & 0 deletions conf/test_hybrid.config
Original file line number Diff line number Diff line change
Expand Up @@ -25,5 +25,6 @@ params {
max_unbinned_contigs = 2
busco_db = "https://busco-data.ezlab.org/v5/data/lineages/bacteria_odb10.2024-01-08.tar.gz"
skip_gtdbtk = true
gtdbtk_min_completeness = 0
skip_concoct = true
}
1 change: 1 addition & 0 deletions conf/test_hybrid_host_rm.config
Original file line number Diff line number Diff line change
Expand Up @@ -27,4 +27,5 @@ params {
skip_binqc = true
skip_concoct = true
skip_gtdbtk = true
gtdbtk_min_completeness = 0
}
1 change: 1 addition & 0 deletions conf/test_nothing.config
Original file line number Diff line number Diff line change
Expand Up @@ -39,5 +39,6 @@ params {
skip_prokka = true
skip_binqc = true
skip_gtdbtk = true
gtdbtk_min_completeness = 0
skip_concoct = true
}
1 change: 1 addition & 0 deletions conf/test_virus_identification.config
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,7 @@ params {
reads_minlength = 150
coassemble_group = true
skip_gtdbtk = true
gtdbtk_min_completeness = 0
skip_binning = true
skip_prokka = true
skip_spades = true
Expand Down
15 changes: 9 additions & 6 deletions subworkflows/local/gtdbtk.nf
Original file line number Diff line number Diff line change
Expand Up @@ -66,13 +66,16 @@ workflow GTDBTK {
// Expects to be tar.gz!
ch_db_for_gtdbtk = GTDBTK_DB_PREPARATION ( gtdb ).db
} else if ( gtdb.isDirectory() ) {
// Make up meta id to match expected channel cardinality for GTDBTK
// The classifywf module expects a list of the _contents_ of the GTDB
// database, not just the directory itself (I'm not sure why). But
// for now we generate this list before putting into a channel,
// then grouping again to pass to the module.
// Then make up meta id to match expected channel cardinality for GTDBTK
gtdb_dir = gtdb.listFiles()
ch_db_for_gtdbtk = Channel
.of(gtdb)
.map{
[ it.toString().split('/').last(), it ]
}
.collect()
.of(gtdb_dir)
.map{['gtdb', it]}
.groupTuple()
} else {
error("Unsupported object given to --gtdb, database must be supplied as either a directory or a .tar.gz file!")
}
Expand Down
Loading