public class HaplotypeGraph extends Object
| Constructor and Description |
|---|
HaplotypeGraph(Collection<HaplotypeEdge> edges)
Constructor for HaplotypeGraph.
|
| Modifier and Type | Method and Description |
|---|---|
List<net.maizegenetics.dna.map.Chromosome> |
chromosomes() |
Optional<HaplotypeEdge> |
edge(HaplotypeNode node1,
HaplotypeNode node2)
Returns optional edge between given nodes.
|
List<HaplotypeNode> |
endNodes()
Returns list of HaplotypeNodes that end graph.
|
List<HaplotypeNode> |
endNodes(net.maizegenetics.dna.map.Chromosome chr) |
ReferenceRange |
firstReferenceRange()
Returns the first reference range in this graph.
|
ReferenceRange |
firstReferenceRange(net.maizegenetics.dna.map.Chromosome chr)
Returns the first reference range for the given chromosome.
|
ReferenceRange |
lastReferenceRange()
Returns the last reference range in this graph.
|
ReferenceRange |
lastReferenceRange(net.maizegenetics.dna.map.Chromosome chr)
Returns the last reference range for the given chromosome.
|
List<HaplotypeEdge> |
leftEdges(HaplotypeNode node)
Returns List of Left HaplotypeEdges for given HaplotypeNode
|
List<HaplotypeNode> |
nodes(ReferenceRange range)
Returns list of HaplotypeNodes for given ReferenceRange
|
Stream<HaplotypeNode> |
nodeStream() |
int |
numberOfChromosomes() |
int |
numberOfLeftEdges(HaplotypeNode node)
Return number of left edges for given node.
|
int |
numberOfNodes() |
int |
numberOfRanges()
Returns number of reference ranges in this graph.
|
int |
numberOfRightEdges(HaplotypeNode node)
Return number of right edges for given node.
|
int |
numberTaxa(ReferenceRange range)
Returns number of taxa represented by given reference range.
|
TreeMap<net.maizegenetics.dna.map.Chromosome,HaplotypePath> |
path()
Returns most probable
HaplotypePath for each Chromosome. |
TreeMap<net.maizegenetics.dna.map.Chromosome,HaplotypePath> |
path(List<HaplotypeNode> nodes)
Returns most probable
HaplotypePath for each Chromosome given the specified list of known HaplotypeNodes. |
TreeMap<net.maizegenetics.dna.map.Chromosome,HaplotypePath> |
path(String taxon)
Returns most probable
HaplotypePath for each Chromosome given the specified taxon. |
TreeMap<net.maizegenetics.dna.map.Chromosome,HaplotypePath> |
path(String taxon,
List<HaplotypeNode> nodes)
Returns most probable
HaplotypePath for each Chromosome given the specified taxon and list of
known HaplotypeNodes. |
HaplotypePath |
path(net.maizegenetics.taxa.Taxon taxon)
|
TreeMap<net.maizegenetics.dna.map.Chromosome,HaplotypePath> |
path(net.maizegenetics.taxa.Taxon taxon,
List<HaplotypeNode> nodes)
Returns most probable
HaplotypePath for each Chromosome given the specified Taxon and
list of known HaplotypeNodes. |
List<ReferenceRange> |
referenceRangeList()
Returns list of reference ranges for whole graph.
|
Set<ReferenceRange> |
referenceRanges()
Returns sorted set of reference ranges for whole graph.
|
Stream<ReferenceRange> |
referenceRangeStream()
Returns stream of reference ranges for entire graph.
|
Stream<ReferenceRange> |
referenceRangeStream(net.maizegenetics.dna.map.Chromosome chr)
Returns stream of reference ranges for given chromosome.
|
List<HaplotypeEdge> |
rightEdges(HaplotypeNode node)
Returns List of Right HaplotypeEdges for given HaplotypeNode
|
List<HaplotypeNode> |
startNodes()
Returns list of HaplotypeNodes that start graph.
|
List<HaplotypeNode> |
startNodes(net.maizegenetics.dna.map.Chromosome chr) |
net.maizegenetics.taxa.TaxaList |
taxaInGraph()
Return all taxa represented in this graph.
|
net.maizegenetics.taxa.TaxaList |
taxaInRange(ReferenceRange range)
Returns taxa represented by given reference range.
|
int |
totalNumberTaxa()
Returns total number of taxa represented by this graph
|
TreeMap<ReferenceRange,List<HaplotypeNode>> |
tree(net.maizegenetics.dna.map.Chromosome chr)
Creates a sorted (on keys ReferenceRanges) map to list of HaplotypeNodes for given chromosome.
|
public HaplotypeGraph(Collection<HaplotypeEdge> edges)
HaplotypeGraphBuilderPluginedges - HaplotypeEdgespublic int numberOfNodes()
public List<net.maizegenetics.dna.map.Chromosome> chromosomes()
public int numberOfChromosomes()
public TreeMap<net.maizegenetics.dna.map.Chromosome,HaplotypePath> path(String taxon, List<HaplotypeNode> nodes)
HaplotypePath for each Chromosome given the specified taxon and list of
known HaplotypeNodes. List of nodes can have at most one node per ReferenceRange. Nodes
constructed with specified taxon will always be used in resulting paths. Specified nodes must either have been
constructed with specified taxon or reside in a reference range that has no node constructed with specified
taxon.taxon - taxonnodes - list of known nodespublic TreeMap<net.maizegenetics.dna.map.Chromosome,HaplotypePath> path(net.maizegenetics.taxa.Taxon taxon, List<HaplotypeNode> nodes)
HaplotypePath for each Chromosome given the specified Taxon and
list of known HaplotypeNodes. List of nodes can have at most one node per ReferenceRange. Nodes
constructed with specified taxon will always be used in resulting paths. Specified nodes must either have been
constructed with specified taxon or reside in a reference range that has no node constructed with specified
taxon.taxon - taxonnodes - list of known nodespublic TreeMap<net.maizegenetics.dna.map.Chromosome,HaplotypePath> path(List<HaplotypeNode> nodes)
HaplotypePath for each Chromosome given the specified list of known HaplotypeNodes. List of nodes can have at most one node per ReferenceRange.nodes - list of known nodespublic TreeMap<net.maizegenetics.dna.map.Chromosome,HaplotypePath> path(String taxon)
HaplotypePath for each Chromosome given the specified taxon. Nodes
constructed with specified taxon will always be used in resulting paths.taxon - taxonpublic HaplotypePath path(net.maizegenetics.taxa.Taxon taxon)
HaplotypePath for each Chromosome given the specified Taxon. Nodes
constructed with specified taxon will always be used in resulting paths.taxon - taxonpublic TreeMap<net.maizegenetics.dna.map.Chromosome,HaplotypePath> path()
HaplotypePath for each Chromosome.public List<HaplotypeNode> startNodes()
public List<HaplotypeNode> startNodes(net.maizegenetics.dna.map.Chromosome chr)
public List<HaplotypeNode> endNodes()
public List<HaplotypeNode> endNodes(net.maizegenetics.dna.map.Chromosome chr)
public List<HaplotypeNode> nodes(ReferenceRange range)
range - ReferenceRangepublic Stream<HaplotypeNode> nodeStream()
public TreeMap<ReferenceRange,List<HaplotypeNode>> tree(net.maizegenetics.dna.map.Chromosome chr)
chr - chromosomepublic int numberOfLeftEdges(HaplotypeNode node)
node - nodepublic int numberOfRightEdges(HaplotypeNode node)
node - nodepublic List<HaplotypeEdge> leftEdges(HaplotypeNode node)
node - HaplotypeNodepublic List<HaplotypeEdge> rightEdges(HaplotypeNode node)
node - HaplotypeNodepublic Optional<HaplotypeEdge> edge(HaplotypeNode node1, HaplotypeNode node2)
node1 - first nodenode2 - second nodepublic int numberOfRanges()
public Set<ReferenceRange> referenceRanges()
referenceRangeStream()public List<ReferenceRange> referenceRangeList()
referenceRangeStream()public Stream<ReferenceRange> referenceRangeStream()
public Stream<ReferenceRange> referenceRangeStream(net.maizegenetics.dna.map.Chromosome chr)
chr - chromosomepublic ReferenceRange firstReferenceRange()
public ReferenceRange lastReferenceRange()
public ReferenceRange firstReferenceRange(net.maizegenetics.dna.map.Chromosome chr)
chr - chromosomepublic ReferenceRange lastReferenceRange(net.maizegenetics.dna.map.Chromosome chr)
chr - chromosomepublic net.maizegenetics.taxa.TaxaList taxaInGraph()
public int totalNumberTaxa()
public net.maizegenetics.taxa.TaxaList taxaInRange(ReferenceRange range)
range - reference rangepublic int numberTaxa(ReferenceRange range)
range - reference rangeCopyright © 2018. All rights reserved.