Skip to content

Commit

Permalink
Update README.md
Browse files Browse the repository at this point in the history
  • Loading branch information
revl committed Jul 18, 2020
1 parent 9290d06 commit ae14ae3
Showing 1 changed file with 19 additions and 0 deletions.
19 changes: 19 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -136,6 +136,25 @@ immedialtely after the respective `parse_...()` method returned `ok` or

std::vector<std::string> info = vcf_scanner.get_info();

8. Parse genotype info.

if (vcf_scanner.get_header().has_genotype_info()) {
parse_to_completion(vcf_scanner.parse_genotype_format());

if (vcf_scanner.capture_gt()) {
while (vcf_scanner.genotype_available()) {
parse_to_completion(vcf_scanner.parse_genotype());

for (auto allele_index : vcf_scanner.get_gt()) {
// 1. The MISSING value is represented by
// allele_index < 0.
// 2. vcf_scanner.is_phased_gt() will return
// true if the genotype is phased.
}
}
}
}

10. Skip to the next line by calling `clear_line()`.

parse_to_completion(vcf_scanner.clear_line());
Expand Down

0 comments on commit ae14ae3

Please sign in to comment.