Skip to content

Commit

Permalink
chore(args)!: change arg name with_orphan_species
Browse files Browse the repository at this point in the history
  • Loading branch information
breakthewall committed Nov 29, 2023
1 parent 66895b1 commit b56cb0f
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 8 deletions.
8 changes: 4 additions & 4 deletions rptools/rpfba/Args.py
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
"sim": "fraction",
"fraction_coeff": 0.75,
"merge": "",
"ignore_orphan_species": True,
"with_orphan_species": False,
}

def add_arguments(parser: ArgumentParser):
Expand Down Expand Up @@ -61,10 +61,10 @@ def add_arguments(parser: ArgumentParser):
help="output the full merged model in addition of heterologous pathway only (default: False)",
)
parser.add_argument(
"--ignore_orphan_species",
"--with_orphan_species",
action="store_true",
default=DEFAULT_ARGS["ignore_orphan_species"],
help="ignore metabolites that are only consumed or produced (default: True)",
default=DEFAULT_ARGS["with_orphan_species"],
help="Take metabolites that are only consumed (default: False)",
)

return parser
5 changes: 1 addition & 4 deletions rptools/rpfba/rpfba.py
Original file line number Diff line number Diff line change
Expand Up @@ -65,13 +65,10 @@ def preprocess(
# CHECKING
# Detect orphan species among missing ones in the model,
# i.e. that are only consumed or produced
if args.ignore_orphan_species:
if not args.with_orphan_species:
merged_model.search_isolated_species(missing_species)

if args.merge != "":
# merged_outfile = (
# pathway.get_id() + "__MERGED_IN__" + model.getName() + ".sbml"
# )
logger.info(f"Write merged rpSBML file to {args.merge}")
merged_model.write_to_file(args.merge)

Expand Down

0 comments on commit b56cb0f

Please sign in to comment.