Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/zkamvar/genotype_iterators
Examples of genotype iteration utilized in Bruvo's distance in poppr
https://github.com/zkamvar/genotype_iterators
Last synced: 2 days ago
JSON representation
Examples of genotype iteration utilized in Bruvo's distance in poppr
- Host: GitHub
- URL: https://github.com/zkamvar/genotype_iterators
- Owner: zkamvar
- License: gpl-3.0
- Created: 2014-12-11T17:11:27.000Z (almost 10 years ago)
- Default Branch: master
- Last Pushed: 2014-12-16T18:01:43.000Z (almost 10 years ago)
- Last Synced: 2024-06-12T18:23:44.670Z (5 months ago)
- Language: C
- Size: 109 MB
- Stars: 0
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
## Genotype Iteration
This repository contains scripts I used to test implementation of Bruvo's
distance in C.It also contains a script called `genome_addition_filler.c`, which is a scirpt
that demonstrates the imputation method for the genome model for Bruvo's
distance. It also demonstrates a generalization of the algorithm to be able to
create DNA models for genotypes of any ploidy.These are fully implemented in the [poppr R package](https://github.com/grunwaldlab/poppr)
## Running
You can test out `genome_addition_filler.c` by modifying the `test_DNA()`
function and compiling it with gcc:```
$ gcc genome_addition_filler.c -o gam
$ ./gam
```Here is the output for triploids:
```
$ ./gamCREATING TRIPLOID GENOTYPE MODEL
20 POSSIBLE COMBINATIONS
===============
GENOTYPE MODEL: AAA
GENOTYPE MODEL: AAC
GENOTYPE MODEL: AAG
GENOTYPE MODEL: AAT
GENOTYPE MODEL: ACC
GENOTYPE MODEL: ACG
GENOTYPE MODEL: ACT
GENOTYPE MODEL: AGG
GENOTYPE MODEL: AGT
GENOTYPE MODEL: ATT
GENOTYPE MODEL: CCC
GENOTYPE MODEL: CCG
GENOTYPE MODEL: CCT
GENOTYPE MODEL: CGG
GENOTYPE MODEL: CGT
GENOTYPE MODEL: CTT
GENOTYPE MODEL: GGG
GENOTYPE MODEL: GGT
GENOTYPE MODEL: GTT
GENOTYPE MODEL: TTT```
If you wanted to specify a higher ploidy, that option is there, too:
```
$ ./gam 12 | headCREATING DODECAPLOID GENOTYPE MODEL
455 POSSIBLE COMBINATIONS
===============
GENOTYPE MODEL: AAAAAAAAAAAA
GENOTYPE MODEL: AAAAAAAAAAAC
GENOTYPE MODEL: AAAAAAAAAAAG
GENOTYPE MODEL: AAAAAAAAAAAT
GENOTYPE MODEL: AAAAAAAAAACC
GENOTYPE MODEL: AAAAAAAAAACG$ ./gam 12 | grep MODEL: | wc
455 1365 13195
```