-
Notifications
You must be signed in to change notification settings - Fork 12
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #445 from tcezard/EVA3567_static_nextflow
EVA-3567 - Use a static nextflow pipeline
- Loading branch information
Showing
7 changed files
with
295 additions
and
187 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
25 changes: 0 additions & 25 deletions
25
eva-accession-release-automation/run_release_in_embassy/__init__.py
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,25 +0,0 @@ | ||
# Copyright 2020 EMBL - European Bioinformatics Institute | ||
# | ||
# Licensed under the Apache License, Version 2.0 (the "License"); | ||
# you may not use this file except in compliance with the License. | ||
# You may obtain a copy of the License at | ||
# | ||
# http://www.apache.org/licenses/LICENSE-2.0 | ||
# | ||
# Unless required by applicable law or agreed to in writing, software | ||
# distributed under the License is distributed on an "AS IS" BASIS, | ||
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
# See the License for the specific language governing permissions and | ||
# limitations under the License. | ||
|
||
import logging | ||
import sys | ||
|
||
|
||
def init_logger(): | ||
logging.basicConfig(stream=sys.stdout, level=logging.INFO, format='%(asctime)-15s %(levelname)s %(message)s') | ||
result_logger = logging.getLogger(__name__) | ||
return result_logger | ||
|
||
|
||
logger = init_logger() | ||
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
197 changes: 197 additions & 0 deletions
197
eva-accession-release-automation/run_release_in_embassy/run_release_for_assembly.nf
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,197 @@ | ||
#!/usr/bin/env nextflow | ||
|
||
nextflow.enable.dsl=2 | ||
|
||
workflow { | ||
initiate_release_status_for_assembly('initiate') | copy_accessioning_collections_to_embassy | run_release_for_assembly | \ | ||
merge_dbsnp_eva_release_files | sort_bgzip_index_release_files | validate_release_vcf_files | \ | ||
analyze_vcf_validation_results | count_rs_ids_in_release_files | validate_rs_release_files | \ | ||
update_sequence_names_to_ena | update_release_status_for_assembly | ||
} | ||
|
||
process initiate_release_status_for_assembly { | ||
|
||
label 'short_time', 'med_mem' | ||
|
||
input: | ||
val flag | ||
|
||
output: | ||
val true, emit: flag | ||
|
||
script: | ||
""" | ||
export PYTHONPATH=$params.python_path | ||
$params.executable.python.interpreter -m run_release_in_embassy.initiate_release_status_for_assembly --private-config-xml-file $params.maven.settings_file --profile $params.maven.environment --release-species-inventory-table eva_progress_tracker.clustering_release_tracker --taxonomy-id $params.taxonomy --assembly-accession $params.assembly --release-version $params.release_version 1>> $params.log_file 2>&1 | ||
""" | ||
} | ||
|
||
process copy_accessioning_collections_to_embassy { | ||
|
||
label 'long_time', 'med_mem' | ||
|
||
input: | ||
val flag | ||
|
||
output: | ||
val true, emit: flag | ||
|
||
script: | ||
""" | ||
export PYTHONPATH=$params.python_path | ||
$params.executable.python.interpreter -m run_release_in_embassy.copy_accessioning_collections_to_embassy --private-config-xml-file $params.maven.settings_file --profile $params.maven.environment --taxonomy-id $params.taxonomy --assembly-accession $params.assembly --release-species-inventory-table eva_progress_tracker.clustering_release_tracker --release-version $params.release_version --dump-dir $params.dump_dir 1>> $params.log_file 2>&1 | ||
""" | ||
} | ||
|
||
process run_release_for_assembly { | ||
|
||
label 'long_time', 'med_mem' | ||
|
||
input: | ||
val flag | ||
|
||
output: | ||
val true, emit: flag | ||
|
||
script: | ||
""" | ||
export PYTHONPATH=$params.python_path | ||
$params.executable.python.interpreter -m run_release_in_embassy.run_release_for_assembly --private-config-xml-file $params.maven.settings_file --profile $params.maven.environment --taxonomy-id $params.taxonomy --assembly-accession $params.assembly --release-species-inventory-table eva_progress_tracker.clustering_release_tracker --release-version $params.release_version --species-release-folder $params.assembly_folder --release-jar-path $params.jar.release_pipeline 1>> $params.log_file 2>&1 | ||
""" | ||
} | ||
|
||
process merge_dbsnp_eva_release_files { | ||
|
||
label 'long_time', 'med_mem' | ||
|
||
input: | ||
val flag | ||
|
||
output: | ||
val true, emit: flag | ||
|
||
script: | ||
""" | ||
export PYTHONPATH=$params.python_path | ||
$params.executable.python.interpreter -m run_release_in_embassy.merge_dbsnp_eva_release_files --private-config-xml-file $params.maven.settings_file --profile $params.maven.environment --bgzip-path $params.executable.bgzip --bcftools-path $params.executable.bcftools --vcf-sort-script-path $params.executable.sort_vcf_sorted_chromosomes --taxonomy-id $params.taxonomy --assembly-accession $params.assembly --release-species-inventory-table eva_progress_tracker.clustering_release_tracker --release-version $params.release_version --species-release-folder $params.assembly_folder 1>> $params.log_file 2>&1 | ||
""" | ||
} | ||
|
||
process sort_bgzip_index_release_files { | ||
|
||
label 'long_time', 'med_mem' | ||
|
||
input: | ||
val flag | ||
|
||
output: | ||
val true, emit: flag | ||
|
||
script: | ||
""" | ||
export PYTHONPATH=$params.python_path | ||
$params.executable.python.interpreter -m run_release_in_embassy.sort_bgzip_index_release_files --bgzip-path $params.executable.bgzip --bcftools-path $params.executable.bcftools --vcf-sort-script-path $params.executable.sort_vcf_sorted_chromosomes --taxonomy-id $params.taxonomy --assembly-accession $params.assembly --species-release-folder $params.assembly_folder 1>> $params.log_file 2>&1 | ||
""" | ||
} | ||
|
||
process validate_release_vcf_files { | ||
|
||
label 'long_time', 'med_mem' | ||
|
||
input: | ||
val flag | ||
|
||
output: | ||
val true, emit: flag | ||
|
||
script: | ||
""" | ||
export PYTHONPATH=$params.python_path | ||
$params.executable.python.interpreter -m run_release_in_embassy.validate_release_vcf_files --private-config-xml-file $params.maven.settings_file --profile $params.maven.environment --taxonomy-id $params.taxonomy --assembly-accession $params.assembly --release-species-inventory-table eva_progress_tracker.clustering_release_tracker --release-version $params.release_version --species-release-folder $params.assembly_folder --vcf-validator-path $params.executable.vcf_validator --assembly-checker-path $params.executable.vcf_assembly_checker 1>> $params.log_file 2>&1 | ||
""" | ||
} | ||
|
||
process analyze_vcf_validation_results { | ||
|
||
label 'long_time', 'med_mem' | ||
|
||
input: | ||
val flag | ||
|
||
output: | ||
val true, emit: flag | ||
|
||
script: | ||
""" | ||
export PYTHONPATH=$params.python_path | ||
$params.executable.python.interpreter -m run_release_in_embassy.analyze_vcf_validation_results --species-release-folder $params.assembly_folder --assembly-accession $params.assembly 1>> $params.log_file 2>&1 | ||
""" | ||
} | ||
|
||
process count_rs_ids_in_release_files { | ||
|
||
label 'long_time', 'med_mem' | ||
|
||
input: | ||
val flag | ||
|
||
output: | ||
val true, emit: flag | ||
|
||
script: | ||
""" | ||
export PYTHONPATH=$params.python_path | ||
$params.executable.python.interpreter -m run_release_in_embassy.count_rs_ids_in_release_files --count-ids-script-path $params.executable.count_ids_in_vcf --taxonomy-id $params.taxonomy --assembly-accession $params.assembly --species-release-folder $params.assembly_folder 1>> $params.log_file 2>&1 | ||
""" | ||
} | ||
|
||
process validate_rs_release_files { | ||
|
||
label 'long_time', 'med_mem' | ||
|
||
input: | ||
val flag | ||
|
||
output: | ||
val true, emit: flag | ||
|
||
script: | ||
""" | ||
export PYTHONPATH=$params.python_path | ||
$params.executable.python.interpreter -m run_release_in_embassy.validate_rs_release_files --private-config-xml-file $params.maven.settings_file --profile $params.maven.environment --taxonomy-id $params.taxonomy --assembly-accession $params.assembly --release-species-inventory-table eva_progress_tracker.clustering_release_tracker --release-version $params.release_version --species-release-folder $params.assembly_folder 1>> $params.log_file 2>&1 | ||
""" | ||
} | ||
|
||
process update_sequence_names_to_ena { | ||
|
||
label 'long_time', 'med_mem' | ||
|
||
input: | ||
val flag | ||
|
||
output: | ||
val true, emit: flag | ||
|
||
script: | ||
""" | ||
export PYTHONPATH=$params.python_path | ||
$params.executable.python.interpreter -m run_release_in_embassy.update_sequence_names_to_ena --taxonomy-id $params.taxonomy --assembly-accession $params.assembly --species-release-folder $params.assembly_folder --sequence-name-converter-path $params.executable.convert_vcf_file --bcftools-path $params.executable.bcftools 1>> $params.log_file 2>&1 | ||
""" | ||
} | ||
|
||
process update_release_status_for_assembly { | ||
|
||
label 'short_time', 'med_mem' | ||
|
||
input: | ||
val flag | ||
|
||
output: | ||
val true, emit: flag11 | ||
|
||
script: | ||
""" | ||
export PYTHONPATH=$params.python_path | ||
$params.executable.python.interpreter -m run_release_in_embassy.update_release_status_for_assembly --private-config-xml-file $params.maven.settings_file --profile $params.maven.environment --release-species-inventory-table eva_progress_tracker.clustering_release_tracker --taxonomy-id $params.taxonomy --assembly-accession $params.assembly --release-version $params.release_version 1>> $params.log_file 2>&1 | ||
""" | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.