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

gs_pop_get_count_fast accept only path="full" option #371

Open
OuNao opened this issue Feb 18, 2022 · 3 comments
Open

gs_pop_get_count_fast accept only path="full" option #371

OuNao opened this issue Feb 18, 2022 · 3 comments

Comments

@OuNao
Copy link

OuNao commented Feb 18, 2022

Hi,

I having problem with gs_pop_get_count_fast as it accept only path="full" option. I need to pass path as "auto" or 1 (last node name).

gs_pop_get_count_fast(gs, path="auto")[,2:4]

Results:

Error in .getPopCounts(x@pointer, statistic == "freq", subpopulations,  :  limph not found in gating tree of main

With path="full" works but the table use full node path.

Using last CRAN version, flowWorkspace_4.6.0, and R 4.1.2

I get no error in version 4.2.0 and R 4.05.

Thanks,

@mikejiang
Copy link
Member

due to a significant amount of overhead from look up population by partial path, we have refactored the underlying C code to only take full path, which speeds up this API many folds.
Maybe I should also update R interface to make it clear to user,
in terms of partial path, I believe it can be easily parsed out from the full path by user.

@DillonHammill
Copy link
Contributor

DillonHammill commented Feb 19, 2022

In case you or others find it useful, CytoExploreR has a nice cyto_nodes_convert() function to convert the paths for you @OuNao:

counts <- gs_pop_get_count_fast(gs)
counts$Population <- cyto_nodes_convert(gs, nodes = counts$Population, path = "auto")

@OuNao
Copy link
Author

OuNao commented Feb 21, 2022

Hi,

I solved my problem with simple

counts$Population<-basename(counts$Population)

I know that basename was not created for this but works very well.

I think that maybe gs_pop_get_count_fast must test for path option != "full" and throw a more informative error.

Thanks,

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants