Skip to content

Commit

Permalink
Minor updates in util/set_up.py
Browse files Browse the repository at this point in the history
  • Loading branch information
GwennyGit committed Jul 12, 2024
1 parent ee7f65c commit 6da3f9a
Showing 1 changed file with 8 additions and 7 deletions.
15 changes: 8 additions & 7 deletions src/specimen/util/set_up.py
Original file line number Diff line number Diff line change
Expand Up @@ -380,7 +380,7 @@ def dict_recursive_check(dictA:dict, key:str=None,

# @TEST
def save_cmpb_user_input(configpath:Union[str,None]=None) -> dict:
"""Guide the user step by step throuh the creation of the configuration for a cmpb pipeline run
"""Guide the user step by step through the creation of the configuration for a cmpb pipeline run
(via commandline).
Args:
Expand Down Expand Up @@ -443,15 +443,15 @@ def save_cmpb_user_input(configpath:Union[str,None]=None) -> dict:
config['general']['save_all_models'] = False

# run memote always y/n
run_memote = click.prompt('Do you want run memote after each step?', type=click.Choice(['y','n']), show_choices=True)
run_memote = click.prompt('Do you want to run memote after each step?', type=click.Choice(['y','n']), show_choices=True)
match run_memote:
case 'y':
config['general']['memote_always_on'] = True
case 'n':
config['general']['memote_always_on'] = False

# run stats always y/n
models_stats = click.prompt('Do you want run memote after each step?', type=click.Choice(['y','n']), show_choices=True)
models_stats = click.prompt('Do you want to run memote after each step?', type=click.Choice(['y','n']), show_choices=True)
match models_stats:
case 'y':
config['general']['stats_always_on'] = True
Expand All @@ -462,7 +462,7 @@ def save_cmpb_user_input(configpath:Union[str,None]=None) -> dict:
refseq = click.prompt('If you want to run a gap analysis with KEGG or have a CarveMe model, please enter the path to your refseq gff file', type=click.Path(exists=True))
config['general']['refseq_organism_id'] = refseq

kegg_org_id = click.prompt('If you want to run a gap analysis with KEGG or have a CarveMe model, please enter the path to your refseq gff file', type=click.Path(exists=True))
kegg_org_id = click.prompt('If you want to run a gap analysis with KEGG, please enter the KEGG organism ID', type=click.Path(exists=True))
config['general']['refseq_organism_id'] = kegg_org_id

# part-specific
Expand All @@ -476,7 +476,7 @@ def save_cmpb_user_input(configpath:Union[str,None]=None) -> dict:
if carveme == 'y':
email = click.prompt('Enter an email address for the connection to NCBI Entrez', type=str)
config['cm-polish']['email'] = email
labs = click.prompt('Do you have a lab strain?', type=click.Choice(['y','n']), show_choices=True)
labs = click.prompt('Do you have a strain without any database information?', type=click.Choice(['y','n']), show_choices=True)
labs = True if labs == 'y' else False
config['cm-polish']['is_lab_strain'] = labs
if labs:
Expand Down Expand Up @@ -507,7 +507,7 @@ def save_cmpb_user_input(configpath:Union[str,None]=None) -> dict:
Path3 = click.prompt('Enter path to protein FASTA file used as input for CarveMe', type=click.Path(exists=True))
config['gapfilling']['gap_fill_params']['biocyc_files'] = [Path0, Path1, Path2, Path3]


# @TODO: Funktioniert das so? Bei den anderen yes-no-Fragen hast du noch alles auf True oder False gesetzt.
# kegg pathways as groups
kegg_pw_groups = click.prompt('Do you want to add KEGG pathways as groups to the model?', type=click.Choice(['y','n']), show_choices=True)
config['kegg_pathway_groups'] = kegg_pw_groups
Expand All @@ -525,6 +525,7 @@ def save_cmpb_user_input(configpath:Union[str,None]=None) -> dict:
case 'n':
config['duplicates']['remove_unused_metabs'] = False

# @TODO: Ask for any biomass correction
# BOF
do_bofdat = click.prompt('Do you want do run BOFdat?', type=click.Choice(['y','n']), show_choices=True)
match do_bofdat:
Expand All @@ -534,7 +535,7 @@ def save_cmpb_user_input(configpath:Union[str,None]=None) -> dict:
config['BOF']['full_genome_sequence'] = full_genome_path
dna_wf = click.prompt('Enter the DNA weight fraction of your organism', type=float)
config['BOF']['dna_weight_fraction'] = dna_wf
wf = click.prompt('Enter the wight fraction of your organsim (enzyme/ion)', type=float)
wf = click.prompt('Enter the weight fraction of your organsim (enzyme/ion)', type=float)
config['BOF']['weight_fraction'] = wf
case 'n':
config['BOF']['run_bofdat'] = False
Expand Down

0 comments on commit 6da3f9a

Please sign in to comment.