bmansfeld / QTLseqr

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

runGprimeAnalysis #12

Closed wangyuu closed 5 years ago

wangyuu commented 5 years ago

when I run runGprimeAnalysis command, I got an error : Calculating tricube smoothed delta SNP index... Calculating G and G' statistics... Using deltaSNP-index to filter outlier regions with a threshold of 0.1 Estimating the mode of a trimmed G prime set using the 'modeest' package... Error in mutate_impl(.data, dots) : Evaluation error: non-numeric argument to mathematical function.

bmansfeld commented 5 years ago

Hi, That seems like you have some non-integer/numeric value in one of the columns. Check your column classes to see. How did you import that data? Ben

wangyuu commented 5 years ago

Thank you for your reply. I imported my data using the command : file <- "Apple.TwoPools.snp.table" Chroms < c("Chr10","Chr11","Chr13","Chr12","Chr15","Chr14","Chr17","Chr16","Chr01","Chr00","Chr03","Chr02","Chr05","Chr04","Chr07","Chr06","Chr09","Chr08") df <- importFromGATK (file = file, highBulk = HighBulk, lowBulk = LowBulk, chromList = Chroms)

It's weird that I can run this command "df_filt <- runQTLseqAnalysis (SNPset = df_filt, windowSize = 1e6, popStruc = "F2", bulkSize = 300, replications = 10000, intervals = c (95, 99))" and got the results.

Anyway, I will check my input data.

Thanks again.

wangyuu commented 5 years ago

Dear bmansfeld: I know the reason. My input SNP table is not filtered well. Multiple alleles like below existed. "Chr11 19224 C G,T 10,85,59 154 99 4506,1753,1880,2430,0,2611 2,46,68 116 99 3651,2186,2147,1393,0,1293" When I filtered these sites, I can run the command and got the results. Thanks again.

bmansfeld commented 5 years ago

Great! This is because QTLseqr parses those columns and saw the "," and didn't understand. Happy this was resolved. -Ben

cjchen5 commented 5 years ago

Hi Ben, I also got problem in runGprimeAnalysis when I use version 0.7.5.2 Here is my code, same with your guide.

> df_filt <- runGprimeAnalysis(
+   SNPset = df_filt,
+   windowSize = 1e6,
+   outlierFilter = "deltaSNP")

Here is output:

Counting SNPs in each window...
Calculating tricube smoothed delta SNP index...
Calculating G and G' statistics...
Error in locfit::locfit(Stat ~ locfit::lp(POS, h = windowSize, deg = 0),  : 
  fewer than one row in the data
In addition: There were 37 warnings (use warnings() to see them)
> warnings()
Warning messages:
1: In lfproc(x, y, weights = weights, cens = cens, base = base,  ... :
  Estimated rdf < 1.0; not estimating variance

Could you tell me what might cause that error? Thanks!

bmansfeld commented 5 years ago

it seems that your data aren't properly formatted. Please open a new issue post a head of your df_filt and we can try and resolve it. Ben

cjchen5 commented 5 years ago

Sure! Thank you for your quick response!

Zakeel-stack commented 4 years ago

Hi Ben, When I was running a runGprimeAnalysis, I got the following error and I was wondering how I can resolve this. Error in mutate_impl(.data, dots) : Evaluation error: fewer than one row in the data. In addition: There were 50 or more warnings (use warnings() to see the first 50) Appreciate your advice on this. Zakeel

bmansfeld commented 4 years ago

Zekeel, It seems that your data frame is empty. Please check the import and filtering steps. If there is still an issue please open another issue. Ben

Zakeel-stack commented 4 years ago

Hi.

I think the import and filtering steps are okay. For the plant I am working with, the chromosome positions are still unknown and I have used the contig position in place of chromosome number. Is it okay or is it the reason for the error? How can I overcome this or proceed with the analysis with the contig information only.

Thanks

Get Outlook for Androidhttps://aka.ms/ghei36


From: Ben Mansfeld notifications@github.com Sent: Wednesday, September 11, 2019 2:51:14 AM To: bmansfeld/QTLseqr QTLseqr@noreply.github.com Cc: Mohamed Zakeel Mohamed Cassim m.mohamedzakeel@uq.net.au; Comment comment@noreply.github.com Subject: Re: [bmansfeld/QTLseqr] runGprimeAnalysis (#12)

Zekeel, It seems that your data frame is empty. Please check the import and filtering steps. If there is still an issue please open another issue. Ben

— You are receiving this because you commented. Reply to this email directly, view it on GitHubhttps://github.com/bmansfeld/QTLseqr/issues/12?email_source=notifications&email_token=ANCI7RTXBPFLSBYQXAZPEWTQI7GAFA5CNFSM4GJK7RCKYY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOD6LYW7Y#issuecomment-530025343, or mute the threadhttps://github.com/notifications/unsubscribe-auth/ANCI7RTGUO6LJUN64H6SG6TQI7GAFANCNFSM4GJK7RCA.