dipetkov / eems

Estimating Effective Migration Surfaces
GNU General Public License v2.0
102 stars 28 forks source link

Error in *.coord #44

Closed tuan-web closed 4 years ago

tuan-web commented 4 years ago

I am a new student in bioinformatics, so When I tried eems, some problems occurred that I could not solve well. I input the geographic coordinates of the samples into the .coord file, but it reported an error: Check that .coord is a list of locations, two coordinates per row. Maybe I just started so I didn’t find the problem in format description.

Some of my input coordinates are as follows:

15.90530 7.75420 15.90530 7.75420 15.90530 7.75420 15.90530 7.75420 15.90530 7.75420 8.56460 3.45940 8.56460 3.45940 8.56460 3.45940 8.56460 3.45940 8.56460 3.45940 8.56460 3.45940 8.56460 3.45940 4.85190 6.01280 4.85190 6.01280 4.85190 6.01280 4.85190 6.01280 4.85190 6.01280

please help me thanks a lot

nitinra commented 2 years ago

I am getting the same error. Did you figure out what the issue was?

Here is my list of locations finalfile_indfil_sitefil_snp_indel_ldprune_lowsamplegcc.coord.txt :

Nico-laF commented 2 years ago

Did you ever figure out what it was? I am now getting the same!

kepperly commented 2 years ago

I am getting the same as well! Hoping there is a solution.

Nico-laF commented 2 years ago

Hey Kepperly, I know it is frustrating, but just try to play around a bit with the input files. I just copy-pasted some parts form the example data and combined it with my own genotypes. In the end, I think it was how my input files were formatted not the coordinates themselves. In the end, it worked for me, though there is no specific thing I could name that changed things. I hope you can get it to work soon. Sorry for not being more helpful.

dipetkov commented 2 years ago

Hello kepperly and Nico-laF, Please check that: a) the input file with the coordinates is called something like "dataset_name.coord", not "dataset_name.coord.txt" and b) there are the same number of rows in "dataset_name.coord" and "dataset_name.diffs".

dipetkov commented 2 years ago

This error message shows up if the coordinates don't have the expected dimensions (nIndiv,2). The number of individuals nIndiv comes from the configuration file (the file with the .ini extension.) As Nico-laF points out, this could happen if the readMatrix function fails somehow while reading the coordinates. Or if there is an actual data mismatch.

PS. It looks like this error message is very unhelpful. I'll update it.

Nico-laF commented 2 years ago

I figured out, why I got this error before (but now it works): I am working with clonal fungi and when there are clones within the same site (i.e., with the same coordinates) this error pops up. Clones between sites work well though. So for some people this might also be a reason (my input files were always fine, it was simply this which took me a while to realise). Best to clone correct before running EEMS.

kepperly commented 2 years ago

Thanks everyone for your help! My coordinates file was named with a ".coord" not ".txt", I just added the ".txt so I could upload it. My nIndiv in the configuration file did match the number of coordinate pairs as well. In the end I just saved the .coord file with Unix formatted line breaks and everything started working. I'm not sure how that fixed it, or if it was something else I did without realizing, but everything is running smooth now. I wish I had a more concrete answer as to how the issue was resolved, but at least it is working now!

Thanks again!

BridgetCampbell commented 11 months ago

Hey @kepperly, how did you change the formatting of your line breaks? :)