-
Notifications
You must be signed in to change notification settings - Fork 904
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
Combining counts of 2 genes into 1 gene - spatial #8914
Comments
LukeJ89
changed the title
Combining counts of 2 genes as into 1 gene - spatial
Combining counts of 2 genes into 1 gene - spatial
May 20, 2024
The easiest way to do this is probably to read in the counts matrices via counts <- Read10X_h5("Z:/Spatial_Transcriptomics/KP001/KP001_B/outs/filtered_feature_bc_matrix.h5")
counts_GF1 <- counts["Gene1", ] + counts["Gene1B", ]
counts <- rbind(counts, GF1 = counts_GF1)
counts <- counts[!rownames(counts) %in% c("Gene1", "Gene1B"), ]
KP001B_spatial <- CreateSeuratObject(counts, assay = "Spatial")
image <- Read10X_Image(
"Z:/Spatial_Transcriptomics/KP001/KP001_B/outs/spatial",
assay = "Spatial",
slice = "KP001B",
filter.matrix = TRUE
)
image <- image[Cells(KP001B_spatial)]
KP001B_spatial[["KP001B"]] <- image
|
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Hi,
I have some spatial data (Visium) that I have merged and am comparing gene expression between two inflammatory conditions. There is a particular gene that is significantly expressed in one of the conditions that I am interested in, let's call it Gene1. However, there is another gene that codes for the exact same protein, call it Gene1B, and this is significantly expressed in a the other condition, although not as greatly, which could impact the overall differential expression for that protein.
I was wondering if it were possible to combine the counts of Gene1 and Gene1B to make a new count called GF1, and run DGE analysis as this will give me a better understanding of the gene expression level for that one protein?
`
The text was updated successfully, but these errors were encountered: