-
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
Pearson Residuals for PCA #34
Comments
Hi Claudio,
"I wanted to ask if the Pearson Coditional Residuals are suitable to
perform PCA for the DEGs."
If you have the treatment variable in your design matrix when using nebula,
then the PCs from the Pearson Coditional Residuals will not separate these
groups because the residuals are orthogonal to the variable in the model. I
mean that the residuals do not contain information about the variables in
your design matrix. You should then use the expression of those top DEGs to
separate them.
Best regards,
Liang
…On Wed, Sep 6, 2023 at 1:19 PM CDSchuster ***@***.***> wrote:
Hello!
I wanted to ask if the Pearson Coditional Residuals are suitable to
perform PCA for the DEGs. I want to check if the DEGs I obtain can separate
the samples according to their corresponding treatment. I tried using the
Pearson Conditional Residuals of the DEGs for the PCA, but the result does
not make any sense. The cells aren't being separated by the treatment. Am I
doing something wrong?
[image: Screenshot from 2023-09-06 14-16-52]
<https://user-images.githubusercontent.com/45445399/266088744-25bd3a77-b2ca-4eff-b5b7-a2796091aa22.png>
Thanks a lot in advance!
Claudio
—
Reply to this email directly, view it on GitHub
<#34>, or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AGDISUVFQ4OADYYMFB2TIHLXZCWBRANCNFSM6AAAAAA4NVIX2U>
.
You are receiving this because you are subscribed to this thread.Message
ID: ***@***.***>
|
Hi Liang, thanks a lot for your answer. Claudio |
Hi Claudio,
I see your point.
In that case, I would do the following
step1: run nebula with the treatment group in the design matrix to get the
top DEGs
step2: run nebula again with the treatment group excluded from your model
step3: get the conditional residuals from the result of step2 for those top
DEGs
step4: use these residuals to run PCA
This procedure will generate PCs that do not have bias from the effects of
the subjects and still contain the main information of your treatment
effect.
I hope this helps.
Best regards,
Liang
…On Wed, Sep 6, 2023 at 2:36 PM CDSchuster ***@***.***> wrote:
Hi Liang,
thanks a lot for your answer.
I think I understand (my statistical knowledge is a bit basic). I wanted
to avoid using the raw counts of the DEGs because I feel they may be biased
by the random effects of the subjects. In the vignette you say that
"Pearson residuals obtained from fitting the NBMM can be used for
normalization and downstream analyses". I was wondering then if it makes
sense to use in some way those pearson residuals to normalize the raw
counts from the experiment and then perform PCA.
I'm sorry I'm being somewhat annoying with my questions. By now I think
I'm the user with the most issues written so far XD.
Best regards,
Claudio
—
Reply to this email directly, view it on GitHub
<#34 (comment)>, or
unsubscribe
<https://github.com/notifications/unsubscribe-auth/AGDISUXQWPK4AAN6DEIFCRLXZC7EBANCNFSM6AAAAAA4NVIX2U>
.
You are receiving this because you commented.Message ID:
***@***.***>
|
Thanks a lot again! |
Hello!
I wanted to ask if the Pearson Coditional Residuals are suitable to perform PCA for the DEGs. I want to check if the DEGs I obtain can separate the samples according to their corresponding treatment. I tried using the Pearson Conditional Residuals of the DEGs for the PCA, but the result does not make any sense. The cells aren't being separated by the treatment. Am I doing something wrong?
![Screenshot from 2023-09-06 14-16-52](https://private-user-images.githubusercontent.com/45445399/266088744-25bd3a77-b2ca-4eff-b5b7-a2796091aa22.png?jwt=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJnaXRodWIuY29tIiwiYXVkIjoicmF3LmdpdGh1YnVzZXJjb250ZW50LmNvbSIsImtleSI6ImtleTUiLCJleHAiOjE3MjAwNDE5NzAsIm5iZiI6MTcyMDA0MTY3MCwicGF0aCI6Ii80NTQ0NTM5OS8yNjYwODg3NDQtMjViZDNhNzctYjJjYS00ZWZmLWI1YjctYTI3OTYwOTFhYTIyLnBuZz9YLUFtei1BbGdvcml0aG09QVdTNC1ITUFDLVNIQTI1NiZYLUFtei1DcmVkZW50aWFsPUFLSUFWQ09EWUxTQTUzUFFLNFpBJTJGMjAyNDA3MDMlMkZ1cy1lYXN0LTElMkZzMyUyRmF3czRfcmVxdWVzdCZYLUFtei1EYXRlPTIwMjQwNzAzVDIxMjExMFomWC1BbXotRXhwaXJlcz0zMDAmWC1BbXotU2lnbmF0dXJlPWQ4MDAzNmU5YTE0ZGQzMDUxNmViN2I0ZTg2ODgyN2E0NmYzZjM5NjRmZWQ0NDBkNTg5YmQ5NmE2YjEyNDQ0ZWEmWC1BbXotU2lnbmVkSGVhZGVycz1ob3N0JmFjdG9yX2lkPTAma2V5X2lkPTAmcmVwb19pZD0wIn0.O1kmjpLQpFeQ5c7UQlr0jJ3AEHLuNyeAGdvyv16yeZg)
Thanks a lot in advance!
Claudio
The text was updated successfully, but these errors were encountered: