-
Notifications
You must be signed in to change notification settings - Fork 102
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
An empty giottoPoints object can corrupt the giotto obj #946
Comments
Apparently that upsets Giotto quite a bit, if you attempt to remove just the feature_info: setFeatureInfo(gobj, NULL, feat_type = "neg_probe")
NULL passed to gpoints.
Removing specified feature information.
Error in .check_feat_metadata(gobject = .Object) :
No expression or polygon information discovered for feat_type: neg_probe
Please add expression or polygon information for this feature type first
Calls: setFeatureInfo ... set_feature_info -> initialize -> initialize -> .check_feat_metadata
Execution halted Or if you try to remove the feature_metadata first: # Drop neg_probe as it is sometimes missing
setFeatureMetadata(gobj, NULL, feat_type = "neg_probe")
setFeatureInfo(gobj, NULL, feat_type = "neg_probe")
NULL passed to metadata.
Removing specified metadata.
Error in `*tmp*`[[spat_unit]] :
attempt to select less than one element in get1index
Calls: setFeatureMetadata -> set_feature_metadata
Execution halted Is there a way to tell |
Update, for some of the setters, i.e. # Drop neg_probe as it is sometimes missing
# gobj <- setFeatureInfo(gobj, NULL, feat_type = "neg_probe")
gobj@feat_info$neg_probe = NULL
gobj@feat_ID$neg_probe = NULL
gobj@feat_metadata$cell$neg_probe = NULL
gobj@cell_metadata$cell$neg_probe = NULL
gobj@expression$cell$neg_probe = NULL
gobj@expression_feat = gobj@expression_feat[gobj@expression_feat != "neg_probe"] Since it is a created object from |
Yeah Giotto is particularly touchy about raw data (polys and points) and expression information. Giotto's The way that |
|
These are now addressed on the GiottoClass dev branch. Hierarchical/slot checks can now be toggled with library(GiottoClass)
g <- giotto()
sl <- GiottoData::loadSubObjectMini("spatLocsObj") Expect an error g <- setGiotto(g, sl)
Error in setSpatialLocations(gobject = gobject, x = x, ...) :
Add expression or spatial (polygon) information first Turn off checking so issues can be fixed. options("giotto.check_valid" = FALSE)
g <- setGiotto(g, sl)
list_spatial_locations(g)
spat_unit name
<char> <char>
1: aggregate raw g <- setSpatialLocations(g, NULL, spat_unit = "aggregate")
NULL passed to spatlocs. Removing specified spatial
locations.
list_spatial_locations(g)
NULL .... options("giotto.check_valid" = TRUE)
> g <- GiottoData::loadGiottoMini("viz")
> agg <- sliceGiotto(g, spat_unit = "aggregate")
> activeSpatUnit(agg) <- "aggregate"
> agg
An object of class giotto
>Active spat_unit: aggregate
>Active feat_type: rna
[SUBCELLULAR INFO]
polygons : aggregate
features : rna
[AGGREGATE INFO]
expression -----------------------
[aggregate][rna] raw normalized scaled pearson
spatial locations ----------------
[aggregate] raw
spatial networks -----------------
[aggregate] Delaunay_network kNN_network
spatial enrichments --------------
[aggregate][rna] cluster_metagene
dim reduction --------------------
[aggregate][rna] pca umap tsne
nearest neighbor networks --------
[aggregate][rna] sNN.pca
attached images ------------------
images : 4 items...
Use objHistory() to see steps and params used |
Noting this here for the future, I am getting errors with a newer set of CosMx slides that had missing
neg_probe
information. And I think that is leading to the following innocuous error when you write the object to file:The feature_info:
The problem I think is with those feature dims at
0,1
, when you try to open it again, you will get an issue with the SpatVector dimensions for the rna features? or the message to the terminal just comes after the neg_probe_feature_spatVector is attempted to be read:Trying to remove the neg_probe feature from the object to see if it helps with
setFeatureInfo(gobj, NULL, feat_type = "neg_probe")
The text was updated successfully, but these errors were encountered: