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

feat: Add feature dispersion script #203

Merged
merged 9 commits into from
Jul 23, 2024
Merged
Prev Previous commit
Next Next commit
fix: Improve check when there is no profile
jvfe committed Jul 23, 2024
commit 86a690299e5d48f24a92e0663e8bffa90dc14843
4 changes: 2 additions & 2 deletions subworkflows/local/annotation.nf
Original file line number Diff line number Diff line change
@@ -326,7 +326,7 @@ workflow ANNOTATE_ASSEMBLIES {
ch_multiqc_files = ch_multiqc_files.mix(DIAMOND_BLAST_ICEBERG.out.log.collect{it[1]}.ifEmpty([]))
}

profile = []
profile = Channel.empty()
if (tools_to_run.contains('report')) {
needed_for_report = ['vfdb', 'rgi', 'mobsuite']
if (!params.use_prokka && needed_for_report.every { it in tools_to_run }) {
@@ -353,7 +353,7 @@ workflow ANNOTATE_ASSEMBLIES {
)
}

profile = (params.skip_profile_creation) ? [] : CREATE_REPORT.out.profile
profile = (params.skip_profile_creation) ? profile : CREATE_REPORT.out.profile
}

emit:
4 changes: 2 additions & 2 deletions subworkflows/local/phylo.nf
Original file line number Diff line number Diff line change
@@ -26,6 +26,7 @@ workflow PHYLOGENOMICS{
feature_profile
main:
ch_software_versions = Channel.empty()
ch_feature_profile = feature_profile.ifEmpty(false)

gffs
.map { meta, path -> [meta.id, path.getName()] }
@@ -119,7 +120,7 @@ workflow PHYLOGENOMICS{
ch_software_versions = ch_software_versions.mix(IQTREE.out.versions.ifEmpty(null))
}

if (feature_profile) {
if (ch_feature_profile != false) {
if (params.feature_dispersion_columns) {
FEATURE_DISPERSION(
core_tree,
@@ -130,7 +131,6 @@ workflow PHYLOGENOMICS{
} else {
FEATURE_DISPERSION(core_tree, feature_profile, [], [])
}

}

emit:
2 changes: 1 addition & 1 deletion workflows/arete.nf
Original file line number Diff line number Diff line change
@@ -613,7 +613,7 @@ workflow PHYLO {
PHYLO_INPUT_CHECK.out.genomes.set { gffs }

////////////////////////// PANGENOME /////////////////////////////////////
PHYLOGENOMICS(gffs, use_full_alignment, use_fasttree, [])
PHYLOGENOMICS(gffs, use_full_alignment, use_fasttree, Channel.empty())
ch_software_versions = ch_software_versions.mix(PHYLOGENOMICS.out.phylo_software)