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

plotCellTypeProps Mean and propeller.ttest/propeller.anova means are different #8

Open
basedank opened this issue May 24, 2023 · 0 comments

Comments

@basedank
Copy link

Hello, I'm working with scRNA-seq data. I'm trying to extract the plotting information from plotCellTypeProps by accessing that object's $data so that I can use those cell proportions when making a customized ggplot box-and-whisker plot of cell proportions. The problem is that I want to append the

pbloodImm <- plotCellTypeProps(clusters = bloodImm$RNA_snn_res.0.8, sample = bloodImm$Patient_ID)
Immprops <- pbloodImm$data

Immprops will be used to store the different proportions per cluster and I append Disease subgroup (Control vs Diseased.1 vs Diseased.2) for each patient to that to dodge my box-and-whisker plot later on.

bloodImmprops <- getTransformedProps(clusters = bloodImm$RNA_snn_res.0.8, 
                                  sample = rownames([email protected]))

I use bloodImmprops as the prop.list for the propeller.ttest/anova function. rownames([email protected]) are individual cells

The problem is that when I calculate the mean per each unique Cluster + Disease status combination, they are different than the means generated from propeller.ttest/anova and thus do not make sense when I visualize the ggplot with the manually-added p-values.

image

The bold text is the mean calculated from the plotCellTypeProps data. So for the proportions, Control = 0.084 and Disease = 0.089

Here is the output of the simple propeller function:
image

We can see that the mean proportions are very similar to the ones I extracted and summarized from the plotCellTypeProp data.

But, when I run propeller.ttest or propeller.anova, I get different means for my groups...
image

This is the output of propeller.ttest between Control and Disease for cluster 11 - Blood. As we can see, the proportions here differ if different directions since Control = 0.09 and Disease = 0.087

How can this be fixed?

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