edu.claflin.finder

## Class Main

- java.lang.Object
- - edu.claflin.finder.Main

-     public class Main
      extends java.lang.Object

  Interprets the command line arguments provided to the program.
  Version:
    3.2 February 4, 2016
  Author:
    Charles Allen Schultz II

- - ### Constructor Summary

    Constructors
    Constructor and Description
    `Main()`

  - ### Method Summary

    All Methods Static Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `private static void` | `error()` Used to process a fatal error.
    `static void` | `main(java.lang.String[] args)` Command line argument processing occurs here.
    `private static Algorithm` | `parseAlgorithm(java.lang.String algorithmCode, java.util.HashMap<java.lang.String,java.lang.Boolean> config, java.util.ArrayList<Condition> conditions, java.util.Comparator<Edge> comparator)` Parses an algorithm code string for returning the appropriate Algorithm object.
    `private static boolean[]` | `parseBoolean(java.lang.String booleans)` Parses a boolean string for configuring the {}.
    `private static void` | `writeGraphs(java.util.ArrayList<Graph> graphs, java.lang.String output, GraphWriter writer)` Writes Graph objects to memory.

    - ### Methods inherited from class java.lang.Object

      `clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

- - ### Constructor Detail

    - #### Main

          public Main()

  - ### Method Detail

    - #### main

          public static void main(java.lang.String[] args)

      Command line argument processing occurs here. Program usage: `java -jar SubgraphFinder.jar -v -out <booleans> -log <booleans> [ -f <FILE> | -m <MANIFEST> ] -input <TYPE> <OPTION> -output <TYPE> <OPTION> -algo <ALGO>` `-f <FILE> : Supply a single file to be parsed.` `-m <MANIFEST> : Supply a manifest listing several files to be parsed.` -level {@code : A logging level. {@code NORMAL : Shallowest logging level. Least amount of messages.} {@code VERBOSE : Moderate logging; includes intermittent operations.} {@code DEBUG : Highest logging granularity; logs every message.} {@code -out :: -log } {@code out : Logging to command prompt options.} {@code log : Logging to file options.} {@code : Use 't' for true and 'f' for false. The supplied arguments should} {@code be concatenated as a single string. There are currently four (4) needed:} {@code ALGO : Logging of Algorithm operations.} {@code ERRR : Logging of Error informations.} {@code GRPH : Logging of Graph operations.} {@code INFO : Logging of General informations.} {@code -input :: -output } {@code input : How to process the source graphs.} {@code output : How to output the found graphs.} {@code : Select from one of the following options:} {@code SIMPLE : Simple tab delimited format. (DEFUALT)} {@code SIF : Simple Interaction Format as defined in the Cytoscape Manual.} {@code NOA : NOA Batch Format as defined in the NOA Plugin for Cytoscape. (OUTPUT ONLY)} {@code : Some formats require an additional parameter described below:} {@code SIF : Default Relationship Type (i.e. \"pp\" or \"pd\")} {@code NOA : Same as SIF.} {@code -cfg : Some algorithms receive special configuration parameters, all of which default to false.} {@code : Select from one of the following options:} {@code PRESERVATIVE : Preserves edges on expansion.} {@code -type : A subgraph type to look for.} {@code : Select from one of the following options:} {@code BIPARTITE : Bipartite Subgraphs.} {@code CLIQUE : Clique Subgraphs.} {@code DCLIQUE : Directed Clique Subgraphs.} {@code -order : An ordering to impose} {@code : Select from one of the following options:} {@code EDGEWEIGHT : Order expansion based on the data attached to the edge interpretted as a number.} {@code (Higher values are taken first.)} {@code -undirected : Interprets a graph as being undirected.} {@code -algo : The algorithm code indicating the method of finding BSGs to use.} {@code : Select from one of the following options:} {@code BFTS : Finds bipartite graphs based on a breadth first traversal search of the network.} {@code DFTS : Finds bipartite graphs based on a depth first traversal search of the network.} {@code BNDL : See below for instruction. (Do not self-reference. Program will exit with error.)} {@code -algo BNDL ( ...) : Load a BUNDLE Algorithm. Processes the graph using each } {@code of the provided Algorithms. Algorithm codes should be the same as above and delimited } {@code using spaces. NOTE: this must be the last argument as the program assumes all following } {@code arguments are Algorithm codes.}
      Parameters:
        `args` - the String array containing the program's startup parameters.

    - #### writeGraphs

          private static void writeGraphs(java.util.ArrayList<Graph> graphs,
                                          java.lang.String output,
                                          GraphWriter writer)

      Writes Graph objects to memory. Does so in a manner so as to promote extensibility.
      Parameters:
        `graphs` - the ArrayList object containing the graphs to write.
        `output` - the String representing the folder in the memory to store the graphs in.
        `writer` - the `GraphWriter` object to use for writing the graphs.

    - #### parseBoolean

          private static boolean[] parseBoolean(java.lang.String booleans)

      Parses a boolean string for configuring the {}. Converts the characters in the string into a boolean array depending on if they are 't' for true or 'f' for false.
      Parameters:
        `booleans` - the String containing the boolean pattern.
      Returns:
        the boolean array initialized from the String.

    - #### parseAlgorithm

          private static Algorithm parseAlgorithm(java.lang.String algorithmCode,
                                                  java.util.HashMap<java.lang.String,java.lang.Boolean> config,
                                                  java.util.ArrayList<Condition> conditions,
                                                  java.util.Comparator<Edge> comparator)

      Parses an algorithm code string for returning the appropriate Algorithm object.
      Parameters:
        `algorithmCode` - the String containing the correct Algorithm code.
      Returns:
        the `Algorithm` object instantiated from the code.

    - #### error

          private static void error()

      Used to process a fatal error. Kills the program with a warning to the user.