I have many kmers counts from different prokaryotes, and I use a high markov order to obtain the expected counts to compare with the observed counts. And for look for over/under represented kmers counts I use z-scores. From z-scores I calculate my p-values and then e-values. So Iuse threshold e-value = 0.001 to select the extremes words/kmers.
However I got some 0.0 p-values/e-values for very extreme z-scores, due underflow.
Can I use a p-values that do not cause underflow to avoid the 0 values? For example, 1.0e-323 (the one that do not give 0 in my machine) when the p-value is zero? like: if p-val == 0, then 1.0e-323 else the p-val non zero? I use this function to calculate my p-values:
pval <- function(kmer_list, kmer_data){
n <- nrow(kmer_data)
for(i in 1:n){
zsc <- kmer_data[which(kmer_data$kmer == kmer_list[i]),
"Zscore"]
pval <- pnorm(-abs(zsc)) * 2
**# maybe the if statement as above?**
kmer_data[i, "Pval"] <- pval
}
return(kmer_data)
}
This solution is a valid statistical approach? Or I don't care and keep the zero p-values and zero e-values anyway?
I really appreciate any input.
pnorm
function has alog.p
argument. $\endgroup$