-
Notifications
You must be signed in to change notification settings - Fork 21
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
cytoset/cytoframe questions #294
Comments
Aaaah, everything makes sense now... Is there a reason why subsetting a cytoset with negative integers does not work?
Dillon |
@DillonHammill , not really a good reason for it not working other than it not being written. This should be an easy addition and I'll get on it. |
#294 adds the option for negative subscripts. With regard to your original question about information, I'm in the process of a overhauling the documentation on the core packages and organizing them in website form. For now though, a lot of your questions are covered in the section I added to the
Happy to answer more questions and apologies for the headaches these changes may cause for |
Thanks @jacobpwagner. That's OK. I will work through making the necessary changes so that CytoExploreR is on par the RGLab suite and then I will re-submit to ROpenSci. The main difference for me is that the underlying data is changed whenever manipulations are made. Just to clarify, is it better to make a deep or shallow copy of the data within functions? For example, in cases where I am manipulating data for visualisations but not returning the data, is it better to make a deep or shallow copy of the data? Presumably, in cases where the data is returned a deep copy is preferred? One more question about deep/shallow copies. See below:
Presumably, assignment of shallow copy to I will have a go at trying the negative subsetting later today. Thanks again! Dillon |
To avoid the confusion, #reference
cs1 <- cs
# views
cs2 <- cs[i, j] #subview
cs3 <- cs[, ] #full view
#copy
cs4 <- realize_view(cs) See the updated doc https://github.com/RGLab/flowWorkspace/blob/trunk/vignettes/flowWorkspace-Introduction.Rmd#L404-L425 |
Thanks @mikejiang, so any changes to the view will alter the original cytoset, unless a deep copy is made with |
Sorry to bug you again @jacobpwagner. Is it possible to add negative channel subsetting for cytosets as well?
|
Sure. Sorry, I sort of meant to add that as well in the earlier commit and then didn't get around to it. I'll take care of it. |
Just added negative column subsetting support in fd10e74. And no worries about "bugging". It's all really helpful, actually. |
Thanks @jacobpwagner, I will let you know if I encounter any other issues. |
Is there any way to ship |
Only if you ship the files on disk. |
Thanks @gfinak, how would I go about doing this? Using DataPackageR I currently construct a flowSet object which is shipped in the package. |
Probably in |
This is what I am currently doing:
So replace |
I think, yes. |
Thanks @gfinak I will give it a try. |
The cytoset builds fine in DataPackageR but does not open when called after loading the data package...
|
Sorry closed by accident. I do have some additional |
Yeah, see if that fixes it. Just those two lines above complete successfully in my testing. |
Still no luck with just these lines...
|
I have pushed the changes to the |
Weird. Still cannot reproduce it:
The |
Ah, I see. I was going with your first lines. You just mean this:
|
That's correct, the cytoset should be loaded with just the above calls. It seems like the dataset should be constructed when the package is loaded. I think it is trying to load a pre-built cytoset and that is why it is having problems. |
|
Thanks @mikejiang. I thought I might be able to do the following in data-raw/Activation.Rmd. First create the I would like to export the cytoset object so that no paths are required to construct the cytoset when loading the data package. |
Just a comment on this that I will try when I get the chance. I think the issue is stemming from a lack of access privileges to files when the R package library is located in a restricted directory (such as Program Files). |
@mikejiang, I was hoping that you could clarify whether subsetted cytoframes are duplicated on disk or whether they point to the original copy? In the example below, do
I just want to make sure that I am not unnecessarily duplicating data. Thanks for your help! |
yes, it points to the same on-disk data unless realize it > class(cf)
[1] "cytoframe"
attr(,"package")
[1] "flowWorkspace"
> nrow(cf)
[1] 119531
> cf_get_uri(cf)
[1] "/tmp/48aee2e9-64c1-4405-bb4e-cec0a2d3354a.h5"
>
> cf_sample <- Subset(cf, sampleFilter(size = 5000))
> nrow(cf_sample)
[1] 5000
> cf_get_uri(cf_sample)
[1] "/tmp/48aee2e9-64c1-4405-bb4e-cec0a2d3354a.h5"
>
> cf_cp <- realize_view(cf_sample)
> cf_get_uri(cf_cp)
[1] "/tmp/RtmpiZafH8/file12029c571b520e.h5" |
Thanks @mikejiang, and wrapping the subsetted cytoframe in a cytoset also points to the same data. That's really cool!
|
I think this error I'm getting might be related to this thread. I'm working through the "Compensation of Fluorescent Spillover" vignette in CytoExploreR but I'm not getting very far. I can't solve it because I am a beginner with R and trying to learn CytoExploreR: [Workspace loaded from ~/R folder/CytoExploreR-Demo/.RData] Loading required package: flowWorkspace vignette("flowWorkspace-Introduction", "flowWorkspace") Any help would be appreciated. |
gaining set has to be loaded from disk via |
Thank you very much for the help. I will give it a try. |
Hi @mikejiang and @jacobpwagner,
I just had a couple of questions about the new cytoset reference class.
Does this mean that the plan is do away with
read.ncdfFlowSet
in favour ofload_cytoset_from_fcs
?I have noticed that performing operations such as transformations without assignment still modifies the supplied cytoset (which makes sense). For example:
How do I interact with data without making these sorts of changes to the underlying data? Do I have to coerce the
cytoset
to aflowSet
usingcytoset_to_flowSet
for all internal manipulations? I have noticed thatcytoset_to_flowSet
accepts flowSet objects and leaves them unaltered.Should I include this conversion in all of my existing flowSet methods to ensure that I am not altering the underlying data? Presumably I would have to do the same for my flowFrame methods as well using
cytoframe_to_flowFrame
.As far as I can tell
cytoframe
objects are only ever going to appear (at the moment) when reading in a single file. As subsetting acytoset
still returns aflowFrame
object. Is this correct? Presumablycytoframes
will replaceflowFrames
eventually?Is there a clone method available for
cytoset
and/orcytoframe
objects?Just out of curiosity, what are the benefits of
cytosets
versusflowSets
orncdfFlowSets
?Sorry for all the questions.
Much appreciated,
Dillon
The text was updated successfully, but these errors were encountered: