Keep cell type columns when merging #656
Merged
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Closes #655
Now in the correct repo! This PR updated
merge_sces.R
to handle cell type columns better:scpcaTools
default) set of columns to keep asretain_coldata_columns
retain_coldata_columns
singler_celltype_ontology
if ontology labels were used for at least one librarymerge_sce_list
about theretain_coldata_columns
vectorMoreover, here's how I handle libraries without the given cell type method, but where that method exists in other project libraries:
submitter_celltype_annotation
with the value"Submitter-excluded"
singler_celltype_annotation
with the value"Cell type annotation not performed
"singler_celltype_ontology
cellassign_celltype_annotation
with the value"Cell type annotation not performed
"cellassign_max_prediction
with the valueNA_real_
, just to be safe. This is probably overkill since the merge function will add this column withNA
s anyways, but I like that it's specificallyNA_real_
hereI've tested the code with an SCE list where some, but not all, have cell types and it works as expected!
Let me know what you think of some of those string choices I made. I'll note the conclusions from this PR over in
scpca-docs
in the issue about merged contents - AlexsLemonade/scpca-docs#219