SofieVG/FlowSOM

FlowSOM functions cannot be called directly by user

nruthen opened this issue · 3 comments

Hi,

I having been working through a FlowSOM workflow and I found that a few of the documented functions cannot be called by the user. I checked the FlowSOM Namespace file on Github and found that the functions such as AddFlowFrame, computeBackgroundColor, Dist.MST, and MapDataToCodes are not exported in the Namespace file. This prevents R from finding these functions even if the package is loaded. I would like to be able to use the MapDataToCodes so that I can map new sample data onto an existing plot. Below is the link to an article that I found to be helpful while trying to identify the problem.

http://alyssafrazee.com/2014/01/21/namespaces.html

I would greatly appreciate any help.
Thank you!

SamGG commented

Hi,
If a function is not exported, this means usually that the developer didn't want the end user to use it. Of course, there could also be some mistakes. Could you please give a simple and reproducible code in to order to clearly highlight the use of these functions in a standard workflow?
Best,
Samuel, a user, not the developer

Hi,

Indeed, typically, I would not expect the end user to use the functions you mention. They might not be fully documented and are therefore not exported by the package. If you are really sure what you are doing and you would want to use them, you could access them by using FlowSOM:::functionName() (3 colons instead of the typical 2), but this is in general not recommended.

If your use case is to map new data in a figure, I would recommend using the NewData() function. This function will take a flowframe, apply the same preprocessing steps as in your original FlowSOM call (if any was applied) and then map the data. Returned is a new fsom object with cluster mappings for the new data and adapted node sizes and MFIs etc.

Please let me know if you meant a different use case than the one provided by the NewData() function, then I can try to add the functionality you need.

Best,
Sofie