josefin-werme / LAVA

50 stars 9 forks source link

about the WARNNINGS #72

Open Licun1 opened 5 months ago

Licun1 commented 5 months ago

Hi, thank you providing this software. When I run a for-loop to analysis all the locus, I encountered some warning . I wonder whether these warnnings need to be solved?

univ.p.thresh = 1

Analyse

print(paste("Starting LAVA analysis for",n.loc,"loci")) progress = ceiling(quantile(1:n.loc, seq(.05,1,.05))) # (if you want to print the progress)

u=b=list() for (i in 1:n.loc) { if (i %in% progress) print(paste("..",names(progress[which(progress==i)]))) # (printing progress) locus = process.locus(loci[i,], input) # process locus

It is possible that the locus cannot be defined for various reasons (e.g. too few SNPs), so the !is.null(locus) check is necessary before calling the analysis functions.

if (!is.null(locus)) {

extract some general locus info for the output

loc.info = data.frame(locus = locus$id, chr = locus$chr, start = locus$start, stop = locus$stop, n.snps = locus$n.snps, n.pcs = locus$K)

# run the univariate and bivariate tests
loc.out = run.univ.bivar(locus, univ.thresh = univ.p.thresh)
u[[i]] = cbind(loc.info, loc.out$univ)
if(!is.null(loc.out$bivar)) b[[i]] = cbind(loc.info, loc.out$bivar)

} }

Warning: Estimates too far out of bounds (+-1.25) for phenotype(s) traitA ~ RA (-1.421) in locus 7. Values will be set to NA. To change this threshold, modify the 'param.lim' argument [1] "Warning: Negative variance estimate for phenotype(s) 'traitA' in locus 9; Dropping these as they cannot be analysed" [1] "Warning: Negative variance estimate for phenotype(s) 'RA' in locus 13; Dropping these as they cannot be analysed" Warning: Estimates too far out of bounds (+-1.25) for phenotype(s) traitA ~ RA (2.008) in locus 17. Values will be set to NA. To change this threshold, modify the 'param.lim' argument [1] "Warning: Negative variance estimate for phenotype(s) 'traitA' in locus 20; Dropping these as they cannot be analysed" Warning: Estimates too far out of bounds (+-1.25) for phenotype(s) traitA ~ RA (1.641) in locus 23. Values will be set to NA. To change this threshold, modify the 'param.lim' argument [1] "Warning: Negative variance estimate for phenotype(s) 'traitA' in locus 26; Dropping these as they cannot be analysed" [1] "Warning: Negative variance estimate for phenotype(s) 'RA' in locus 27; Dropping these as they cannot be analysed" Warning: Estimates too far out of bounds (+-1.25) for phenotype(s) traitA ~ RA (-1.786) in locus 28. Values will be set to NA. To change this threshold, modify the 'param.lim' argument

cadeleeuw commented 4 months ago

Hi,

Negative variance estimates arise if there is very little evidence of genetic signal in the locus, these will also be loci with very high univariate p-values for that phenotype in the given locus. For the out of bounds warnings, these typically occur if there is a lot of uncertainty in the rG estimate due to a low signal-to-noise ratio for that locus, this will sometimes yield an estimate far out of pounds (this would typically have a fairly high p-value as well, anyway). In both cases, these are just a function of the data, with just too little genetic signal in that locus for those phenotypes to obtain usable estimates. So these aren't issues that need to be solved, or really can be.

Best, Christiaan