-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* add raredisease config * typo * add samplesheet and pipeline parameters * update config case function * update config case function * update config case function * reach case_sample * reach case_sample * bug fixing * fix samplesheet creation * fix samplesheet creation * fix samplesheet creation * start plan for raredisease parameters * fix linting * use general tower binary path * change to staticmethod and clean up sonarcloud issue * start preparing test for cg workflow raredisease config-case * comment out part of the test * move option_from_start to common * add config manipulation * black * fix path * add on-the-fly parameters * add on-the-fly parameters, fix typo * fix PipelineParameters * config: write to stdout * config: write to stdout * add newline * add newline * black * black * fix some code smells * black * keep using RnafusionParameters * black * change type * update docstring * uncomment tests * adapt server fixture * get parameters info in dry-run * remove binary path from raredisease server fixture * add outdir * add all pipeline parameter to teh string * fix issues * black * Update cg/cli/workflow/nf_analysis.py Co-authored-by: Henrik Stranneheim <[email protected]> * add config file extension and use * add config file extension and use * remove config read/write/concat that can be in txt io * Update cg/meta/workflow/raredisease.py Co-authored-by: Henrik Stranneheim <[email protected]> * Update cg/meta/workflow/raredisease.py Co-authored-by: Henrik Stranneheim <[email protected]> * Update cg/meta/workflow/raredisease.py Co-authored-by: Henrik Stranneheim <[email protected]> * rename function config_case in RarediseaseApi * Update cg/meta/workflow/raredisease.py Co-authored-by: Henrik Stranneheim <[email protected]> * Update cg/meta/workflow/raredisease.py Co-authored-by: Henrik Stranneheim <[email protected]> * use named arguments * types and named args * use constant for empty string and double quote * use PlinkPhenotypeStatus + update docstring * use params instead of config, and overwrite nf-analysis in raredisease case, later to be moved in nf-analysis * clarify docstring * Update cg/models/raredisease/raredisease.py Co-authored-by: Sebastian Diaz <[email protected]> * use Sex class constants * move getting the parental id to StatusDB API * move Pipeline to Workflow * create RarediseaseSampleSheetHeaders class, similar to Fluffy * add test raredisease config case * rename reformat function to clarify * Update cg/meta/workflow/raredisease.py Co-authored-by: Sebastian Diaz <[email protected]> * Update cg/meta/workflow/raredisease.py Co-authored-by: Sebastian Diaz <[email protected]> * update docstring * samplesheet to sample sheet * fix dependencies * fix dependencies * workflow * workflow * fix dependencies * adapt concat * black * update dry-run message in tests * black * debugging * debugging * debugging * debugging * black * black * debugging * add test for concat * continue addind concat tests * continue addind concat tests * fix typo * fix tests * black * add test for sample sheet creation * add test for sample sheet creation * test writing * test for writing config file * black * test for writing config file * type for raredisease config to str * test for writing config file * black * black * test for writing config file * black * test for writing config file * test for writing config file * black * make reformat_sample_content a property * fix error * Update cg/io/config.py Co-authored-by: ChristianOertlin <[email protected]> * Update cg/meta/workflow/raredisease.py Co-authored-by: ChristianOertlin <[email protected]> * key to parameters * Update cg/io/txt.py Co-authored-by: ChristianOertlin <[email protected]> * Update cg/store/models.py Co-authored-by: ChristianOertlin <[email protected]> * black * parental id as property * black * paternal/maternal ids cannot be None, should return empty string --------- Co-authored-by: Annick Renevey <[email protected]> Co-authored-by: Henrik Stranneheim <[email protected]> Co-authored-by: Sebastian Diaz <[email protected]> Co-authored-by: ChristianOertlin <[email protected]>
- Loading branch information
1 parent
36cf6b6
commit dd59c1a
Showing
28 changed files
with
584 additions
and
52 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
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
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
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
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,17 @@ | ||
"""Module to read or write config files""" | ||
|
||
from pathlib import Path | ||
from typing import Any | ||
from cg.constants.symbols import EMPTY_STRING | ||
|
||
|
||
def write_config_nextflow_style(content: dict[str, Any] | None) -> str: | ||
"""Write content to stream accepted by Nextflow config files with non-quoted booleans and quoted strings.""" | ||
string: str = EMPTY_STRING | ||
double_quotes: str = '"' | ||
for parameter, value in content.items(): | ||
if isinstance(value, Path): | ||
value: str = value.as_posix() | ||
quotes = double_quotes if type(value) is str else EMPTY_STRING | ||
string += f"params.{parameter} = {quotes}{value}{quotes}\n" | ||
return string |
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
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
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.