-
- All Implemented Interfaces:
public class GenerateRForPHG
This class holds methods and classes to generate R code for PHG classes. It also creates vectors that hold PHG database table information.
-
-
Method Summary
Modifier and Type Method Description static void
main(Array<String> args)
static RefRangeVectors
graphToRefRangeVectors(HaplotypeGraph graph, Array<int> refRanges)
Given a PHG HaplotypeGraph, create a set of vectors representing data for all ReferenceRanges in the graph. static HaplotypesDataVectors
graphToHapsInRefRangeVectors(HaplotypeGraph graph, Array<int> refRanges, boolean includeSequence, boolean includeVariants)
Given a PHG HaplotypeGraph, create a set of vectors representing data for all Haplotypes/Nodes in the graph. static JsonObject
createVinfoObject(HaplotypeNode.VariantInfo vinfo)
-
-
Method Detail
-
graphToRefRangeVectors
static RefRangeVectors graphToRefRangeVectors(HaplotypeGraph graph, Array<int> refRanges)
Given a PHG HaplotypeGraph, create a set of vectors representing data for all ReferenceRanges in the graph. If the user passes a list of refRangeIds, then only return data for those reference ranges. If this list is null or empty, return data for all reference ranges in the graph.
- Parameters:
refRanges
- : List of reference range ids
-
graphToHapsInRefRangeVectors
static HaplotypesDataVectors graphToHapsInRefRangeVectors(HaplotypeGraph graph, Array<int> refRanges, boolean includeSequence, boolean includeVariants)
Given a PHG HaplotypeGraph, create a set of vectors representing data for all Haplotypes/Nodes in the graph. This assumes the graph was created with sequence and variant info if the user has these 2 parameters as "true"
- Parameters:
refRanges
- : List of reference range idsincludeSequence
- : boolean - only include if trueincludeVariants
- : boolean - only include if true
-
createVinfoObject
static JsonObject createVinfoObject(HaplotypeNode.VariantInfo vinfo)
-
-
-
-