McGranahanLab / CONIPHER-wrapper

8 stars 2 forks source link

Some datasets need the coin package, but it seems to have been "commented out" in CONIPHER #7

Closed stefmldk closed 7 months ago

stefmldk commented 7 months ago

When running the test dataset (CASE_ID: CRUKTOY001) no errors are encountered. However, I have three datasets and all three encounter the error: Error in pvalue(coin::independence_test(as.numeric(ccfs[order(cpn.states)]) ~ : could not find function "pvalue" Calls: conipher_run ... conipher_clustering -> clustering_postprocess -> copy.driven.clusterNEW

It can thus be concluded that the Coin package is required sometimes but not always. When it gets called, the above error is thrown. A quick fix is to simply add the following line to the R script used to run CONIPHER (run_conipher.R in my case):

require(coin)

I hope this will help until a new version gets released (fingers crossed). Thanks for the software - it seems extremely useful, but at this point I have yet to get it to run to completion with any other dataset but the test dataset. I hope development will continue to make this very useful software more robust.

Thanks and best wishes, Steffen

arihueb commented 7 months ago

Hi Steffen, this issue should be fixed in the latest version of CONIPHER (v2.2.0). Please try deleting and downloading the conda environment again.