public class ModuleUtil extends Object
Modifier and Type | Method and Description |
---|---|
static String |
displayID(BioModule module)
Return the module ID as a 2 digit display number (add leading zero if needed).
|
static ClassifierModule |
getClassifier(BioModule module,
boolean checkAhead)
Get a classifier module
Use checkAhead parameter to determine if we look forward or backwards starting from the given module. |
static String |
getDefaultDemultiplexer()
Get the Java Class name for the default Demultiplexer module
|
static String |
getDefaultFastaConverter()
Get the Java Class name for the default Fasta converter module
|
static String |
getDefaultMergePairedReadsConverter()
Get the Java Class name for the default Merge paired read module
|
static String |
getDefaultStatsModule()
Return the class name of the default R statistics BioModule
|
static BioModule |
getModule(BioModule module,
String className,
boolean checkAhead)
Get a module with given className unless a classifier module is found 1st.
Use checkAhead parameter to determine if we look forward or backwards starting from the given module. |
static BioModule |
getModule(String className)
Construct a BioModule based on its className.
|
static List<BioModule> |
getModules(BioModule module,
Boolean checkAhead)
Return pipeline modules after the given module if checkAhead = TRUE
Otherwise return pipeline modules before the given module. If returning the prior modules, return the pipeline modules in reverse order, so the 1st item in the list is the module immediately preceding the given module. |
static BioModule |
getNextModule(BioModule module)
BioModules are run in the order configured.
Return the module configured to run after the given module. |
static BioModule |
getPreviousModule(BioModule module)
BioModules are run in the order configured.
Return the module configured to run before the given module. |
static boolean |
hasExecuted(BioModule module)
Return TRUE if module has executed.
|
static boolean |
isComplete(BioModule module)
Return TRUE if module completed successfully.
|
static boolean |
isFirstRModule(BioModule module)
Test if module is the first
R_Module configured in the pipeline. |
static boolean |
isIncomplete(BioModule module)
Return TRUE if module started execution but is not complete.
|
static boolean |
isMetadataModule(BioModule module)
Method determines if the given module is a metadata-module (which does not use/modify sequence data.
|
static void |
markComplete(BioModule module)
Method creates a file named "biolockjComplete" in module root directory to document module
has completed successfully.
|
static void |
markStarted(BioModule module)
Method creates a file named "biolockjStarted" in module root directory to document module
has completed successfully.
|
static boolean |
moduleExists(String className)
Check if a module was in the pipeline at least once.
|
static File |
requireSubDir(BioModule module,
String subDirName)
Get BioModule subdirectory File object with given name.
|
static boolean |
subDirExists(BioModule module,
String subDirName)
Return TRUE if BioModule sub-directory exists
|
public static String displayID(BioModule module)
module
- BioModulepublic static ClassifierModule getClassifier(BioModule module, boolean checkAhead)
module
- Calling BioModulecheckAhead
- Boolean TRUE to check for NEXT, set FALSE to check BEHINDpublic static String getDefaultDemultiplexer()
public static String getDefaultFastaConverter()
public static String getDefaultMergePairedReadsConverter()
public static String getDefaultStatsModule()
public static BioModule getModule(BioModule module, String className, boolean checkAhead) throws Exception
module
- Calling BioModuleclassName
- Target BioModule class namecheckAhead
- Boolean TRUE to check for NEXT, set FALSE to check BEHINDException
- if errors occurpublic static BioModule getModule(String className) throws Exception
className
- BioModule class nameException
- if errors occurpublic static List<BioModule> getModules(BioModule module, Boolean checkAhead)
module
- Reference BioModulecheckAhead
- Set TRUE to return modules after the given reference modulepublic static BioModule getNextModule(BioModule module)
module
- BioModulepublic static BioModule getPreviousModule(BioModule module)
module
- BioModulepublic static boolean hasExecuted(BioModule module)
module
- BioModulepublic static boolean isComplete(BioModule module)
module
- BioModulepublic static boolean isFirstRModule(BioModule module)
R_Module
configured in the pipeline.module
- BioModule to testR_Module
in this branchpublic static boolean isIncomplete(BioModule module)
module
- BioModulepublic static boolean isMetadataModule(BioModule module)
module
- BioModule in questionpublic static void markComplete(BioModule module) throws Exception
module
- BioModuleException
- if unable to create "biolockjComplete" filepublic static void markStarted(BioModule module) throws Exception
module
- moduleException
- if unable to create "biolockjStarted" filepublic static boolean moduleExists(String className)
className
- module simple namepublic static File requireSubDir(BioModule module, String subDirName)
module
- BioModulesubDirName
- BioModule sub-directory name