public override bool Equals(object haplogroup) { if (!(haplogroup is Haplogroup)) { return(false); } Haplogroup c = (Haplogroup)haplogroup; if (!this.haplogroup.Equals(c.haplogroup)) { return(false); } return(true); }
public bool isSuperHaplogroup(Haplogroup hgToCheck) { if (!(hgToCheck is Haplogroup)) { return(false); } Haplogroup c = hgToCheck; if (!c.haplogroup.Contains(this.haplogroup)) { return(false); } return(true); }
//TODO: This needs to be a method //private StreamReader PolygeneticWeights { public void changePoly(Haplogroup hg, Polymorphism polyOld, Polymorphism polyNew) { var e = getPolysOfHg(hg); foreach (XmlNode ce in e) { if (ce.InnerText.Equals(polyOld.ToString())) { ce.InnerText = polyNew.ToString(); return; } } throw new HaploGrepException("Polymorphism does not exit"); }
public XmlNodeList getPolysOfHg(Haplogroup hg) { var titleNode = xmlDoc.SelectSingleNode("//haplogroup[@name=\"" + hg.ToString() + "\"]/details"); return(titleNode.SelectNodes("poly")); }