Skip to content

Commit

Permalink
Merge pull request #140 from sanger-tol/mm49_pre_tag
Browse files Browse the repository at this point in the history
Code suggestions
  • Loading branch information
DLBPointon authored Sep 15, 2023
2 parents 7c1b69e + e9dd94d commit 87d2635
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 6 deletions.
9 changes: 7 additions & 2 deletions lib/TreeValProject.groovy
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
import java.time.OffsetDateTime;
import java.time.Duration;

class TreeValProject {
//
// Generates a small summary containing context for the input files
Expand All @@ -7,13 +10,15 @@ class TreeValProject {

public static void summary(workflow, params, metrics, log) {

def date_completed = OffsetDateTime.now()

def input_data = [:]
input_data['version'] = NfcoreTemplate.version( workflow )
input_data['runName'] = workflow.runName
input_data['session_id'] = workflow.sessionId
input_data['duration'] = 'CANNOT BE CALCULATED'
input_data['duration'] = Duration.between( workflow.start, date_completed ).toSeconds()
input_data['DateStarted'] = workflow.start
input_data['DateCompleted'] = new Date().format("yyyy-MM-dd HH:mm:ss.SSSZ")
input_data['DateCompleted'] = date_completed
input_data['entry'] = params.entry

input_data['input_yaml'] = params.input
Expand Down
8 changes: 4 additions & 4 deletions subworkflows/local/hic_mapping.nf
Original file line number Diff line number Diff line change
Expand Up @@ -154,12 +154,12 @@ workflow HIC_MAPPING {
// LOGIC: HIRES IS TOO INTENSIVE FOR RUNNING IN GITHUB CI SO THIS STOPS IT RUNNING
//
if ( params.config_profile_name ) {
github = params.config_profile_name
config_profile_name = params.config_profile_name
} else {
github = 'Local'
config_profile_name = 'Local'
}

if ( !github.contains('GitHub') ) {
if ( !config_profile_name.contains('GitHub') ) {
//
// MODULE: GENERATE PRETEXT MAP FROM MAPPED BAM FOR HIGH RES
//
Expand Down Expand Up @@ -211,7 +211,7 @@ workflow HIC_MAPPING {
//
// LOGIC: SECTION ONLY NEEDED FOR TREEVAL VISUALISATION, NOT RAPID ANALYSIS
//
if (workflow_setting == 'FULL' && !github.contains('GitHub')) {
if (workflow_setting == 'FULL' && !config_profile_name.contains('GitHub')) {
//
// LOGIC: PREPARE JUICER TOOLS INPUT
//
Expand Down

0 comments on commit 87d2635

Please sign in to comment.