Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

Code suggestions #140

Merged
merged 3 commits into from
Sep 15, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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