/// <summary> /// sometimes we get variant sites like this, below in the original vcf. /// And in truth, the insertion should come after the C>T. /// So, we reorder. Keeping this list ordered makes downstream calculations easier. /// chr7 140453136 . A . 100 PASS /// chr7 140453137 . C CGTA 52 PASS /// chr7 140453137 . C T 58 /// </summary> public void OrderVariantSitesByFirstTrueStartPosition() { var indexes = VcfVariantSites.Select(vs => vs.OriginalAlleleFromVcf).ToList(); VcfVariantSites.Sort(); for (int i = 0; i < VcfVariantSites.Count; i++) { VcfVariantSites[i].OriginalAlleleFromVcf = indexes[i]; } }
public List <CalledAllele> GetOriginalVcfVariants() { return(VcfVariantSites.Select(vs => vs.OriginalAlleleFromVcf).ToList()); }
public bool LastPositionIsNotMatch(VariantSite variantSite) { return(VcfVariantSites.Last().VcfReferencePosition != variantSite.VcfReferencePosition); }