Skip to content

Commit

Permalink
tie java heap to task memory
Browse files Browse the repository at this point in the history
  • Loading branch information
apriltuesday committed May 9, 2024
1 parent 4e1575c commit c352362
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 10 deletions.
10 changes: 5 additions & 5 deletions eva_submission/nextflow/accession_and_load.nf
Original file line number Diff line number Diff line change
Expand Up @@ -238,7 +238,7 @@ process accession_vcf {


"""
(java -Xmx6g -jar $params.jar.accession_pipeline --spring.config.location=file:$params.accession_job_props $pipeline_parameters) || \
(java -Xmx${task.memory.toGiga()}G -jar $params.jar.accession_pipeline --spring.config.location=file:$params.accession_job_props $pipeline_parameters) || \
# If accessioning fails due to missing variants, but the only missing variants are structural variants,
# then we should treat this as a success from the perspective of the automation.
# TODO revert once accessioning pipeline properly registers structural variants
Expand Down Expand Up @@ -344,7 +344,7 @@ process load_variants_vcf {
pipeline_parameters += " --spring.data.mongodb.database=" + db_name.toString()

"""
java -Xmx4G -jar $params.jar.eva_pipeline --spring.config.location=file:$params.load_job_props --parameters.path=$params.load_job_props $pipeline_parameters
java -Xmx${task.memory.toGiga()}G -jar $params.jar.eva_pipeline --spring.config.location=file:$params.load_job_props --parameters.path=$params.load_job_props $pipeline_parameters
"""
}

Expand Down Expand Up @@ -386,7 +386,7 @@ process run_vep_on_variants {
pipeline_parameters += " --app.vep.cache.species=" + vep_species.toString()

"""
java -Xmx4G -jar $params.jar.eva_pipeline --spring.config.location=file:$params.load_job_props --parameters.path=$params.load_job_props $pipeline_parameters
java -Xmx${task.memory.toGiga()}G -jar $params.jar.eva_pipeline --spring.config.location=file:$params.load_job_props --parameters.path=$params.load_job_props $pipeline_parameters
"""
}

Expand Down Expand Up @@ -426,7 +426,7 @@ process calculate_statistics_vcf {
pipeline_parameters += " --spring.data.mongodb.database=" + db_name.toString()

"""
java -Xmx4G -jar $params.jar.eva_pipeline --spring.config.location=file:$params.load_job_props --parameters.path=$params.load_job_props $pipeline_parameters
java -Xmx${task.memory.toGiga()}G -jar $params.jar.eva_pipeline --spring.config.location=file:$params.load_job_props --parameters.path=$params.load_job_props $pipeline_parameters
"""
}

Expand Down Expand Up @@ -456,6 +456,6 @@ process import_accession {
pipeline_parameters += " --spring.data.mongodb.database=" + db_name.toString()

"""
java -Xmx4G -jar $params.jar.eva_pipeline --spring.config.location=file:$params.acc_import_job_props --parameters.path=$params.acc_import_job_props $pipeline_parameters
java -Xmx${task.memory.toGiga()}G -jar $params.jar.eva_pipeline --spring.config.location=file:$params.acc_import_job_props --parameters.path=$params.acc_import_job_props $pipeline_parameters
"""
}
10 changes: 5 additions & 5 deletions eva_submission/nextflow/remap_and_cluster.nf
Original file line number Diff line number Diff line change
Expand Up @@ -136,7 +136,7 @@ process extract_vcf_from_mongo {
publishDir "$params.logs_dir", overwrite: true, mode: "copy", pattern: "*.log*"

"""
java -Xmx8G -jar $params.jar.vcf_extractor \
java -Xmx${task.memory.toGiga()}G -jar $params.jar.vcf_extractor \
--spring.config.location=file:${params.extraction_properties} \
--parameters.assemblyAccession=${source_assembly_accession} \
--parameters.fasta=${source_fasta} \
Expand Down Expand Up @@ -200,7 +200,7 @@ process ingest_vcf_into_mongo {

script:
"""
java -Xmx8G -jar $params.jar.vcf_ingestion \
java -Xmx${task.memory.toGiga()}G -jar $params.jar.vcf_ingestion \
--spring.config.location=file:${params.ingestion_properties} \
--parameters.remappedFrom=${source_assembly_accession} \
--parameters.vcf=${remapped_vcf} \
Expand All @@ -226,7 +226,7 @@ process cluster_studies_from_mongo {
publishDir "$params.logs_dir", overwrite: true, mode: "copy"

"""
java -Xmx8G -jar $params.jar.clustering \
java -Xmx${task.memory.toGiga()}G -jar $params.jar.clustering \
--spring.config.location=file:${params.clustering_properties} \
--spring.batch.job.names=STUDY_CLUSTERING_JOB \
> ${params.target_assembly_accession}_clustering.log
Expand All @@ -248,7 +248,7 @@ process qc_clustering {
publishDir "$params.logs_dir", overwrite: true, mode: "copy", pattern: "*.log*"

"""
java -Xmx8G -jar $params.jar.clustering \
java -Xmx${task.memory.toGiga()}G -jar $params.jar.clustering \
--spring.config.location=file:${params.clustering_properties} \
--spring.batch.job.names=NEW_CLUSTERED_VARIANTS_QC_JOB \
> ${params.target_assembly_accession}_clustering_qc.log
Expand All @@ -272,7 +272,7 @@ process backpropagate_clusters {
publishDir "$params.logs_dir", overwrite: true, mode: "copy", pattern: "*.log*"

"""
java -Xmx8G -jar $params.jar.clustering \
java -Xmx${task.memory.toGiga()}G -jar $params.jar.clustering \
--spring.config.location=file:${params.clustering_properties} \
--parameters.remappedFrom=${source_assembly_accession} \
--spring.batch.job.names=BACK_PROPAGATE_NEW_RS_JOB \
Expand Down

0 comments on commit c352362

Please sign in to comment.