Closed DillonHammill closed 1 year ago
@mikejiang, I also added .preprocess_row()
to list of CytoExploreR exports so that I can use it instead of .preprocess_csv()
when required, so I can bypass undesirable checks.
Hi @mikejiang, please can you review this PR when you get some time so I can make the changes that you require. I am preparing for the release of CytoExploreR version 2.0.0 at the end of the month so it would be great if these changes were available on BioC by then. I have been testing my updated fork for a while now and I haven't run into any issues.
Hi @mikejiang,
Thanks again for adding support for empty
dims
in the gatingTemplate. I have put together this PR to include the additional changes that I have proposed or changes necessary to get the clustering gating to work.The changes are as follows:
gatingTemplate
constructor when an empty gatingTemplate is supplied either as a CSV or data.table.stop.at
node has been added. As I mentioned previously, the current implementation terminates the gating prior to thestop.at
node which means that there are others gates applied which may be undesirable..preprocess_row()
to ensure thatNA
dims are handled correctly, sincedims = NA
is the default ings_add_gating_method()
. This allows the gating process to proceed ifdims
are omitted ings_add_gating_method()
.groupBy = NA
andcollpaseDataForGating = TRUE
to place all samples in the same group - at the moment each sample is placed in its own group. In order to do this, I have given the group containing all the samples the name"all"
in both the gating and preprocessing methods. Happy to change this name to whatever you like..gating_adaptor()
and the clustering methods withcollapseDataForGating = TRUE
. The.gating_adaptor()
repeats the gate for each sample, which is not desirable for when usinglogical
orfactor
filters on the collapsed data since the number of events will vary in each sample (we run into index out of bounds errors since the factor length is the sum of all the events across samples). It is a bit of work to split these gates into separate gates within.gating_adaptor()
, so instead I split these gates per sample within mygating function
and return a list offilterResults
one per each sample. I have have updated the.gating_adaptor()
to prevent duplication of filters if they are supplied in a named list per sample.I ran all the tests locally and everything passes after these changes, I have also confirmed that everything is working within CytoExploreR as well.
Let me know if there are any changes you would like me to make.
Thanks again for your help.
Dillon