Closed bjreisman closed 3 years ago
Hey @bjreisman , @mikejiang actually added support for handling multiple panels via an extra panel_id
arg to cytobank_to_gatingset
shortly after the last Bioconductor release (which it looks like is the version of CytoML
you have). See this issue and this commit. Through testing with this dataset, I found a few more minor subsetting issues which should be fixed after this commit.
Now I can parse all 3 panels just fine, just keep in mind that you need to specify panel_id = 1
or panel_id =2
in the gatingset_to_cytobank
call (it will default to 1). This is essentially your second solution ("Perhaps only allow importing one panel at a time if there's more than one?").
You can either pull those commits and rebuild CytoML
, or wait 2 weeks for the next Bioconductor release. Bioconductor 3.11 will force R 4.0, however, so keep that in mind.
Thanks for highlighting that fix! I've upgraded to R 4.0.0 and the latest version of bioconductor and indeed it does now work as expected! :+1:
Good to hear. Glad to help.
Hi CytoML team, I'm bumping this older issue as I'm having trouble reading in cytobank experiments with multiple panels again. Specifically, it's failing at this step:
> ce_get_transformations(ce)
Error in colnames(x) : colnames are not consistent across samples!
which reflects failing at this step:
> colnames(ce)
Error in colnames(ce) : colnames are not consistent across samples!
Thanks Benjamin. Unfortunately Jake moved on to other things recently but we'll try to address this as soon as we can. Is the data you shared earlier still suitable for testing? Or do we need a different data set to reproduce this? Greg
Hi Greg, the dataset from the original issue still appears to work, which may make this a 'new' issue. I've attached an experiment that reproduces the problem. I think the first example had the same channels (short names) with different names (long names?) assigned on the different panels. In this case, the different panels actually have different channels (short names?) Hope that helps! cytoml_87.zip
Looks like the original model of cytobankExperiment
class as a homogeneous data container doesn't fit the use cases you are running into. I've added optional panel_name
argument to the relevant ce
APIs so that we can restrict the range of query when there is discrepancy across panels, e.g.
> ce <- open_cytobank_experiment(acsfile)
Unpacking ACS file...
> pn <- "Panel 2"
> ce_get_channels(ce)
Error in ce_get_channels(ce) :
colnames are not consistent across samples!
> ce_get_channels(ce, pn)
[1] "Time" "FSC-A" "FSC-H" "FSC-W" "SSC-A"
[6] "SSC-H" "SSC-W" "Alexa Fluor 647-A" "Alexa Fluor 700-A" "Alexa Fluor 488-A"
[11] "Pacific Blue-A" "Pacific Orange-A" "PE-A" "APC-H7-A" "row"
[16] "col"
Now the importing cytobank experiment should work
> gs <- cytobank_to_gatingset(ce, panel_id = 2)
intact
singles
barcoded
barcoded-dim
intact
singles
barcoded-dim
barcoded
done!
Hi CytoML team,
I came across the following error when attempting to import a cytobank experiment which has FCS files associated with multiple panels. This is an use case I usually try to avoid as its clumsy to handle within cytobank, but I know many cases where others like to do this when staining the same sample with multiple panels, as in this public dataset #8938 from this tutorial.
Here's what the experiment panel looks like in cytobank:
and here's the error I get when I try to import it using the ACS importing function:
Whereas the direct FCS/gatingML import seems to work just fine:
Interestingly, I think LongNames are appropriately assigned for each FCS file...
I'm not sure what the best solution to this is, as you wouldn't want to facet datasets with different markers, but gating should still work just fine as the gates are defined by shortNames. A few solutions I thought of are:
The FCS/gatingML import solution should work fine for now, but I thought I'd bring it to your attention.
Best, -Ben
Link to the ACS file.