You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Running SCTransform on a Seurat v5 object (Assay5 class for RNA assay) will return an SCT assay where any of the SCTModel may miss some feature.attributes if the number of cells is less than the argument ncells (default to 5000). In this case, the following subset of feature.attributes is lost: detection_rate, gmean and variance.
The culprit is a call to the function SCTModel_to_vst which skips the fields detection_rate, gmean and variance.
This removes the possibility of using the function VariableFeaturePlot on the newly created SCT assay (which calls HVFInfo.SCTAssay which itself searches for gmean and variance, see the corresponding line).
Is this intended or not? If not, a possible solution would be to add the following line:
Running
SCTransform
on a Seurat v5 object (Assay5
class for RNA assay) will return anSCT
assay where any of theSCTModel
may miss somefeature.attributes
if the number of cells is less than the argumentncells
(default to 5000). In this case, the following subset offeature.attributes
is lost:detection_rate
,gmean
andvariance
.The culprit is a call to the function
SCTModel_to_vst
which skips the fieldsdetection_rate
,gmean
andvariance
.This removes the possibility of using the function
VariableFeaturePlot
on the newly created SCT assay (which callsHVFInfo.SCTAssay
which itself searches forgmean
andvariance
, see the corresponding line).Is this intended or not? If not, a possible solution would be to add the following line:
there, in the
SCTransform.StdAssay
function body.Here is a reproducible example:
Note that running the example with
ncells = 5000
returns the full set offeature.attributes
as an "edge" case.The text was updated successfully, but these errors were encountered: