Skip to main content

Module pathways

Module pathways 

Source
Expand description

Pathway selection and per-reaction expansion.

Input: a PathwayTable (loaded by gapsmith-db) plus user filters. The selector walks every row, keeps those matching the requested keyword (or "all"), and then expands each surviving row into one entry per (reaction_id, reaction_name, ec, keyrea, spont) tuple.

prepare_batch_alignments.R:150-224 in the R reference does the same fan-out, keyed off the same four comma-separated columns (reaId, reaEc, keyRea, reaName).

§Keyword resolution

The user-facing -p keyword is first mapped to a MetaCyc hierarchy category (or a set of categories) via resolve_keyword, mirroring src/gapseq_find.sh:351-421. -p amino expands to Amino-Acid-Biosynthesis, -p all expands to a superset of every gapseq category, and any other token is matched as-is.

Selection then runs grep -wE $pwyKey against the full TSV row, then applies the taxonomic-range filter: a pathway is kept iff its taxrange column contains any of the NCBI tax IDs listed in dat/taxonomy.tbl for the requested taxonomy (default Bacteria) OR is empty.

Structs§

ExpandedReaction
One (pathway, reaction) pair ready for alignment.
PathwaySelectOptions

Enums§

MatchMode
Match mode used by PathwaySelectOptions::keyword.

Functions§

resolve_keyword
Map a user keyword to the regex alternatives gapseq’s gapseq_find.sh plugs into grep -wE. Mirrors lines 351-421 of the shell script.
select
Select matching pathways, then expand to per-reaction rows. Duplicate (pathway, rxn, name, ec) entries collapse to one.