Entering edit mode
cath
▴
30
@cath-15741
Last seen 6.2 years ago
I'm using package HiTC
(HiTC_1.22.1
) to find A/B compartments in my data.
I tried to use gene.gr
parameter to directly link eigenvector sign with A/B annotation. However, I got very different results from the ones obtained when trying to compute gene density myself.
Looking at pca.hic
function, it seems that gene density is actually gene number per sign, whatever the number of bins is.
Is there a bug in pca.hic
function (like function sum
is used instead of mean -
lines 47 and 48
at
https://github.com/nservant/HiTC/blob/master/R/pca.R
) or am I missing something?
Thank you.
Hi Cath,
Indeed, the gene density is calculated as the number of genes falling in A (resp. B) compartments. Therefore as a sum. Would you have any reference explaining why using a mean might be better ?
Best
Thank you very much for you reply.
I just understood "density" as a concentration of genes so, to me, it needed to be referenced to the length of the genome "portion" it was computed on. E.g. if there is twice as many bins with score < 0 but same number of genes in bins with score < 0 than in bins with score > 0, then gene density will be higher in the bins with score >0 (but sum of genes would still be same)
Concerning a reference, this article explains computation of local gene densities, so not exactly the same, but it seems close to what I have in mind.
I hope it makes sense.
Best regards,
Cath