alexkychen / assignPOP

Population Assignment using Genetic, Non-genetic or Integrated Data in a Machine-learning Framework. Methods in Ecology and Evolution. 2018;9:439–446.
http://alexkychen.github.io/assignPOP/
GNU General Public License v3.0
17 stars 4 forks source link

Error running subset of individuals/loci (assign.matrix) #23

Open quinn-ca opened 10 months ago

quinn-ca commented 10 months ago

Hi and thanks for the great software,

Everything has been working well so far (thanks for the documentation!), however, I'm getting an error when I run assign.matrix with for specific proportions of loci/individuals. The error states: Error in if (!train.inds == "all") { : the condition has length > 1.

The code below works well: assign.matrix( dir="assignPOP/MSI_vs_North/known_assignPOP_Result/")

However, the following code produces the error: assign.matrix( dir="assignPOP/MSI_vs_North/known_assignPOP_Result/", train.inds=c(0.7, 0.9), train.loci=c(0.5, 1))

This was the code I used to generate the results: assign.MC(known_2_assnPOP_data_95, train.inds=c(0.5, 0.7, 0.9), train.loci=c(0.1, 0.25, 0.5, 1), loci.sample="fst", iterations=100, model="svm", dir="assignPOP/MSI_vs_North/known_assignPOP_Result/")

I'd appreciate any help you can offer! Quinn