<p>Numbers, usually in the form of 0/1/2, is a common way many formats represent bases.</p>
<p>For example, if a SNPs has bases which are A/T, then these are encoded as 0/1, with the reference allele/base taking the 0 and the alternate allele/base taking 1.</p>
<p>However, if you read <a href="https://rajanil.github.io/fastStructure/" rel="nofollow noreferrer">the documentation</a>, it says:</p>
<blockquote>
<p>Specifically, rows in the data file correspond to samples, with two
rows per sample (note that only diploids are handled by this
software), and columns correspond to SNPs. The first 6 columns of the
file will be ignored; these typically would include IDs, metadata,
etc. This software only handles bi-allelic loci. <strong>The two alleles at
each locus can be encoded as desired</strong>; however, missing data should be
encoded as `-9'.</p>
</blockquote>
<p>So you should be able to use your base letters here and it will work OK as long as the columns and rows are formatted correctly.</p>

CC BY-SA 4.0
2020-09-23T12:52:07.487Z
2020-09-23T12:52:07.487Z
user438383
<p>The structure file for fastSTRUCTURE seem to be a table with rows and columns but the cells are all numbers, while my genotypes are simply bases. How could I know what I should insert there?</p>

CC BY-SA 4.0
2020-09-23T12:22:15.270Z
What format are your genotypes in at the moment? There is likely some tool someone has written to convert it to the correct format.
user438383
CC BY-SA 4.0
2020-09-23T12:40:03.460Z
Just table of 'A/C' bases
hiddenhospitalresearch
CC BY-SA 4.0
2020-09-23T12:41:53.800Z
'Table' isn't a format. What are the rows? What are the columns? Is it genotypes or alleles - i.e. is there one or two rows per marker? the more info you give, the easier it will be for someone to help you. Could you add a sample of your genotype format to the main answer so others can see it.
user438383
<file-formats>
What should be the numbers in the fastSTRUCTURE file?
# What should be the numbers in the fastSTRUCTURE file?

(Asked by: username_0 on 2020-09-23)

The structure file for fastSTRUCTURE seem to be a table with rows and columns but the cells are all numbers, while my genotypes are simply bases. How could I know what I should insert there?

**Tags:** file-formats
> **Comments:**
> **username_1**: What format are your genotypes in at the moment? There is likely some tool someone has written to convert it to the correct format.  
> **username_0**: Just table of 'A/C' bases  
> **username_1**: 'Table' isn't a format. What are the rows? What are the columns? Is it genotypes or alleles - i.e. is there one or two rows per marker? the more info you give, the easier it will be for someone to help you. Could you add a sample of your genotype format to the main answer so others can see it.  

---

## 1 answers

### Answer by username_1 on 2020-09-23. Score: 4 | Accepted answer

Numbers, usually in the form of 0/1/2, is a common way many formats represent bases.

For example, if a SNPs has bases which are A/T, then these are encoded as 0/1, with the reference allele/base taking the 0 and the alternate allele/base taking 1.

However, if you read [the documentation](https://rajanil.github.io/fastStructure/), it says:

> Specifically, rows in the data file correspond to samples, with two
> rows per sample (note that only diploids are handled by this
> software), and columns correspond to SNPs. The first 6 columns of the
> file will be ignored; these typically would include IDs, metadata,
> etc. This software only handles bi-allelic loci. **The two alleles at
> each locus can be encoded as desired**; however, missing data should be
> encoded as `-9'.

So you should be able to use your base letters here and it will work OK as long as the columns and rows are formatted correctly.


---

