Question: Cannot inverse transform GatingSet
0
gravatar for mfahlber
9 weeks ago by
mfahlber0
mfahlber0 wrote:

I am importing a FlowJo Workspace via parsing the workspace, and then normalizing the workspace using the normalize() function. No issues here. However, after taking these steps, I am trying to export the files via write.flowSet. But when I do so, the data comes back untransformed, so the MFI is squished between 50-200 or so, instead of between -500 and 26,000 as I would expect.

I have tried nearly every which way of utilizing the flowJobiexponential transform function but it just isn't working right. For example, it transforms the data from MFI 70 to MFI 700, when it should really be MFI in the 1000s. Does anyone know how to inverse transform the data? It works when I use getStats and set inverse.transform = TRUE, but I can't find a similar function when writing the transformed FCS files. I wish there were something like, write.flowSet(inverse.transform=TRUE). Would be so helpful.

ADD COMMENTlink modified 9 weeks ago by Jake Wagner100 • written 9 weeks ago by mfahlber0

Moved comment to answer

ADD REPLYlink modified 9 weeks ago • written 9 weeks ago by Jake Wagner100
Answer: Cannot inverse transform GatingSet
1
gravatar for Jake Wagner
9 weeks ago by
Jake Wagner100
Jake Wagner100 wrote:

Would getTransformations() with inverse=TRUE work for your case? So something along these lines:

fs_transformed <- getData(gs)
inv_trans <- lapply(gs, function(gh){
  invs <- getTransformations(gh, inverse=TRUE)
  invs <- transformList(names(invs), invs)
})
fs_inverted <- transform(fs_transformed, inv_trans)
write.flowSet(fs_inverted)

We may make this easier with a single inverse.transform=TRUE flag for getData (similar to getStats) soon, but hopefully this will solve your problem for now.

ADD COMMENTlink written 9 weeks ago by Jake Wagner100
Answer: Cannot inverse transform GatingSet
0
gravatar for Jake Wagner
9 weeks ago by
Jake Wagner100
Jake Wagner100 wrote:

Additionally, I went ahead and added an inverse.transform flag to getData in https://github.com/RGLab/flowWorkspace/commit/0346da50b5e876ac90465a4ecdc3aa71589b7778 Those changes will be in the Bioconductor 3.10 development branch as well and will make this a bit easier:

fs_inverted <- getData(gs, inverse.transform=TRUE)
write.flowSet(fs_inverted)

If you do incorporate those changes, just keep in mind that getData will throw a harmless deprecation warning because that method is being renamed gh_pop_get_data/gs_pop_get_data in this release cycle.

Also keep in mind that will not reverse the compensation. You could use decompensate for that.

ADD COMMENTlink modified 9 weeks ago • written 9 weeks ago by Jake Wagner100
Please log in to add an answer.

Help
Access

Use of this site constitutes acceptance of our User Agreement and Privacy Policy.
Powered by Biostar version 16.09
Traffic: 243 users visited in the last hour