Menu

HaplotypeFile

Robert Kofler Christos Vlachos

1 Introduction: --haplotypes-g0

The parameter --haplotypes-g0 allows to specify the haplotypes of the base population.
This input format needs to accommodate the following requirements

  • specify haplotypes of diploids as well as haploid individuals
  • allow to specify the sex for the provided haplotypes
  • allow for autosomes and hemizygous sex chromosomes

2 Basic haplotype file: diploid

The haplotype of the base population (not evolved). This step also determines the population size.

Every row represents a SNP and columns are separated by tab.

Note Ideally the columns are separated by tabulator where the haplotype information for the entire population is considered to be a single column; The haploid genomes of the individuals are than separated by space (in recent versions, v0.20.1 or later, MimicrEE2 accepts space and tab)

For example:

2R  10  G  A/G  AG AA AA AA GG
3L  20  G  C/G  GC CC GC CG GG
3R  30  A  T/A  TT TA AA AT TA
X  40  T  G/T  TG GG GG TT GG
X  50  T  T/C  CC TC CC TT CT
  • col1: chromosome of a SNP
  • col2: position of a SNP
  • col3: reference character of a SNP
  • col4: ancestral/derived allele
  • col5: the haplotypes in the form "12 34 56 ...." where 1 is the allele of the first haplotype, 2 the allele of the second haplotype and so on. Always two consecutive haplotypes constitute one diploid individual. To facilitate a quick identification of diploid genotypes, the genotypes of diploids have been separated by a space.

Based on the above example we have the following haplotypes

  • hap1: AGTTC
  • hap2: GCTGC
  • hap3: ACTGT
  • hap4: ACAGC
  • ...
  • hap9: GGTGC
  • hap10: GGAGT

And the following diploid individuals

  • diploid1: AGTTC + GCTGC
  • diploid2: ACTGT + ACAGC
  • ...
  • diploid5: GGTGC + GGAGT

3 Basic haplotype file: haploids

For simulations of haploids use the command line option --haploid.
For these simulations the input haplotypes need to be provided in the following format.

2R  10  G  A/G  A A A A G
3L  20  G  C/G  G C G C G
3R  30  A  T/A  T T A A T
X  40  T  G/T  T G G T G
X  50  T  T/C  C T C T C
  • col1: chromosome of a SNP
  • col2: position of a SNP
  • col3: reference character of a SNP
  • col4: ancestral/derived allele
  • col5: the haplotypes in the form "1 2 3 4 5..." where 1 is the allele of the first haplotype, 2 the allele of the second haplotype and so on. Always one haplotype constitutes the genome of one haploid individual.

Based on the above example we have the following haploid individuals

  • hap1: AGTTC
  • hap2: ACTGT
  • hap3: AGAGC
  • hap4: ACATT
  • hap5: GGTGC

4 Sex assignments to haplotypes

It is possible to assign sexes to the haplotypes; this is done within a special comment line starting with '#sex; Columns in this comment linear are delimited by \s+, i.e. any number of white spaces. The number of provided sexes must match the number of provided diploids. It is possible to specify males (M), females (F) and hermaphrodites (H).

# regular comment
#sex            M  M  F  F  H
2R  10  G  A/G  AG AA AA AA GG
3L  20  G  C/G  GC CC GC CG GG
3R  30  A  T/A  TT TA AA AT TA
X  40  T  G/T  TG GG GG TT GG
X  50  T  T/C  CC TC CC TT CT

5 Hemizygous sex chromosomes

Hemizygous sex chromosomes can be provided in two ways: implicitly vs. explicitly

option 1: explicitly

Assuming males only have a single X-chromosome; ie. X is hemizygous in males;
This may be specified as in the following example:

# regular comment
#sex            M  M  F  F  M
2R  10  G  A/G  AG AA AA AA GG
3L  20  G  C/G  GC CC GC CG GG
3R  30  A  T/A  TT TA AA AT TA
X  40  T  G/T  T T TG TA A
X  50  T  T/C  T T TG TG A

option 2: implicitly

Again assuming the X-chromosome is hemizygous in males.

If you provide the following input:

# regular comment
#sex            M  M  F  F  M
2R  10  G  A/G  AG AA AA AA GG
3L  20  G  C/G  GC CC GC CG GG
3R  30  A  T/A  TT TA AA AT TA
X  40  T  G/T  TG TG TG TA AT
X  50  T  T/C  TG TG TG TG AT

MimicrEE2 will interpret this as

# regular comment
#sex            M  M  F  F  M
2R  10  G  A/G  AG AA AA AA GG
3L  20  G  C/G  GC CC GC CG GG
3R  30  A  T/A  TT TA AA AT TA
X  40  T  G/T  T T TG TA A
X  50  T  T/C  T T TG TG A

note

Even when simulating diploids MimicrEE2 allows to specify haploid genomes for each individual as in the following example:

2R  10  G  A/G  A A A A G
3L  20  G  C/G  G C G C G
3R  30  A  T/A  T T A A T
2L  40  T  G/T  T T T A A
2L  50  T  T/C  T T T A A

MimicrEE2 will interpret this as homozygote:

2R  10  G  A/G  AA AA AA AA GG
3L  20  G  C/G  GG CC GG CC GG
3R  30  A  T/A  TT TT AA AA TT
2L  40  T  G/T  TT TT TT AA AA
2L  50  T  T/C  TT TT TT AA AA

Related

Wiki: Home
Wiki: Manual
Wiki: MinimalWalkthrough
Wiki: MinimalWalkthroughWithSex
Wiki: OutputFiles

Want the latest updates on software, tech news, and AI?
Get latest updates about software, tech news, and AI from SourceForge directly in your inbox once a month.