-
Notifications
You must be signed in to change notification settings - Fork 4
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
accuracy.MC error #2
Comments
Hi, are you trying to run accuracy.MC for your assign.MC results saved in the folder "MC"? If so, you should specify the same folder name when running accuracy.MC. [ i.e., accuracy.MC(dir="MC/") ]. Please let me know if the problem is something else. Thanks :) |
I do not think the problem is specification of the directory. Here is my exact code and the terminal output. I think that assign.MC is working because check.loci works, but the accuracy.MC command is not. The input file does not seem to be an issue because analysis through the kfold method works as expected.
3 cores/threads of CPU will be used for analysis...
enter here: all Results were saved in a 'High_Fst_Locus_Freq.txt' file in the directory. |
Hi, It looks like the problem may relate to those "Out_xx_xx_xx.txt" files in the folder. Could you copy and paste the first few rows of data, including column name from any of those files? How many populations you have? If you have 3 populations, you should see 6 columns in your data. Columns are separated by space. Thanks. |
There are 7 reference/training populations. Ind.ID origin.pop pred.pop pop.1 pop.2 pop.3 pop.4 pop.5 pop.6 pop.7 |
Your populations, sample ID, and column names seem to be correct. I've manipulated my data to run the accuracy.MC, but still have trouble to generate the error message like you have. Do you mind to send me your zipped MC2 folder? I can run it from my side and take a closer look where is the problem. Please email me at [email protected]. Meanwhile, if you haven't done it, could you download the example data (simGenepop.txt) and give it a quick run on your computer to see if it works? Thanks so much. |
I have a similar error message:
|
One other thing... my genepop data is in 3 digit fragment size format as opposed to allele number format if that would be relevent. I ran the test data set you mention above and that works just fine. |
Hi, How many samples/individuals do you have in each of the populations? PS. Number of digits in your Genepop file should have nothing to do with the function accuracy.MC., but thanks for providing that information. Just be sure to set "haploid=TRUE" in read.Genepop, if your data is haploid data type. |
Thanks so much for you response. I do indeed have a few small pops that I
will remove and try again. I'll let you know how it goes. Cheers... ABC
…On Tue, Mar 20, 2018 at 2:02 PM, Alex Chen ***@***.***> wrote:
Hi, How many samples/individuals do you have in each of the populations?
If one of your populations has only 4 or less individuals, this error
could happen when using train.inds=0.9 in your assign.MC analysis. It means
no individual from small populations (looks like 4 out of 20 in your case)
were assigned to test sets, because 4 x 0.9 is rounded up as 4. To fix it,
you could either use a fixed number of training individuals (e.g.,
train.inds = 3) in assign.MC or increase your sample size in small
populations. Some people duplicate individuals in small populations, but
that could inflate your results in those populations.
If your issue is something else, please let me know and I will further
investigate. Thanks!
PS. Number of digits in your Genepop file should have nothing to do with
the function accuracy.MC., but thanks for providing that information. Just
be sure to set "haploid=TRUE" in read.Genepop, if your data is haploid data
type.
—
You are receiving this because you commented.
Reply to this email directly, view it on GitHub
<#2 (comment)>,
or mute the thread
<https://github.com/notifications/unsubscribe-auth/AekAo8aJvQg-Dh--6rKFAbbYV5u1NlHqks5tgW5WgaJpZM4RjTtY>
.
|
@rmpeery @allanbcostello |
I got this same error yesterday, and in my case I think it was related to using a dash in one of my population names. (When I relabelled, it ran fine.) Thought I'd add this in case anyone else runs into the same issue. Thanks for a really nice tool, and for providing such clear instructions! |
@TepoltC |
I have successfully analyzed a dataset with 248 individuals and ca. 9700 loci within assignPop using the kfold method, however, the MC method is giving an error that I'm hoping you can help with. I've tried using the information from the vignette as a starting point:
assign.MC(referenceAlleles, train.inds=c(10, 15, 19), train.loci=c(0.1, 0.25, 0.5, 1), loci.sample="fst",
iterations=30, multiprocess = TRUE, model="lda", dir="MC/")
but when I run accuracy.MC(dir="MC2/") I get the error:
Error in
[<-.data.frame
(*tmp*
, i, , value = c(0.333333333333333, 0.235294117647059, :replacement has 6 items, need 7.
Do you have any suggestions on how I can fix the input file so that accuracy.MC will run? I'm running R v. 3.4.2 through R studio v. 1.1.383.
The text was updated successfully, but these errors were encountered: