bmansfeld / QTLseqr

QTLseqr is an R package for QTL mapping using NGS Bulk Segregant Analysis
64 stars 42 forks source link

BUG? #46

Closed yuanlizhanshi closed 3 years ago

yuanlizhanshi commented 3 years ago

when i try to run runGprimeAnalysis function, the following messages showed,and the result was become quite strange...

Counting SNPs in each window...
Calculating tricube smoothed delta SNP index...
Calculating G and G' statistics...
Using deltaSNP-index to filter outlier regions with a threshold of 0.05
Estimating the mode of a trimmed G prime set using the 'modeest' package...
Calculating p-values...
Warning messages:
1: Problem with `mutate()` input `pvalue`.
i encountered a tie, and the difference between minimal and 
                   maximal value is > length('x') * 'tie.limit'
the distribution could be multimodal
i Input `pvalue` is `getPvals(...)`. 
2: encountered a tie, and the difference between minimal and 
                   maximal value is > length('x') * 'tie.limit'
the distribution could be multimodal 
yuanlizhanshi commented 3 years ago

I was very confused with this problem when I run the same code on another computer, it can only work at first several times....

bmansfeld commented 3 years ago

Hi thanks for your question. This is not a bug. It's a warning from the modeest package which is used when estimating the mode of a trimmed G prime set. It's saying that for some reason your g prime set as a tie when calculating the mode. I would recommend plotting the G prime distribution to see where this is coming from. you can try using the deltaSNP method for estimating G' pvalues too if you'd prefer this doesn't rely on estimating the mode. Look at the help file for runGprimeAnalysis and getPvals There are other approaches to calculate the mode through the modeest package if you want to try re-coding the functions. Ben