Description Usage Arguments Details Value Author(s) Examples
View source: R/splitDataFrameByCell.R
Create a SplitDataFrameList to store repertoire data. Each cell corresponds to one DataFrame, while each row of that DataFrame corresponds to a sequence detected in the cell.
1 2 3 4 5 6 |
df |
A data frame of repertoire data where each row corresponds to a detected sequence. |
field |
A string specifying the field of |
ids |
A character vector of length equal to |
universe |
Character vector of all possible cell identities. |
A cell may have anywhere from zero, one or multiple sequences in a repertoire sequencing experiment. This makes repertoire data rather inconvenient to store and manipulate; at some points, we would like to operate on cells, while at other points, we would like to operate on the raw sequences.
Our solution is to use a SplitDataFrameList where each entry corresponds to a single cell. However, each entry is also a DataFrame where each row corresponds to a sequence in that cell. This achieves a per-cell representation without discarding per-sequence information.
We can further take advantage of powerful List grammar to perform per-sequence operations on the SplitDataFrameList; see the relevant documentation from the IRanges package for more details.
Setting universe
is useful to ensure that the output object is of the same length as,
say, the number of columns in a SingleCellExperiment object containing expression data.
A SplitDataFrameList containing a per-cell perspective of repertoire data.
Aaron Lun
1 2 3 4 5 6 7 8 9 10 |
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.