-
- All Implemented Interfaces:
public class GraphUtils
-
-
Method Summary
Modifier and Type Method Description static SortedSet<Integer>
path(TreeMap<Chromosome, HaplotypePath> paths)
Returns sorted set of haplotype ids from the given paths. static SortedSet<HaplotypeNode>
pathsToNodes(TreeMap<Chromosome, HaplotypePath> paths)
static List<HaplotypeNode>
nodes(HaplotypeGraph graph, SortedSet<Integer> hapids)
Returns a list of HaplotypeNodes corresponding to the given hapids in the given graph. static void
presenceAbsenceTaxonByNode(HaplotypeGraph graph, String filename)
static Array<int>
distributionTaxaRepresented(HaplotypeGraph graph)
static List<HaplotypeNode>
nodesContainingExactly(TaxaList taxa, HaplotypeGraph graph)
Gets list of HaplotypeNodes containing exact list of taxa. static void
tagNodePairCounts(String tagTaxaFile, HaplotypeGraph graph, String outputFile)
static void
nodeTaxaPairs(HaplotypeGraph graph, String filename)
static SortedSet<Position>
snpPositions(HaplotypeGraph graph)
Return sorted set of positions that are variant (SNP) positions in given graph. static SortedSet<Position>
snpPositions(HaplotypeGraph graph, Collection<Integer> referenceRanges)
Return sorted set of positions that are variant (SNP) positions in given graph. -
-
Method Detail
-
path
static SortedSet<Integer> path(TreeMap<Chromosome, HaplotypePath> paths)
Returns sorted set of haplotype ids from the given paths.
- Parameters:
paths
- paths
-
pathsToNodes
static SortedSet<HaplotypeNode> pathsToNodes(TreeMap<Chromosome, HaplotypePath> paths)
-
nodes
static List<HaplotypeNode> nodes(HaplotypeGraph graph, SortedSet<Integer> hapids)
Returns a list of HaplotypeNodes corresponding to the given hapids in the given graph.
- Parameters:
graph
- graphhapids
- haplotype ids
-
presenceAbsenceTaxonByNode
static void presenceAbsenceTaxonByNode(HaplotypeGraph graph, String filename)
-
distributionTaxaRepresented
static Array<int> distributionTaxaRepresented(HaplotypeGraph graph)
-
nodesContainingExactly
static List<HaplotypeNode> nodesContainingExactly(TaxaList taxa, HaplotypeGraph graph)
Gets list of HaplotypeNodes containing exact list of taxa.
- Parameters:
taxa
- taxa listgraph
- graph
-
tagNodePairCounts
static void tagNodePairCounts(String tagTaxaFile, HaplotypeGraph graph, String outputFile)
-
nodeTaxaPairs
static void nodeTaxaPairs(HaplotypeGraph graph, String filename)
-
snpPositions
static SortedSet<Position> snpPositions(HaplotypeGraph graph)
Return sorted set of positions that are variant (SNP) positions in given graph.
- Parameters:
graph
- graph
-
snpPositions
static SortedSet<Position> snpPositions(HaplotypeGraph graph, Collection<Integer> referenceRanges)
Return sorted set of positions that are variant (SNP) positions in given graph.
- Parameters:
graph
- graphreferenceRanges
- set of reference ranges (ids) that are included in result.
-
-
-
-