Package gorsat.process
Class GorJavaUtilities
- java.lang.Object
-
- gorsat.process.GorJavaUtilities
-
public class GorJavaUtilities extends java.lang.ObjectCreated by sigmar on 21/12/15.
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static classGorJavaUtilities.CmdParamsstatic classGorJavaUtilities.PhenoInfostatic classGorJavaUtilities.Phenotypesstatic classGorJavaUtilities.PRPRPRValuestatic classGorJavaUtilities.PRPRValuestatic classGorJavaUtilities.VCFValue
-
Field Summary
Fields Modifier and Type Field Description static java.text.DecimalFormatfd3static java.lang.StringGORZ_METAstatic double[]pArraystatic java.lang.String[]prArraystatic GorJavaUtilities.PRPRValueprprFunctionstatic GorJavaUtilities.PRPRPRValueprprprFunction
-
Constructor Summary
Constructors Constructor Description GorJavaUtilities()
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static java.lang.StringclearHints(java.lang.String query)static java.lang.StringcreateMapString(java.util.Map<java.lang.String,java.lang.String> createMap)static org.gorpipe.gor.model.GenomicIteratorgetDbIteratorSource(java.lang.String sqlQuery, boolean gortable, java.lang.String source, boolean scoping)static java.util.Optional<java.lang.String>getIgnoreCase(java.util.Collection<java.lang.String> c, java.lang.String str)static GorJavaUtilities.PhenoInfogetPhenotype(java.lang.String phenoHeader, java.io.BufferedReader pheno)static booleanisGorCmd(java.lang.String cmd)static booleanisPGorCmd(java.lang.String cmd)static java.lang.String[]mergeArrays(java.lang.String[] array1, java.lang.String[] array2)static java.lang.StringprojectDataReplacement(java.lang.String projectRoot, java.lang.String myCommand)static java.lang.StringprojectReplacement(java.lang.String myCommand, java.lang.String projectRoot, java.lang.String requestId, java.lang.String securityContext)static java.lang.StringprojectReplacement(java.lang.String myCommand, org.gorpipe.gor.session.GorSession session)static java.util.Map<java.lang.String,GorJavaUtilities.CmdParams>readWhiteList(java.lang.String cmdConfigFile)static java.util.Map<java.lang.String,GorJavaUtilities.CmdParams>readWhiteList(java.nio.file.Path cmdConfigPath)static java.nio.file.PathresolveWhiteListFilePath(java.lang.String whiteListFile, java.nio.file.Path projectRoot)Helper method to resolve whitelist file path (from config file) to full path.static java.lang.StringseekReplacement(java.lang.String myCommand, java.lang.String chr, int start, int stop)static java.lang.String[]splitResourceHints(java.lang.String query, java.lang.String validStart)static java.util.List<org.gorpipe.gor.model.Row>stream2RowList(java.util.stream.Stream<org.gorpipe.gor.model.Row> str)static java.lang.String[]toUppercase(java.util.Collection<java.lang.String> c)static java.util.stream.Stream<java.lang.String>wrapObjectArrayIterator(java.util.Iterator<java.lang.Object[]> iterator)Helper method for wrapping Object[] iterator to Stream.static voidwriteDictionaryFromMeta(java.nio.file.Path outfolderpath, java.nio.file.Path dictionarypath)
-
-
-
Field Detail
-
GORZ_META
public static final java.lang.String GORZ_META
- See Also:
- Constant Field Values
-
fd3
public static java.text.DecimalFormat fd3
-
pArray
public static double[] pArray
-
prArray
public static java.lang.String[] prArray
-
prprFunction
public static GorJavaUtilities.PRPRValue prprFunction
-
prprprFunction
public static GorJavaUtilities.PRPRPRValue prprprFunction
-
-
Method Detail
-
getPhenotype
public static GorJavaUtilities.PhenoInfo getPhenotype(java.lang.String phenoHeader, java.io.BufferedReader pheno)
-
clearHints
public static java.lang.String clearHints(java.lang.String query)
-
splitResourceHints
public static java.lang.String[] splitResourceHints(java.lang.String query, java.lang.String validStart)
-
createMapString
public static java.lang.String createMapString(java.util.Map<java.lang.String,java.lang.String> createMap)
-
stream2RowList
public static java.util.List<org.gorpipe.gor.model.Row> stream2RowList(java.util.stream.Stream<org.gorpipe.gor.model.Row> str)
-
seekReplacement
public static java.lang.String seekReplacement(java.lang.String myCommand, java.lang.String chr, int start, int stop)
-
projectReplacement
public static java.lang.String projectReplacement(java.lang.String myCommand, org.gorpipe.gor.session.GorSession session) throws java.io.IOException- Throws:
java.io.IOException
-
projectReplacement
public static java.lang.String projectReplacement(java.lang.String myCommand, java.lang.String projectRoot, java.lang.String requestId, java.lang.String securityContext) throws java.io.IOException- Throws:
java.io.IOException
-
projectDataReplacement
public static java.lang.String projectDataReplacement(java.lang.String projectRoot, java.lang.String myCommand) throws java.io.IOException- Throws:
java.io.IOException
-
getDbIteratorSource
public static org.gorpipe.gor.model.GenomicIterator getDbIteratorSource(java.lang.String sqlQuery, boolean gortable, java.lang.String source, boolean scoping)
-
wrapObjectArrayIterator
public static java.util.stream.Stream<java.lang.String> wrapObjectArrayIterator(java.util.Iterator<java.lang.Object[]> iterator)
Helper method for wrapping Object[] iterator to Stream.- Parameters:
iterator-- Returns:
- Stream where iterator elements are represented as string joined with tab delimiter
-
readWhiteList
public static java.util.Map<java.lang.String,GorJavaUtilities.CmdParams> readWhiteList(java.nio.file.Path cmdConfigPath)
-
readWhiteList
public static java.util.Map<java.lang.String,GorJavaUtilities.CmdParams> readWhiteList(java.lang.String cmdConfigFile) throws java.io.IOException
- Throws:
java.io.IOException
-
resolveWhiteListFilePath
public static java.nio.file.Path resolveWhiteListFilePath(java.lang.String whiteListFile, java.nio.file.Path projectRoot)Helper method to resolve whitelist file path (from config file) to full path.If whitelist path is resolved as follows: 1. If input is absolute or empty then it is returned. 2. Search relative for the project directory. 3. If nothing is found we return the input.
- Parameters:
whiteListFile- white list file path, can not be null or emtpy.projectRoot- project root for the current project.- Returns:
- fully resolved path to the whitelist file.
-
getIgnoreCase
public static java.util.Optional<java.lang.String> getIgnoreCase(java.util.Collection<java.lang.String> c, java.lang.String str)
-
toUppercase
public static java.lang.String[] toUppercase(java.util.Collection<java.lang.String> c)
-
mergeArrays
public static java.lang.String[] mergeArrays(java.lang.String[] array1, java.lang.String[] array2)
-
isGorCmd
public static boolean isGorCmd(java.lang.String cmd)
-
isPGorCmd
public static boolean isPGorCmd(java.lang.String cmd)
-
writeDictionaryFromMeta
public static void writeDictionaryFromMeta(java.nio.file.Path outfolderpath, java.nio.file.Path dictionarypath) throws java.io.IOException- Throws:
java.io.IOException
-
-