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?

  • $\begingroup$ What format are your genotypes in at the moment? There is likely some tool someone has written to convert it to the correct format. $\endgroup$
    – user438383
    Commented Sep 23, 2020 at 12:22
  • $\begingroup$ Just table of 'A/C' bases $\endgroup$ Commented Sep 23, 2020 at 12:40
  • $\begingroup$ '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. $\endgroup$
    – user438383
    Commented Sep 23, 2020 at 12:41

1 Answer 1


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, 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.


Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.