public class MostLikelyParents
Given a set of read mappings, finds the most likely parents in a stepwise fashion. The parent with the most reads is selected as a likely parent. Then the the subset of reads not mapping to that parent is created. The parent with the most reads from that subset is then added to the list of likely parents. The process is repeated until the number of likely parents = maxParents, coverage is equal to or greater than minCoverage, or until all parents have been added to the list, whichever occurs first. Coverage is calculated as the number of reads mapping to any of the likely parents divided by the total number of reads.
public MostLikelyParents(@NotNull HaplotypeGraph hapGraph)
A constructor that takes a class HaplotypeGraph
.
class HaplotypeGraph
public MostLikelyParents(@NotNull java.util.List<java.lang.String> parentList, @NotNull java.util.Map<net.maizegenetics.pangenome.api.ReferenceRange,? extends java.util.Map<java.lang.String,java.lang.Integer>> parentHapidMap)
A constructor that takes a list of parents and for each class ReferenceRange
, a map of parent name to its hapid.
This constructor is intended mainly for unit testing.
class ReferenceRange
@NotNull public java.util.List<java.lang.String> getMyParentList()
@NotNull public java.util.Map<net.maizegenetics.pangenome.api.ReferenceRange,java.util.Map> getMyParentToHapidMap()
@NotNull public java.util.List<kotlin.Pair> findMostLikelyParents(@NotNull com.google.common.collect.Multimap<net.maizegenetics.pangenome.api.ReferenceRange,net.maizegenetics.pangenome.hapCalling.HapIdSetCount> refRangeToHapIdSetCounts, int maxParents, double minCoverage)
Finds the most likely parents for a set of hapid counts from read mappings.