Class GorJavaUtilities

java.lang.Object
gorsat.process.GorJavaUtilities

public class GorJavaUtilities extends Object
Created by sigmar on 21/12/15.
  • Field Details

  • Constructor Details

    • GorJavaUtilities

      public GorJavaUtilities()
  • Method Details

    • getPhenotype

      public static GorJavaUtilities.PhenoInfo getPhenotype(String phenoHeader, BufferedReader pheno)
    • clearHints

      public static String clearHints(String query)
    • splitResourceHints

      public static String[] splitResourceHints(String query, String validStart)
    • createMapString

      public static String createMapString(Map<String,String> createMap)
    • stream2RowList

      public static List<org.gorpipe.gor.model.Row> stream2RowList(Stream<org.gorpipe.gor.model.Row> str)
    • seekReplacement

      public static String seekReplacement(String myCommand, String chr, int start, int stop)
    • projectReplacement

      public static String projectReplacement(String myCommand, org.gorpipe.gor.session.GorSession session) throws IOException
      Throws:
      IOException
    • projectReplacement

      public static String projectReplacement(String myCommand, String projectRoot, String requestId, String securityContext) throws IOException
      Throws:
      IOException
    • projectDataReplacement

      public static String projectDataReplacement(String projectRoot, String myCommand) throws IOException
      Throws:
      IOException
    • getDbIteratorSource

      public static org.gorpipe.gor.model.GenomicIterator getDbIteratorSource(String sqlQuery, boolean gortable, String source, boolean scoping)
    • wrapObjectArrayIterator

      public static Stream<String> wrapObjectArrayIterator(Iterator<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 Map<String,GorJavaUtilities.CmdParams> readWhiteList(Path cmdConfigPath)
    • readWhiteList

      public static Map<String,GorJavaUtilities.CmdParams> readWhiteList(String cmdConfigFile) throws IOException
      Throws:
      IOException
    • resolveWhiteListFilePath

      public static Path resolveWhiteListFilePath(String whiteListFile, 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 Optional<String> getIgnoreCase(Collection<String> c, String str)
    • toUppercase

      public static String[] toUppercase(Collection<String> c)
    • mergeArrays

      public static String[] mergeArrays(String[] array1, String[] array2)
    • isGorCmd

      public static boolean isGorCmd(String cmd)
    • isPGorCmd

      public static boolean isPGorCmd(String cmd)
    • createSymbolicLink

      public static void createSymbolicLink(Path resultPath, Path cachePath) throws IOException
      Throws:
      IOException
    • verifyLinkFileLastModified

      public static String verifyLinkFileLastModified(org.gorpipe.gor.session.ProjectContext projectContext, String cacheFile)
    • writeDictionaryFromMeta

      public static void writeDictionaryFromMeta(org.gorpipe.gor.model.FileReader fileReader, String outfolderpath, String dictionarypath) throws IOException
      Throws:
      IOException