Skip to content
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

SCTransform in a merged and subsetted object how to set variable features #8915

Open
Starlord3796 opened this issue May 21, 2024 · 0 comments

Comments

@Starlord3796
Copy link

Dear all,

First thank you for your work on the Seurat package.

I have a question that share part of others that I have already seen asked before but I have not seen a solution for it yet.

When using the SCTransform normalization and scaling method the Variable Features are automatically set within the run of the function SCTransform(). However if you merged several objects or subset certain clusters the variable features are unchanged and you have to either set the variable features manually or run SCTransform again for a new calculation of these variable features.

I have merged several Seurat objects (which were already SCTransform normalized - as suggested in a prior request) into a single object, integrated it using Harmony and subsetted certain clusters following the workflow below:

  • SCTransform normalization of the individual objects
  • Merged the objects into one
  • Set the variable features using the following command:
    VariableFeatures(SO_merged[["SCT"]]) <- rownames(SO_merged[["SCT"]]@scale.data)
  • Integrated it using harmony
  • Find neighbors, clusters and run UMAP
  • Subset certain clusters that corresponds to a specific cell type
    And now I want to re-cluster the subset of the specific cell type to test its heterogeneity.

I was wondering how should I set the new variable features as there will be features from the prior object that would not be so variable in this specific cell type as they account for other cell types.

  • Should I re-run the SCTransform on the subset? I do not know if this option is suitable as it would be normalizing again an already normalized object even if it was normalized individually.

  • Or should I find a way to set manually the variable features that account for the specific cell type that I am trying to analyze? I have thought of getting the variable features from the FindVariableFeatures function after logNorm and scaling on the RNA assay and using them for variable features in the SCTransform assay. But I do not know if there is any other method to do so.

Looking forward to your response and I hope that I have been able to made myself clear.

Thank you in advance!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant