Answers.Body: <p>Hmmmm .... you don't actually need pop ID to work for Structure, providing their are no logical errors (you get a wrong answer). The bit that must work is the <em>a priori</em> number of populations in the data set. You are then going to manually (or via a script) feed a range of <em>a priori</em> values into Structure, run each and plot the likelihood. Where the likelihood plateaus thats the number of populations contained within your data. This is the key output of Structure.</p>
  <p>Personally, I would perform a Structure run on the test data and remove the <code>pop ID</code> column and check the answers (likelihood -lnL) are identical. Thereafter use an approach such as <span class="math-container">$F_{ST}$</span> to interrogate the exact members of each population delineation.</p>
  <hr />
  <p>I think your test will work .... The only thing I can think of is the header comprises a space, This format just needs checking against the test data.</p>
  
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2020-08-13T10:07:10.423Z
Answers.Text: Hi Michael, thank you for your answer. I checked the text file in ```notepad ++``` showing all characters, but nothing seems wrong. I would also like to make a triangle plot in ```structure```, isn't it therefore required to have ```pop IDs```? Anyway, it should work even with ```pop IDs``` included. My plan for now is to run the ```structure``` analyses (from K=1 to K=9) and then analyse the data with ```structure harvester``` to determine the number of populations (delta K)
Answers.UserDisplayName: RobH
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2020-08-13T10:59:22.887Z
Answers.Text: I agree that pop ID would be useful, and if membership of a population is not intuitive (e.g. geographic foci) - its imporant, but debugging this remotely is tricky. Your strategy K1 to K9 is absolutely correct. Structure is rarely used in isolation however, hence population membership can be explored notably by Fst using a variety of methods.
Answers.UserDisplayName: M__
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2020-08-13T11:42:38.917Z
Answers.Text: Yes, my next step would be to analyse the data in ```popgene32```. Thank you for the help.
Answers.UserDisplayName: RobH
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2020-08-12T23:57:57.593Z
Answers.LastActivityDate: 2020-08-13T00:05:25.450Z
Answers.LastEditDate: 2020-08-13T00:05:25.450Z
Answers.UserDisplayName: M__
Body: <p>I'm using <code>structure</code> for the first time and I fail to execute a &quot;job&quot;. For some reason, <code>structure</code> interprets the <code>pop ID</code> column as locus.</p>
  <p>I have following <code>.txt</code> file</p>
  <p><a href="https://i.sstatic.net/4dIW6.jpg" rel="nofollow noreferrer"><img src="https://i.sstatic.net/4dIW6.jpg" alt="head of the .txt file" /></a></p>
  <p>The first column are <code>sample labels</code>, the second column are <code>population IDs</code> and then there are 26 columns containing the locus information (i.e. 13 markers). Thus, in total 28 columns. It is a diploïd organism so each locus consists of 2 consecutive columns (as described in <code>structure</code> manual). In total there are 64 rows (so 64 samples)</p>
  <p>I load this <code>.txt</code> file into <code>structure</code>, specifying following parameters:</p>
  <p>-<code>number of individuals</code> 64</p>
  <p>-<code>Ploidy of data</code> 2</p>
  <p>-<code>number of loci</code> 13</p>
  <p>-<code>missing data value</code> -9</p>
  <p>-<code>special format: data file stores data for individuals in single line</code></p>
  <p>-<code>individual ID for each individual</code></p>
  <p>-<code>putative population origin for each individual</code></p>
  <p>The loaded file looks like:</p>
  <p><a href="https://i.sstatic.net/fX27p.jpg" rel="nofollow noreferrer"><img src="https://i.sstatic.net/fX27p.jpg" alt="head of structure file" /></a></p>
  <p>This looks good. My samples have a separate column, <code>pop ID</code> is a separate column for possible populations an then for each <code>locus</code> there are 2 columns. Not all loci are visible on screenshot, but there are 13.</p>
  <p>I want to calculate <code>Delta K</code> and therefore I want to run a job. However when I run it, I get following error:</p>
  <p><a href="https://i.sstatic.net/XESWZ.jpg" rel="nofollow noreferrer"><img src="https://i.sstatic.net/XESWZ.jpg" alt="enter image description here" /></a></p>
  <p>I get this error for each row/individual. It appears that <code>structure</code> interprets the <code>pop ID</code> values (&quot;Noord&quot;,&quot;Zuid&quot;, &quot;onbekend&quot;) as 14th locus, but I have never specified a 14th locus.  I fail to understand why this happens.</p>
  <p>When I run the program without <code>pop ID</code> column, it works.</p>
  <p>Could anyone please advise me on how to solve this error?</p>
  
Tags: <phylogenetics>
Title: STRUCTURE interprets pop ID as locus
ThreadText: # STRUCTURE interprets pop ID as locus
  
  (Asked by: username_0 on 2020-08-12)
  
  I'm using `structure` for the first time and I fail to execute a "job". For some reason, `structure` interprets the `pop ID` column as locus.
  
  I have following `.txt` file
  
  [![head of the .txt file](https://i.sstatic.net/4dIW6.jpg)](https://i.sstatic.net/4dIW6.jpg)
  
  The first column are `sample labels`, the second column are `population IDs` and then there are 26 columns containing the locus information (i.e. 13 markers). Thus, in total 28 columns. It is a diploïd organism so each locus consists of 2 consecutive columns (as described in `structure` manual). In total there are 64 rows (so 64 samples)
  
  I load this `.txt` file into `structure`, specifying following parameters:
  
  -`number of individuals` 64
  
  -`Ploidy of data` 2
  
  -`number of loci` 13
  
  -`missing data value` -9
  
  -`special format: data file stores data for individuals in single line`
  
  -`individual ID for each individual`
  
  -`putative population origin for each individual`
  
  The loaded file looks like:
  
  [![head of structure file](https://i.sstatic.net/fX27p.jpg)](https://i.sstatic.net/fX27p.jpg)
  
  This looks good. My samples have a separate column, `pop ID` is a separate column for possible populations an then for each `locus` there are 2 columns. Not all loci are visible on screenshot, but there are 13.
  
  I want to calculate `Delta K` and therefore I want to run a job. However when I run it, I get following error:
  
  [![enter image description here](https://i.sstatic.net/XESWZ.jpg)](https://i.sstatic.net/XESWZ.jpg)
  
  I get this error for each row/individual. It appears that `structure` interprets the `pop ID` values ("Noord","Zuid", "onbekend") as 14th locus, but I have never specified a 14th locus. I fail to understand why this happens.
  
  When I run the program without `pop ID` column, it works.
  
  Could anyone please advise me on how to solve this error?
  
  **Tags:** phylogenetics
  
  
  ---
  
  ## 1 answers
  
  ### Answer by username_1 on 2020-08-12. Score: 1
  
  Hmmmm .... you don't actually need pop ID to work for Structure, providing their are no logical errors (you get a wrong answer). The bit that must work is the *a priori* number of populations in the data set. You are then going to manually (or via a script) feed a range of *a priori* values into Structure, run each and plot the likelihood. Where the likelihood plateaus thats the number of populations contained within your data. This is the key output of Structure.
  
  Personally, I would perform a Structure run on the test data and remove the `pop ID` column and check the answers (likelihood -lnL) are identical. Thereafter use an approach such as $F\_{ST}$ to interrogate the exact members of each population delineation.
  
  ---
  
  I think your test will work .... The only thing I can think of is the header comprises a space, This format just needs checking against the test data.
  
  > **Comments:**
  > **username_0**: Hi Michael, thank you for your answer. I checked the text file in ```notepad ++``` showing all characters, but nothing seems wrong. I would also like to make a triangle plot in ```structure```, isn't it therefore required to have ```pop IDs```? Anyway, it should work even with ```pop IDs``` included. My plan for now is to run the ```structure``` analyses (from K=1 to K=9) and then analyse the data with ```structure harvester``` to determine the number of populations (delta K)  
  > **username_1**: I agree that pop ID would be useful, and if membership of a population is not intuitive (e.g. geographic foci) - its imporant, but debugging this remotely is tricky. Your strategy K1 to K9 is absolutely correct. Structure is rarely used in isolation however, hence population membership can be explored notably by Fst using a variety of methods.  
  > **username_0**: Yes, my next step would be to analyse the data in ```popgene32```. Thank you for the help.  
  
  ---
  
  