I have been trying out the 'cydar' package for testing for differential abundance in mass cytometry data, which was published a few months ago (Lun et al., 2017, Nature Methods).
In order to evaluate the performance of the algorithm, I have been looking at results at both the 'hypersphere' level and the individual cell level. To get the results at the cell level, I have been using the accessor function 'cellAssignments()' on the 'CyData' objects, which returns a list of integer vectors containing the cell IDs/indices of the cells contained within each hypersphere. This allows the individual cells to be matched up with the hypersphere-level q-values.
However, I noticed that some of the values in these 'cellAssignments' integer vectors are actually negative, which doesn't seem to make sense if they are cell IDs. Do you have any further information about what these negative values mean? Or is there a problem with the 'cellAssignments' vectors?
Below is a short example to demonstrate the issue. The example is using the data from the example in the Bioconductor vignette, and simply follows on directly from the section titled "Counting cells into hyperspheres" in the vignette. If I am interpreting it correctly, this seems to show that the 5th hypersphere contains 77 cells, but 23 of these have negative values for their cell IDs.
# example to demonstrate negative values for cell assignment indices assignments <- cellAssignments(cd)[] length(assignments) #  77 head(assignments, 10) #  38 64 766 1327 5145 -5146 5148 -5149 5152 -5153 sum(assignments < 0) #  23
Thank you for your help,