Entering edit mode
2.2 years ago
rheab1230
▴
140
I have a gene count datasets that look like:
I am trying to do inverse normal transformation on this dataset but the results are coming like this:
I want to do it across samples. so basically want to get an output that looks like sample as column and gene as row and INT applied across sample for each gene.
inormal <- function(x)
{
data <<- (qnorm((rank(x, na.last = "keep") - 0.5) / sum(!is.na(x))))
}
What's wrong with a for loop here?
yes, this worked. thank you.
Minor typos fixed
Thank you for this code, LChart !