iCellR
iCellR copied to clipboard
Method for gene-gene correlations
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
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
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