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

Compass analysis from Seurat subcluster - get_reaction_consistencies issue #90

Open
france-hub opened this issue Nov 29, 2022 · 9 comments

Comments

@france-hub
Copy link

france-hub commented Nov 29, 2022

Hello!
Thanks for your work and beautiful paper.

I have a question on how to better run Compass on my dataset (T cells). Basically, I have a scRNAseq dataset (10x) that has been analyzed (normalized, batch-corrected,...) following Seurat pipeline.
On a dataset subset (CD8+ T cells) I find interesting metabolic pathways by using GSEA and GSVA but I would like to confirm these findings by using compass.
Reading #20 the input for compass should be obtained using:
pbmc <- NormalizeData(pbmc, normalization.method = "RC", scale.factor = 10000)
and then pbmc@assays$RNA@data (genes x cells matrix) to build the expression.tsv file for your pipeline (right?).

What's the best way to do it in my case? Should I (re)normalize my subset using this: CD8 <- NormalizeData(CD8, normalization.method = "RC", scale.factor = 10000) and then proceed?

I am asking this because I have tried to run the pipeline as in your tutorial and I get a problem when running reaction_consistencies = get_reaction_consistencies(reaction_penalties) and started wondering if my initial expression.tsv input is "wrong".

reaction_consistencies is an empty dataframe.
Looking at the reaction_penalties of your Th17 this is the head of the df:

cluster_0    cluster_1  ...   cluster_27   cluster_28
10FTHF5GLUtl_pos  3396.913401  3419.480439  ...  3419.848436  3395.783083
10FTHF5GLUtm_pos  6005.653619  6157.835810  ...  6140.245810  6316.805975
10FTHF6GLUtl_pos  4135.322625  4163.974929  ...  4168.109841  4136.574986
10FTHF6GLUtm_pos  6382.579138  6558.861567  ...  6534.205110  6704.785229
10FTHF7GLUtl_pos  4720.669360  4760.791372  ...  4765.455901  4739.398948

This is instead what I get (same numbers for each cluster):

cluster_0    cluster_1  ...  cluster_1655  cluster_1656
10FTHF5GLUtl_pos  4778.802459  4778.802459  ...   4778.802459   4778.802459
10FTHF5GLUtm_pos  6814.614563  6814.614563  ...   6814.614563   6814.614563
10FTHF6GLUtl_pos  6148.195493  6148.195493  ...   6148.195493   6148.195493
10FTHF6GLUtm_pos  7473.244114  7473.244114  ...   7473.244114   7473.244114
10FTHF7GLUtl_pos  7061.253615  7061.253615  ...   7061.253615   7061.253615

Then after running get_reaction_consistencies I get:

Empty DataFrame
Columns: [cluster_0, cluster_1, cluster_2, cluster_3, cluster_4, cluster_5, cluster_6, cluster_7, cluster_8, cluster_9, cluster_10, cluster_11, cluster_12, cluster_13, cluster_14, cluster_15, cluster_16, cluster_17, cluster_18, cluster_19, cluster_20, cluster_21, cluster_22, cluster_23, cluster_24, cluster_25, cluster_26, cluster_27, cluster_28, cluster_29, cluster_30, cluster_31, cluster_32, cluster_33, cluster_34, cluster_35, cluster_36, cluster_37, cluster_38, cluster_39, cluster_40, cluster_41, cluster_42, cluster_43, cluster_44, cluster_45, cluster_46, cluster_47, cluster_48, cluster_49, cluster_50, cluster_51, cluster_52, cluster_53, cluster_54, cluster_55, cluster_56, cluster_57, cluster_58, cluster_59, cluster_60, cluster_61, cluster_62, cluster_63, cluster_64, cluster_65, cluster_66, cluster_67, cluster_68, cluster_69, cluster_70, cluster_71, cluster_72, cluster_73, cluster_74, cluster_75, cluster_76, cluster_77, cluster_78, cluster_79, cluster_80, cluster_81, cluster_82, cluster_83, cluster_84, cluster_85, cluster_86, cluster_87, cluster_88, cluster_89, cluster_90, cluster_91, cluster_92, cluster_93, cluster_94, cluster_95, cluster_96, cluster_97, cluster_98, cluster_99, ...]
Index: []
[0 rows x 1657 columns]

It's a micropooled analysis. Could you help me troubleshooting?

Thanks!
Francesco

@france-hub france-hub changed the title Compass analysis from Seurat subcluster Compass analysis from Seurat subcluster - get_reaction_consistencies issue Dec 4, 2022
@fouerghi20
Copy link

I also have the same issue where all the values are the same for a reaction in all cells. Any help would be appreciated.

@fouerghi20
Copy link

Screen Shot 2022-12-07 at 9 19 39 PM

I am getting the same scores as you.

@france-hub
Copy link
Author

Did you use the same pipeline I used to obtain the expression.tsv file? Did you analyze your data using Seurat?
In their tutorial the authors say that the expression.tsv file needs to be a gene x samples matrix which is the only step not clear to me (mine is a gene x cells matrix as suggested in some issues in this repo). I can build a genes x samples matrix in Seurat and then export I think, but since running Compass takes a while I wanted the developers' opinion first. I also don't know why a genes x samples matrix should solve this.

What do you think?

Francesco

@ahdee
Copy link

ahdee commented Aug 12, 2023

@france-hub had you gotten this to work. What is very confusing to me is that the example they provided appears to be for bulk rnaseq, for example genes as rows and sample as columns. However for 10x, literally every column is a cell. I could aggregate this for pseudobulk but it is not clear to me if this is the correct way to go?

@france-hub
Copy link
Author

Hello @ahdee, I apologize for the late reply. No, I was not able to make it work. After multiple attempts I gave up.
Good luck!

@ahdee
Copy link

ahdee commented Aug 25, 2023

@france-hub I got it to work - what I ended up doing was downsampling to about 2K per sample. Let me know if you want me to show you how I did it.

@france-hub
Copy link
Author

if you could share your code from your Seurat object, would be great!

@zhangshuyue1
Copy link

zhangshuyue1 commented Nov 6, 2023

hello,which operating Systems was your compass installed on? linux? windows? Mac? @france-hub

@france-hub
Copy link
Author

Linux

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

4 participants