public class NextflowUtil extends Object
Modifier and Type | Field and Description |
---|---|
static String |
AWS_CONFIG_DIR
Name of the AWS S3 sub-directory used to save pipeline reports
|
static String |
AWS_COPY_INPUTS_TO_S3
Config Boolean property: If enabled save all input files to S3: "aws.copyInputsToS3" |
static String |
AWS_COPY_PIPELINE_TO_S3
Config Boolean property: If enabled save pipeline to S3: "aws.copyPipelineToS3" |
static String |
AWS_COPY_REPORTS_TO_S3
Config Boolean property: If enabled save reports to S3: "aws.copyPipelineToS3" |
static String |
AWS_DB_DIR
Name of the AWS S3 sub-directory used to save pipeline reports
|
static String |
AWS_PIPELINE_DIR
Name of the AWS S3 sub-directory used to save pipeline reports
|
static String |
AWS_PURGE_EFS_INPUTS
Config Boolean property: If enabled delete all EFS dirs (except pipelines):
"aws.purgeEfsInputs" |
static String |
AWS_PURGE_EFS_OUTPUT
Config Boolean property: If enabled delete all EFS/pipelines: "aws.purgeEfsOutput" |
static String |
AWS_RAM
Config String property: AWS memory set in Nextflow main.nf: "aws.ram" |
static String |
AWS_REPORT_DIR
Name of the AWS S3 subdirectory used to save pipeline reports
|
static String |
AWS_S3
Config String property: AWS S3 pipeline output directory used by Nextflow main.nf:
"aws.s3" |
protected static String |
NF_LOG
The Docker container will generate a nextflow.log file in the root directory, this is the file name
|
Constructor and Description |
---|
NextflowUtil() |
Modifier and Type | Method and Description |
---|---|
static void |
awsSyncS3(String efsPath,
boolean waitUntilComplete)
Sync file or directory with S3 bucket.
Dir example: aws s3 sync $EFS/config s3://blj-2019-04-05/config File example: aws s3 cp $EFS_META/testMetadata.tsv s3://blj-2019-04-05/metadata/testMetadata.tsv |
static File |
getMainNf()
Get the Nextflow main.nf file path.
|
protected static List<String> |
getNextflowLines(File template)
Build the main.nf lines from the template file by replacing several parameters.
|
static boolean |
nextflowLogExists()
Return true if the Nextflow log has been saved to the pipeline root directory
|
static void |
purgeEfsData()
Save EFS data to S3 based on pipeline Config.
|
static void |
saveEfsDataToS3()
Save EFS data to S3 based on pipeline Config.
|
static void |
saveNextflowLog()
Save a copy of the Nextflow log file to the Pipeline root directory
|
static void |
startNextflow(List<BioModule> modules)
Call this method to build the Nextflow main.nf for the current pipeline.
|
public static final String AWS_CONFIG_DIR
public static final String AWS_COPY_INPUTS_TO_S3
Config
Boolean property: If enabled save all input files to S3: "aws.copyInputsToS3"public static final String AWS_COPY_PIPELINE_TO_S3
Config
Boolean property: If enabled save pipeline to S3: "aws.copyPipelineToS3"public static final String AWS_COPY_REPORTS_TO_S3
Config
Boolean property: If enabled save reports to S3: "aws.copyPipelineToS3"public static final String AWS_DB_DIR
public static final String AWS_PIPELINE_DIR
public static final String AWS_PURGE_EFS_INPUTS
Config
Boolean property: If enabled delete all EFS dirs (except pipelines):
"aws.purgeEfsInputs"public static final String AWS_PURGE_EFS_OUTPUT
Config
Boolean property: If enabled delete all EFS/pipelines: "aws.purgeEfsOutput"public static final String AWS_RAM
Config
String property: AWS memory set in Nextflow main.nf: "aws.ram"public static final String AWS_REPORT_DIR
public static final String AWS_S3
Config
String property: AWS S3 pipeline output directory used by Nextflow main.nf:
"aws.s3"protected static final String NF_LOG
public static void awsSyncS3(String efsPath, boolean waitUntilComplete) throws Exception
efsPath
- File or directory to syncwaitUntilComplete
- Boolean if enabled will block until process completes before moving onException
- if errors occurpublic static File getMainNf()
public static boolean nextflowLogExists()
public static void purgeEfsData() throws Exception
Exception
- if errors occurpublic static void saveEfsDataToS3() throws Exception
Exception
- if errors occurpublic static void saveNextflowLog()
public static void startNextflow(List<BioModule> modules) throws Exception
modules
- Pipeline modulesException
- if errors occurprotected static List<String> getNextflowLines(File template) throws Exception
template
- Generated .main.nf templateException
- if errors occur