{"id":18312924,"url":"https://github.com/zkamvar/genotype_iterators","last_synced_at":"2025-04-09T12:21:20.588Z","repository":{"id":24478305,"uuid":"27882358","full_name":"zkamvar/Genotype_Iterators","owner":"zkamvar","description":"Examples of genotype iteration utilized in Bruvo's distance in poppr","archived":false,"fork":false,"pushed_at":"2014-12-16T18:01:43.000Z","size":114468,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-04-01T21:06:56.524Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"C","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"gpl-3.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/zkamvar.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2014-12-11T17:11:27.000Z","updated_at":"2014-12-16T18:01:43.000Z","dependencies_parsed_at":"2022-08-06T02:00:58.967Z","dependency_job_id":null,"html_url":"https://github.com/zkamvar/Genotype_Iterators","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/zkamvar%2FGenotype_Iterators","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/zkamvar%2FGenotype_Iterators/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/zkamvar%2FGenotype_Iterators/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/zkamvar%2FGenotype_Iterators/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/zkamvar","download_url":"https://codeload.github.com/zkamvar/Genotype_Iterators/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248036394,"owners_count":21037161,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-11-05T16:25:51.596Z","updated_at":"2025-04-09T12:21:20.555Z","avatar_url":"https://github.com/zkamvar.png","language":"C","funding_links":[],"categories":[],"sub_categories":[],"readme":"## Genotype Iteration\n\nThis repository contains scripts I used to test implementation of Bruvo's \ndistance in C.\n\nIt also contains a script called `genome_addition_filler.c`, which is a scirpt\nthat demonstrates the imputation method for the genome model for Bruvo's \ndistance. It also demonstrates a generalization of the algorithm to be able to\ncreate DNA models for genotypes of any ploidy. \n\nThese are fully implemented in the [poppr R package](https://github.com/grunwaldlab/poppr)\n\n## Running\n\nYou can test out `genome_addition_filler.c` by modifying the `test_DNA()` \nfunction and compiling it with gcc:\n\n```\n$ gcc genome_addition_filler.c -o gam\n$ ./gam\n```\n\nHere is the output for triploids:\n\n```\n$ ./gam\n\nCREATING TRIPLOID GENOTYPE MODEL\n20 POSSIBLE COMBINATIONS\n===============\nGENOTYPE MODEL:\tAAA\nGENOTYPE MODEL:\tAAC\nGENOTYPE MODEL:\tAAG\nGENOTYPE MODEL:\tAAT\nGENOTYPE MODEL:\tACC\nGENOTYPE MODEL:\tACG\nGENOTYPE MODEL:\tACT\nGENOTYPE MODEL:\tAGG\nGENOTYPE MODEL:\tAGT\nGENOTYPE MODEL:\tATT\nGENOTYPE MODEL:\tCCC\nGENOTYPE MODEL:\tCCG\nGENOTYPE MODEL:\tCCT\nGENOTYPE MODEL:\tCGG\nGENOTYPE MODEL:\tCGT\nGENOTYPE MODEL:\tCTT\nGENOTYPE MODEL:\tGGG\nGENOTYPE MODEL:\tGGT\nGENOTYPE MODEL:\tGTT\nGENOTYPE MODEL:\tTTT\n\n```\n\nIf you wanted to specify a higher ploidy, that option is there, too:\n\n```\n$ ./gam 12 | head\n\nCREATING DODECAPLOID GENOTYPE MODEL\n455 POSSIBLE COMBINATIONS\n===============\nGENOTYPE MODEL:\tAAAAAAAAAAAA\nGENOTYPE MODEL:\tAAAAAAAAAAAC\nGENOTYPE MODEL:\tAAAAAAAAAAAG\nGENOTYPE MODEL:\tAAAAAAAAAAAT\nGENOTYPE MODEL:\tAAAAAAAAAACC\nGENOTYPE MODEL:\tAAAAAAAAAACG\n\n$ ./gam 12 | grep MODEL: | wc\n     455    1365   13195\n```","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fzkamvar%2Fgenotype_iterators","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fzkamvar%2Fgenotype_iterators","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fzkamvar%2Fgenotype_iterators/lists"}