gphocs-dev / G-PhoCS

G-PhoCS is a software package for inferring ancestral population sizes, population divergence times, and migration rates from individual genome sequences.
33 stars 4 forks source link

Error generating tree with Control File Generator #87

Open avalflo opened 1 year ago

avalflo commented 1 year ago

Hello, I am trying to generate the control file with ControlFileGenerator, but I have problems while generating the tree. I am using this tree in newick format:

((((((((JUNC3,NIG3),JUNC1),(JUNC4,JUNC2)),((NIG1,NIG2),(JUNC5,NIG4))),NIG5),((TRANS2,TRANS3),(TRANS5,(TRANS4,TRANS1)))),(INTRI3,(INTRI5,(INTRI1,(INTRI4,INTRI2))))),OUT);

I get this error: Errors in the Tree input: Duplicate names for POPs are not allowed!

I tried also changing the names of the populations, and also added "root" like this: ((((((((JUNC3,NIG3),JUNC1),(JUNC4,JUNC2)),((NIG1,NIG2),(JUNC5,NIG4))),NIG5),((TRANS2,TRANS3),(TRANS5,(TRANS4,TRANS1)))),(INTRI3,(INTRI5,(INTRI1,(INTRI4,INTRI2))))),OUT)root

but I am still getting the same error. I do not understand the problem, as I do not see the duplicate names here...

Could you help me, please?

Thanks!

igronau commented 1 year ago

Sorry for the delayed response. I haven't personally used the control file generator in a long while, so I might be a bit rusty. One issue I see with your tree is that you're not specifying names for ancestral populations. The labels in your newick string appear to represent only sampled populations. This might cause the problem. One suggestion I have is to start by defining a subtree over 3-4 sampled populations. Once you're able to get this right, it should be easier to expand this to your entire sample set.