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

Get error message while using openCyto:::.flowClust.2d #237

Open
hsiuhong1 opened this issue Mar 27, 2022 · 6 comments
Open

Get error message while using openCyto:::.flowClust.2d #237

hsiuhong1 opened this issue Mar 27, 2022 · 6 comments

Comments

@hsiuhong1
Copy link

I am able to use the followings:

openCyto:::.mindensity
rectangleGate
openCyto:::.singletGate
openCyto:::.boundary

When I tried to use openCyto:::.flowClust.2d, I got the following error message:
Error in as.character.default(x) :
no method for coercing this S4 class to a vector

@mikejiang
Copy link
Member

These are internal private APIs not meant to be used directly by the end user. Try to always stick with public exported version of these functions, that is gate _*

@hsiuhong1
Copy link
Author

Hi Mike,

I still got the same error message.

Below is the code:
chn5 <- c("APC-H7-A", "SSC-A")
gmonocyte <- gate_flowclust_2d(fs_Offaxis, channels = chn5, K = 1, target = c(2.5e5,5e4), quantile = 0.95)

Error message:
Error in as.character.default(x) :
no method for coercing this S4 class to a vector

I can provide the full script if it is needed.

Many thanks for your help.

Siu-hong

@mikejiang
Copy link
Member

Please take a look at the documentation of this API ?openCyto::gate_flowclust_2d, it takes a flowframe and xChannel, yChannel as input

@hsiuhong1
Copy link
Author

Hi Mike,

Thanks.

I am able to apply the gate_flowclust_2d to a flowframe. However, if I apply it to the flowset, I got the same error message.

For the flowset I used, it is originally a cytoset. I use the function cytoset_to_flowSet to convert the cytoset to flowset.

Any insight is appreciated.

Thanks.

Siu-hong

@mikejiang
Copy link
Member

mikejiang commented Mar 31, 2022

Again, these gating functions only work with a single flowframe, if you want to work with flowset, you have to write a loop through the flowset, within the loop, extract flowframe from the flowset, then you can apply the function there,
Actually you don't even need to convert to flowset,Just loop through cytoset directly for example

gates=lapply(sampleNames(cs), function(sn){
	cf = cs[[sn]]
	fr = cytoframe_to_flowFrame(cf)
	gate_flowclust_2d(fr,"APC-H7-A", "SSC-A",  K = 1, target = c(2.5e5,5e4), quantile = 0.95)
	})

@hsiuhong1
Copy link
Author

Thanks, I am able to get through it.

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

2 participants