Skip to content

Commit

Permalink
Allow setting data managers parameters in genomes.yml
Browse files Browse the repository at this point in the history
  • Loading branch information
mvdbeek committed Feb 2, 2024
1 parent 413d156 commit 9ba1626
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 5 deletions.
1 change: 1 addition & 0 deletions src/ephemeris/_config_models.py
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,7 @@ class RepositoryInstallTargets(BaseModel):
class DataManager(BaseModel, extra=Extra.forbid):
tags: List[str]
tool_id: str
parameters: Optional[List[Dict[str, str]]] = None


class DataManagers(BaseModel, extra=Extra.forbid):
Expand Down
13 changes: 8 additions & 5 deletions src/ephemeris/_idc_split_data_manager_genomes.py
Original file line number Diff line number Diff line change
Expand Up @@ -222,11 +222,14 @@ def walk_over_incomplete_runs(split_options: SplitOptions):
log.info(f"Building: {build_id} {indexer}")

tool_id = tool_id_for(indexer, data_managers, split_options.tool_id_mode)
params = [
{"all_fasta_source": "{{ item.id }}"},
{"sequence_name": "{{ item.name }}"},
{"sequence_id": "{{ item.id }}"},
]
data_manager = data_managers.__root__[indexer]
params = data_manager.parameters
if params is None:
params = [
{"all_fasta_source": "{{ item.id }}"},
{"sequence_name": "{{ item.name }}"},
{"sequence_id": "{{ item.id }}"},
]
# why is this not pulled from the data managers conf? -nate
if re.search("bwa", tool_id):
params.append({"index_algorithm": "bwtsw"})
Expand Down

0 comments on commit 9ba1626

Please sign in to comment.