Skip to content

Commit

Permalink
fix(coocurrence): do not process edges if not network could be formed
Browse files Browse the repository at this point in the history
  • Loading branch information
pbelmann committed Apr 24, 2024
1 parent e7c32d5 commit 533b22c
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion modules/cooccurrence/module.nf
Original file line number Diff line number Diff line change
Expand Up @@ -286,7 +286,7 @@ workflow _wBuildNetwork {
STABILITY_IDX = 1
NLAMBDA_IDX = 2
pBuildSpiecEasiNetwork(nlambda, abundance, gtdbConcatenated)
pBuildSpiecEasiNetwork.out.edges | max { it[STABILITY_IDX] } | set {bestEdges}
pBuildSpiecEasiNetwork.out.edges | max { it[STABILITY_IDX] } | filter(it -> it!=null) | set {bestEdges}

bestEdges | collectFile(storeDir: params.output + "/" + getOutput(params.runid, \
"network/spiec-easi/final", "")){ network -> ["nlambda_" + network[NLAMBDA_IDX] + "_" + file(network[NETWORK_IDX]).name, network[NETWORK_IDX].text]}
Expand Down

0 comments on commit 533b22c

Please sign in to comment.