RGLab / openCyto

A package that provides data analysis pipeline for flow cytometry.
GNU Affero General Public License v3.0
77 stars 29 forks source link

Access GatingTemplate Entries within Plugin Function #175

Closed DillonHammill closed 6 years ago

DillonHammill commented 6 years ago

Hi guys,

Just wondering if there is a way to access entries in the GatingTemplate within a plugin gating function? For example would it be possible to extract the alias entry to determine the number of expected gates or population names?

Thanks again!

Dillon``

mikejiang commented 6 years ago

plugin is designed to be agnostic to the template itself, all it does is to take a flowFrame and spit out the gate or gates. Can you elaborate your use case?

DillonHammill commented 6 years ago

I would like to use the population names as a prompt within the gating function. For example within the DrawGate plugin I want to print a message saying "gate this population". I am also looking into multigate approaches so it would be useful to know the expected number of gates.

mikejiang commented 6 years ago

As you can see https://github.com/RGLab/openCyto/blob/trunk/R/pluginFramework.R#L49-L52 these are the current formals expected by plugins, alias is not one of them. The idea is to keep it as clean as possible. We have to think about this before adding it to the framework. For drawGate case, I still prefer to keep this interactive thing outside of the template gating process.

mikejiang commented 6 years ago

Also, shouldn't the number of gates be determined by the gating function itself? You can simply leave the alias as * and set filterId slot to your desired name for each gate object generated in your function.

DillonHammill commented 6 years ago

Ok fair enough. I made many updates to the plugin, I will let you know when I have pushed the changes to GitHub.