diff --git a/CHANGELOG.md b/CHANGELOG.md index 61624dd..ed1e26d 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -3,6 +3,14 @@ Format based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/) +## [2.1.10] + +### Added +- List SNPs associated with a given queried haplogroup + +[2.1.10]: https://github.com/23andMe/yhaplo/compare/2.1.9..2.1.10 + + ## [2.1.9] ### Fixed diff --git a/scripts/validate_yhaplo.sh b/scripts/validate_yhaplo.sh index ce7d9bd..7b14b53 100755 --- a/scripts/validate_yhaplo.sh +++ b/scripts/validate_yhaplo.sh @@ -41,7 +41,7 @@ yhaplo --example_text \ --depth_first \ --depth_first_table \ --mrca Q-M3 R-V88 \ - --haplogroup_query E1b,Q-M3,foo \ + --haplogroup_query E1b1,Q-M3,foo \ --snp_query L1335,S730,S530,foo echo -e "\n" diff --git a/yhaplo/tree.py b/yhaplo/tree.py index fcb244d..adb5bbb 100644 --- a/yhaplo/tree.py +++ b/yhaplo/tree.py @@ -242,9 +242,14 @@ def query_haplogroup(self, haplogroup: str) -> None: haplogroup_node = self.haplogroup_to_node.get(haplogroup) if haplogroup_node: + logger.info("Descent\n------") for node in haplogroup_node.back_trace_path(): logger.info(node.str_simple) + logger.info("\nSNPs\n----") + for snp in haplogroup_node.snp_list: + logger.info(snp) + else: logger.info(f'Haplogroup "{haplogroup}" not found')