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

Method for gene-gene correlations #28

Open
Yale73 opened this issue Apr 29, 2021 · 2 comments
Open

Method for gene-gene correlations #28

Yale73 opened this issue Apr 29, 2021 · 2 comments

Comments

@Yale73
Copy link

Yale73 commented Apr 29, 2021

Hi iCellR,

Thanks for the great cell-cell correlation function. Do you mind tell me which method we used for the correlation analysis, eg Pearson, Spearman, etc? Also, we don't quite understand why

if (PVal == 0) {
       PVal = "2.2e-16"
   }

Is it the reason our PVal is very small?

thanks,
Yale

@rezakj
Copy link
Owner

rezakj commented Apr 29, 2021

Hi Yale,

Thank you, yes! It's the general r "cor.test" function that by default takes "pearson". Thanks for reminding me, I will add the option to change methods in the future. It is a bit of a lazy coding but yes.
I think at the time I wanted to replace 0 with the smallest p value because for some reason R was converting them to 0. But I will look into it in the future. Generally they are also represented with 4 stars (****) for p < 0.00001. If you want the exact very small p number you can run the "cor.test" outside of the function on the imputed data.

Hope this helps :)

Reza

@Yale73
Copy link
Author

Yale73 commented Apr 29, 2021

Hi Reza,

You are right, they always report 0 if it is very small. Your code seems to keep the real p-value, right? As I always get XXe-267 or XXe-578, etc.

Also, I compared Pearson and Spearman, it seems Spearman is more suitable for single-cell data, as it considers the ordinal variables. Then can you tell me why you set the default Pearson?

Thanks for any correction.

Best,
Yale

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

2 participants