Parser module¶
Submodules¶
Parser.generate_output¶
-
class
Parser.generate_output.
Output
(db, output_path, verbose, FBA=False, KO=False, timer_output=False, raw_solutions=True)¶ Bases:
object
Opens and fills output files produced by software
-
convert_output_2_xlsx
()¶ converts txt files to output files
-
output_FBA
(target_info, org_fbasolution, optimized_fba, comparisonresults, temp)¶ Outputs reactions and corresponding fluxes for fluxes that change significantly between wild-type FBA simulation (simulation without added reactions) and FBA simulation with added reactions to produce target compound
-
output_FBA_KOs
(target_info, fbasolution, compound_dict, comparisonKOresults, temp)¶ When reaction knockouts are performed list all reaction that have a significant flux difference from the orignal FBA simulation
-
output_compound_natively_present_in_target_organism
(target_info)¶ Outputs information if a target compound is already present in an organism
-
output_essential_reactions
(target_compound_ID, target_organism_ID, er)¶ When reaction knockouts are performed, outputs all reactions that when removed cause decrease in target production
-
output_final_targets
(targets, tan_threshold)¶
-
output_open_paths_all_organism_file
(target_compound_ID)¶ Open file to generate file that summarizes how many reactions would need to be added to every organism in the daabase to produce a target organism
-
output_paths_all_organisms
(target_compound_ID, pathlength, orgs, org_names)¶ Outputs information on the number of reactions that need to be added to an organism to get a target compound, this file is only generated all organisms are being examined to see if they can produce target compound
-
output_raw_solutions
(compound, org_ID, ordered_paths, reactions, externalrxnscount, incpds)¶
-
output_shortest_paths
(target_info, temp_rxns)¶ Outputs reactions and compounds that need to be added to an organism to get target compound
-
output_theoretical_yield
(target_compound_ID, target_organism_ID, fbasolution, compounds_dict)¶ Generates output file with theoretical yields
-
output_timer
(print_statement)¶
-
-
Parser.generate_output.
verbose_print
(verbose, line)¶
Parser.read_targets¶
-
class
Parser.read_targets.
Readfile
(file_name, db, inchidb=False, compartment='cytosol')¶ Bases:
object
Reads the input file containing target compounds
-
file_opener
()¶ Opens target file and extracts information
-
get_db_info
()¶ Retrieve database information for the values in the inputfile
-
modelinfo_opener
()¶ Get all model information out of the database
-
strain_check
(new_org_format)¶ Extract all strains for a specified organism
-
Parser.structure_similarity¶
-
class
Parser.structure_similarity.
TanimotoStructureSimilarity
(targets, all_compounds, cytosol, extracellular, verbose, threshold_score=1)¶ Bases:
object
Identifies if compounds are in the database but under a different ID based on structure similarity
-
calculate_tanimoto_score
()¶ Calculate similarity for compounds that are not in the database
-
extract_db_cpd_ID
(cpdID)¶ Extract correct database ID for a compound
-
fill_final_targets
(new_target)¶
-
get_original_target
(tmol)¶ Obtain original target
-
get_tanimoto_score
(tmol, threshold)¶
-
process_targets
(targets)¶ Reformat targets to remove compartment information
-
remove_compartment_info_from_cpdID
(cpd)¶
-
retrieve_fingerprints
()¶ Retrieve fingerprints for database compounds and targets
-
track_final_cpd
= None¶ Remove duplicated targets
-
-
Parser.structure_similarity.
verbose_print
(verbose, line)¶