Skip to content

Commit

Permalink
Merge branch 'pre-tag' of https://github.com/sanger-tol/treeval into …
Browse files Browse the repository at this point in the history
…pre-tag
  • Loading branch information
DLBPointon committed Sep 12, 2023
2 parents 50a2a22 + 23c31f7 commit 43f6292
Show file tree
Hide file tree
Showing 4 changed files with 54 additions and 57 deletions.
1 change: 1 addition & 0 deletions .nf-core.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ repository_type: pipeline
lint:
files_exist:
- assets/nf-core-treeval_logo_light.png
- conf/test_full.config
- docs/images/nf-core-treeval_logo_light.png
- docs/images/nf-core-treeval_logo_dark.png
files_unchanged:
Expand Down
44 changes: 22 additions & 22 deletions conf/base.config
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,7 @@ process {

withName:SAMTOOLS_MERGE {
cpus = { check_max( 16 * 1, 'cpus' ) }
memory = { check_max( 50.GB * task.attempt, 'memory') }
memory = { check_max( 150.GB * task.attempt, 'memory') }
}

// RESOURCES: MEMORY INTENSIVE STEPS, SOFTWARE TO BE UPDATED TO COMBAT THIS
Expand All @@ -98,19 +98,19 @@ process {
}

// Standard parameters, covers most insecta
//withName: '.*:.*:LONGREAD_COVERAGE:(MINIMAP2_ALIGN|MINIMAP2_ALIGN_SPLIT)' {
// cpus = { check_max( 16 * 1, 'cpus' ) }
// memory = { check_max( 100.GB * task.attempt, 'memory' ) }
// time = { check_max( 20.h * task.attempt, 'time' ) }
//}

// For Large complex genomes > 4Gb
withName: '.*:.*:LONGREAD_COVERAGE:(MINIMAP2_ALIGN|MINIMAP2_ALIGN_SPLIT)' {
cpus = { check_max( 20 * 1, 'cpus' ) }
memory = { check_max( 400.GB * task.attempt, 'memory' ) }
time = { check_max( 300.h * task.attempt, 'time' ) }
cpus = { check_max( 16 * 1, 'cpus' ) }
memory = { check_max( 100.GB * task.attempt, 'memory' ) }
time = { check_max( 18.h * task.attempt, 'time' ) }
}

// For Large complex genomes > 4Gb
// withName: '.*:.*:LONGREAD_COVERAGE:(MINIMAP2_ALIGN|MINIMAP2_ALIGN_SPLIT)' {
//cpus = { check_max( 20 * 1, 'cpus' ) }
//memory = { check_max( 400.GB * task.attempt, 'memory' ) }
// time = { check_max( 300.h * task.attempt, 'time' ) }
//}

withName: '.*:.*:LONGREAD_COVERAGE:SAMTOOLS_SORT' {
cpus = { check_max( 8 * 1, 'cpus' ) }
}
Expand Down Expand Up @@ -152,7 +152,7 @@ process {
}

withName: BWAMEM2_INDEX {
memory = { check_max( 100.GB * task.attempt, 'memory' ) }
memory = { check_max( 50.GB * task.attempt, 'memory' ) }
}

// add a cpus 16 if bam.size() >= 50GB
Expand All @@ -166,16 +166,16 @@ process {
memory = { check_max( 100.GB * task.attempt, 'memory' ) }
}

//withName: BUSCO {
//cpus = { check_max( 16 * task.attempt, 'cpus' ) }
//memory = { check_max( 50.GB * task.attempt, 'memory' ) }
//time = { check_max( 20.h * task.attempt, 'time' ) }
//}

// Large Genomes > 4Gb
withName: BUSCO {
cpus = { check_max( 30 * task.attempt, 'cpus' ) }
memory = { check_max( 100.GB * task.attempt, 'memory' ) }
time = { check_max( 300.h * task.attempt, 'time' ) }
cpus = { check_max( 16 * task.attempt, 'cpus' ) }
memory = { check_max( 50.GB * task.attempt, 'memory' ) }
time = { check_max( 20.h * task.attempt, 'time' ) }
}

// Large Genomes > 4Gb
//withName: BUSCO {
//cpus = { check_max( 30 * task.attempt, 'cpus' ) }
//memory = { check_max( 120.GB * task.attempt, 'memory' ) }
//time = { check_max( 300.h * task.attempt, 'time' ) }
//}
}
58 changes: 27 additions & 31 deletions lib/TreeValProject.groovy
Original file line number Diff line number Diff line change
Expand Up @@ -22,38 +22,34 @@ class TreeValProject {
input_data['pb_data'] = metrics.pb_data
input_data['cm_data'] = metrics.cm_data

if (workflow.success) {

def output_directory = new File("${params.tracedir}/")
if (!output_directory.exists()) {
output_directory.mkdirs()
}

def output_hf = new File( output_directory, "input_data_${input_data.sample_name}_${input_data.entry}_${params.trace_timestamp}.txt" )
log.info output_hf.name
output_hf.write """\
---RUN_DATA---
Pipeline_version: ${input_data.version}
Pipeline_runname: ${input_data.runName}
Pipeline_session: ${input_data.session_id}
Pipeline_duration: ${input_data.duration}
Pipeline_datastrt: ${input_data.DateStarted}
Pipeline_datecomp: ${input_data.DateCompleted}
Pipeline_entrypnt: ${input_data.entry}
---INPUT_DATA---
InputSampleID: ${input_data.sample_name}
InputYamlFile: ${input_data.input_yaml}
InputAssemblyData: ${input_data.rf_data}
Input_PacBio_Files: ${input_data.pb_data}
Input_Cram_Files: ${input_data.cm_data}
---RESOURCES---
""".stripIndent()
def output_directory = new File("${params.tracedir}/")
if (!output_directory.exists()) {
output_directory.mkdirs()
}

def full_file = new File( output_directory, "TreeVal_run_${input_data.sample_name}_${input_data.entry}_${params.trace_timestamp}.txt" )
def file_locs = ["${params.tracedir}/input_data_${input_data.sample_name}_${input_data.entry}_${params.trace_timestamp}.txt",
"${params.tracedir}/pipeline_execution_${params.trace_timestamp}.txt"]
file_locs.each{ full_file.append( new File( it ).getText() ) }
def output_hf = new File( output_directory, "input_data_${input_data.sample_name}_${input_data.entry}_${params.trace_timestamp}.txt" )
output_hf.write """\
---RUN_DATA---
Pipeline_version: ${input_data.version}
Pipeline_runname: ${input_data.runName}
Pipeline_session: ${input_data.session_id}
Pipeline_duration: ${input_data.duration}
Pipeline_datastrt: ${input_data.DateStarted}
Pipeline_datecomp: ${input_data.DateCompleted}
Pipeline_entrypnt: ${input_data.entry}
---INPUT_DATA---
InputSampleID: ${input_data.sample_name}
InputYamlFile: ${input_data.input_yaml}
InputAssemblyData: ${input_data.rf_data}
Input_PacBio_Files: ${input_data.pb_data}
Input_Cram_Files: ${input_data.cm_data}
---RESOURCES---
""".stripIndent()

def full_file = new File( output_directory, "TreeVal_run_${input_data.sample_name}_${input_data.entry}_${params.trace_timestamp}.txt" )
def file_locs = ["${params.tracedir}/input_data_${input_data.sample_name}_${input_data.entry}_${params.trace_timestamp}.txt",
"${params.tracedir}/pipeline_execution_${params.trace_timestamp}.txt"]
file_locs.each{ full_file.append( new File( it ).getText() ) }

}
}
}
8 changes: 4 additions & 4 deletions nextflow.config
Original file line number Diff line number Diff line change
Expand Up @@ -151,10 +151,10 @@ profiles {
executor.memory = 60.GB
}

farm_full { includeConfig 'conf/farm_full' }
farm_rapid { includeConfig 'conf/farm_rapid' }
github_full { includeConfig 'conf/github_full' }
github_rapid { includeConfig 'conf/github_rapid' }
farm_full { includeConfig 'conf/farm_full.config' }
farm_rapid { includeConfig 'conf/farm_rapid.config' }
github_full { includeConfig 'conf/github_full.config' }
github_rapid { includeConfig 'conf/github_rapid.config' }
}


Expand Down

0 comments on commit 43f6292

Please sign in to comment.