From Genome Analysis Wiki
Jump to navigationJump to search
532 bytes added
, 16:35, 13 April 2010
Line 31: |
Line 31: |
| return 0; | | return 0; |
| } | | } |
| + | |
| + | // Estimate allele frequencies for all markers |
| + | ped.EstimateAlleleFrequencies(); |
| | | |
| // Get some genotype statistics for the first marker | | // Get some genotype statistics for the first marker |
| printf("Statistics for marker %s\n", (const char *) ped.markerNames[0]); | | printf("Statistics for marker %s\n", (const char *) ped.markerNames[0]); |
| + | |
| + | // Get information on the first marker |
| + | MarkerInfo * info = ped.GetMarkerInfo(0); |
| + | |
| + | // Get information on marker rs12345 |
| + | MarkerInfo * rs12345 = ped.GetMarkerInfo("rs12345"); |
| + | |
| + | // Number of alleles for the first marker |
| + | int alleleCount = info.GetAlleleCount(); |
| + | |
| + | // Frequency of the first allele |
| + | int freq1 = info.freq[1]; |
| + | |
| + | // Name of the first allele, typically "A", "C", "G" or "T" for SNPs |
| + | String label = info.GetAlleleLabel(1); |
| } | | } |
| </source> | | </source> |