DataSlingers / IMPACC

IMPACC R package
3 stars 0 forks source link

Error: IMPACC_cluster() not found #1

Closed jarbet closed 1 year ago

jarbet commented 1 year ago

Although the help page ?IMPACC_cluster works, when I try to use IMPACC_cluster() I get the following error:

IMPACC_cluster() Error in IMPACC_cluster() : could not find function "IMPACC_cluster"

Lastly, is the purpose of this function such that I can run IMPACC() only one time, and then use IMPACC_cluster() to quickly get results for different values of K? I think in theory the main IMPACC algorithm only needs to be run once, and then you should be able to quickly post-process results to get cluster assignments for varying K, right?

michaelweylandt commented 1 year ago

Hi @jarbet,

@luqingan is the author of that code: hopefully she can help clarify it.

luqingan commented 1 year ago

Hi @jarbet,

Thanks for the inquiry. The issue should be resolved. And yes, IMPACC only needs to be run once. You can construct clustering assignments using the IMPACC_cluster() function with ConsensusMatrix generated by IMPACC() and K of your choice. Please let me know if you have any questions.

-Luqin

jarbet commented 1 year ago

Hi @jarbet,

Thanks for the inquiry. The issue should be resolved. And yes, IMPACC only needs to be run once. You can construct clustering assignments using the IMPACC_cluster() function with ConsensusMatrix generated by IMPACC() and K of your choice. Please let me know if you have any questions.

-Luqin

Thanks Luqin! I see it works now if you pass impacc.fit$ConsensusMatrix to the css argument. At first I was not sure what the css argument meant, perhaps it would be good to specify in the documentation that this in the ConsensusMatrix from IMPACC/MPCC, or add a working example?

data(mtcars);
set.seed(1234);
impacc = IMPACC(
    d=t(mtcars),
    reps = 100,
    verbose = FALSE,
    adaptiveFeature = FALSE
    )
IMPACC_cluster(
    css = impacc$ConsensusMatrix,
    K = 3
    );

Also, I notice the yan dataset no longer exists:

> library(IMPACC)
> data(yan)
Warning message:
In data(yan) : data set ‘yan’ not found
luqingan commented 1 year ago

Hi @jarbet,

Thanks for the comments! I added the yan dataset back and a tutorial to the homepage. And the css argument in IMPACC_cluster is changed to ConsensusMatrix to avoid confusion.

Cheers, Luqin

bulaciox commented 1 year ago

hi @luqingan , I can't find the yan dataset to be able to run the example, could you tell me where to find it?

luqingan commented 1 year ago

hi @bulaciox ,

Sorry, there were some issues with data on iCloud. I just updated it and should be able to access the data by data(yan) now.

jarbet commented 1 year ago

hi @bulaciox ,

Sorry, there were some issues with data on iCloud. I just updated it and should be able to access the data by data(yan) now.

After installing the latest version and restarting my R session, data(yan) works now. However, now IMPACC_cluster is missing again:

library(IMPACC);

data(yan);
impacc <- IMPACC(d=yan$sc_cnt,reps = 100,verbose=FALSE);
clus <- IMPACC_cluster(ConsensusMatrix = impacc$ConsensusMatrix,K = 3);

Error in IMPACC_cluster(ConsensusMatrix = impacc$ConsensusMatrix, K = 3) : could not find function "IMPACC_cluster"

luqingan commented 1 year ago

hi @jarbet , i'm so sorry for the issues, it should work now.

jarbet commented 1 year ago

hi @jarbet , i'm so sorry for the issues, it should work now.

Thanks! The tutorial works for me now.

michaelweylandt commented 1 year ago

Hi @jarbet and @luqingan: Thank you for working this out!

@jarbet: I'm glad you're trying out IMPACC and I hope it works well for you. @luqingan has gotten some fantastic results with it and we're excited to see it perform "in the field." Let us know if you run into any more trouble or if we can be of further help.

Cheers!

jarbet commented 1 year ago

Hi @jarbet and @luqingan: Thank you for working this out!

@jarbet: I'm glad you're trying out IMPACC and I hope it works well for you. @luqingan has gotten some fantastic results with it and we're excited to see it perform "in the field." Let us know if you run into any more trouble or if we can be of further help.

Cheers!

Hi @michaelweylandt: thanks, I am enjoying using IMPACC so far as it is significantly faster than other consensus clustering packages I've tried, and it is giving me good results so far. I actually found out about IMPACC from Dr. Genevera Allen's talk at the Lange Symposium, which was a fantastic talk!

Cheers!

jarbet commented 1 year ago

Hi @luqingan,

Just a minor issue but wanted to let you know that the help page for IMPACC_cluster still shows the css argument, but this argument was changed to ConsensusMatrix. The github README tutorial code works for me, I think the help page just needs to update the argument name.

Thanks