Closed AnjumanArif closed 4 years ago
Sorry to hear that you are having difficulties! To help debug your problem, could you please post the code you are running to produce the error, and at least a description of the input files?
Hi, Thanks for replying. I have 192 genotypes with 12763 loci in construct file. I am using these commands as below for data construction and attaching the longitude and latitude file (coord) and out file (geoDist) in excel fomat after copying from RStudio. : Also attaching a subset of structure text file of all SNPs. x<-as.numeric(c(142.702789,--------------------)) length(x) 192 long<-x x<-as.numeric(c(-20.917574,)) length(x) lati<-x coord<-cbind(long,lati) is.matrix(coord)
output file freqs used for analysis as such after structure2conStruct formatting.
fields::rdist.earth(x1 = coord,x2 = NULL, miles = TRUE, R = NULL) out<- rdist.earth (coord) upper<- col(out)> row( out) hist( out[upper]) geoDist<-out
anjumConStruct <- list(freqs=freqs, coord=coord, geoDist=geoDist)
my.run<- conStruct(spatial = TRUE, K = 3, freqs = anjumConStruct$freqs, geoDist = anjumConStruct$geoDist, coords = anjumConStruct$coord, prefix = "spK3", n.chains = 1, n.iter = 1000, make.figs = TRUE, save.files = TRUE)
my.run <- conStruct(spatial = TRUE, K = 3, freqs = anjumconStruct$freqs, geoDist = anjumconStruct$geoDist, coords = anjumconStruct$coord, prefix = "spK") I am recieving this error as below: Error in if (any(args[["geoDist"]] < 0)) { : missing value where TRUE/FALSE needed
I will cordially appreciate your help. Thanks and stay blessed Anjum
On Thu, Oct 31, 2019 at 9:11 PM Peter Ralph notifications@github.com wrote:
Sorry to hear that you are having difficulties! To help debug your problem, could you please post the code you are running to produce the error, and at least a description of the input files?
— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/gbradburd/conStruct/issues/27?email_source=notifications&email_token=AMOFTPBMKSZ4SIRLKGHFPMLQRL7SXA5CNFSM4JHIAKP2YY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOECYLE4Y#issuecomment-548450931, or unsubscribe https://github.com/notifications/unsubscribe-auth/AMOFTPFHTCE66YRU7TLJ2MDQRL7SXANCNFSM4JHIAKPQ .
Hi, I have resolved the issue for this part. If required will get back for assistance.
thanks a lot.
can not understand what is this error while running conStruct."Error in if (any(args[["geoDist"]] < 0)) { : missing value where TRUE/FALSE needed".** I have checked everything is fine. Please help