-
- All Implemented Interfaces:
public class RMethods
The purpose of this class is hold static methods that generate results that can be used by R
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description public class
RMethods.DataFrameVectors
A data class holding columnNames, rowNames, and a dataVectors List as public fields in a format that can be easily used by rJava to create R objects
public class
RMethods.MatrixWithNames
A data class holding columnNames, rowNames, and a matrix List as public fields in a format that can be easily used by rJava to create R objects. It is expected that the matrix will be a 2-D primitive Java array of some type that is converted correctly by rJava.
-
Method Summary
-
-
Method Detail
-
hapidTableAsMatrix
static RMethods.MatrixWithNames hapidTableAsMatrix(HaplotypeGraph graph)
- Parameters:
graph
- a HaplotypeGraph
-
hapidTableAsDF
static RMethods.DataFrameVectors hapidTableAsDF(HaplotypeGraph graph)
- Parameters:
graph
- a HaplotypeGraph
-
referenceRanges
static RMethods.DataFrameVectors referenceRanges(HaplotypeGraph graph)
- Parameters:
graph
- a HaplotypeGraph
-
pathHapids
static RMethods.MatrixWithNames pathHapids(String configFile, Array<String> pathFileNames)
- Parameters:
configFile
- a config file of PHG database connection parameterspathFileNames
- a String array of path file names
-
pathsForMethod
static RMethods.MatrixWithNames pathsForMethod(String configFile, String pathMethod)
- Parameters:
configFile
- the database configuration filepathMethod
- the name of the path method in the PHG DB
-
readMappingsForLineName
static RMethods.DataFrameVectors readMappingsForLineName(String configFile, String lineName, String readMappingMethodName, String haplotypeMethodName)
- Parameters:
configFile
- a database configuration filelineName
- the name of the line (taxon) for which the read mapping information is to be retrieved.readMappingMethodName
- the method name for the read mappings (only takes a single method)haplotypeMethodName
- optional: one or more colon-delimited haplotype method names
-
readMappingsForLineName
static RMethods.DataFrameVectors readMappingsForLineName(String configFile, String lineName, String readMappingMethodName, String haplotypeMethodName, String fileGroup)
- Parameters:
configFile
- the database configuration filelineName
- the name of the line (taxon) for which the read mapping information is to be retrieved.readMappingMethodName
- the name of the read mapping method from the databasehaplotypeMethodName
- the name of the haplotype method used to write the pangenome fasta used to map readsfileGroup
- the name of the file group for the line from the database.
-
readMappingTableInfo
static RMethods.DataFrameVectors readMappingTableInfo(String configFile)
- Parameters:
configFile
- a config file containing the DB name and connection information
-
hapidSetFromReadMappings
static Set<Integer> hapidSetFromReadMappings(Map<List<Integer>, Integer> readMappings)
-
rangeSetFromHapidSet
static Set<Integer> rangeSetFromHapidSet(Set<Integer> hapids, Map<Integer, Integer> hapidRangeMap)
-
exportPHGToFlapjack
static void exportPHGToFlapjack(HaplotypeGraph graph, String filename)
-
testMatrix
static RMethods.MatrixWithNames testMatrix()
A test function to verify that MatrixWithNames works correctly for R
-
testDataFrame
static RMethods.DataFrameVectors testDataFrame()
A test function to verify that DataFrameVectors works correctly for R
-
-
-
-