-
Notifications
You must be signed in to change notification settings - Fork 6
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
Co-expression code #23
Comments
Hi Abhijeet R Patil,
Thank you for your question.
To investigate co-expression of Gene A with other genes, we include
normalized expression of Gene A in the design matrix. You could include
only those genes of which you want to investigate the co-expression in
the count matrix. To illustrate, I give an example script below for the
co-expression analysis of APOE in the paper using a Seurat Object.
covs = ***@***.*** # pbmc is a Seurat Object of the single-cell
data set
covs$apoe_e =
counts[match('APOE',rownames(counts)),]/as.numeric(as.character(covs$nCount_RNA))*1e3
# get expression of APOE normalized by library size. If the gene has
many zeros, you might use other normalized methods such as Pearson
residuals which can be obtained from NEBULA
apoe_m = aggregate(apoe_e~orig.ident,covs,mean) # get subject-level
mean of the expression of APOE
covs$apoe_e_c = covs$apoe_e -
apoe_m[match(covs$orig.ident,apoe_m[,1]),2] # subtract subject-level
mean from normalized expression (This step is optional, depending on
whether you want cell-level co-exp only.)
pred = model.matrix(~nFeature_RNA+rprot+percent.mt+apoe_e_c,covs) #
create a design matrix, adjusting for covariates like number of non-zero
features, ribosomal and mitochondria mrna percentage
id =
as.numeric(factor(as.character(covs$ind),levels=unique(as.character(covs$ind))))
re = nebula(counts,id,pred=pred,offset=covs$nCount_RNA) # the logFC
and p-value of apoe_e_c give information about the co-expression between
APOE and all genes in the count matrix ***@***.******@***.***'
Best regards,
Liang
…On 5/10/2023 5:56 PM, ABHIJEET R PATIL wrote:
Hi,
Thanks for developing this awesome package for measuring differential
expression analysis in scRNA-seq through mixed modelling!
In the manuscript, I saw the co-expression analysis. Can you please
let me know where I can find the relevant code in the package. Thanks
for your help!
—
Reply to this email directly, view it on GitHub
<#23>, or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AGDISUWBTRJPTF7AND3QKQLXFO3ERANCNFSM6AAAAAAX4525CE>.
You are receiving this because you are subscribed to this
thread.Message ID: ***@***.***>
|
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Hi,
Thanks for developing this awesome package for measuring differential expression analysis in scRNA-seq through mixed modelling!
In the manuscript, I saw the co-expression analysis. Can you please let me know where I can find the relevant code in the package. Thanks for your help!
The text was updated successfully, but these errors were encountered: