Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 5 additions & 4 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -52,17 +52,18 @@ dev = [
include-package-data = true

[tool.setuptools.packages.find]
include = ["dram_viz*"]
where = ["src"]
include = ["dram_rules*"]

[tool.setuptools.package-data]
"*" = ["*.tsv", "*.lark"]

[project.scripts]
"dram_viz" = "dram_viz.__main__:main"
"dram.viz" = "dram_viz.__main__:main"
"dram_viz" = "dram_rules.make_product:main"
"dram.viz" = "dram_rules.make_product:main"

[tool.setuptools_scm]
write_to = "dram_viz/_version.py"
write_to = "src/dram_rules/_version.py"

[tool.ruff]

Expand Down
4 changes: 0 additions & 4 deletions src/__main__.py

This file was deleted.

2 changes: 1 addition & 1 deletion src/__init__.py → src/dram_rules/__init__.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
try:
from src._version import __version__
from dram_rules._version import __version__

except ImportError:
# package not installed
Expand Down
4 changes: 4 additions & 0 deletions src/dram_rules/__main__.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
from dram_rules.make_product import main

if __name__ == "__main__":
main()
File renamed without changes.
4 changes: 2 additions & 2 deletions src/apps/heatmap.py → src/dram_rules/apps/heatmap.py
Original file line number Diff line number Diff line change
Expand Up @@ -16,8 +16,8 @@
from bokeh.transform import factor_cmap, linear_cmap, log_cmap
from panel_material_ui import Tree

from src.definitions import NO_TAXONOMY_RANKS, TAXONOMY_RANKS_REGEX
from src.rule_parser.rules import get_val_col
from dram_rules.definitions import NO_TAXONOMY_RANKS, TAXONOMY_RANKS_REGEX
from dram_rules.rule_parser.rules import get_val_col

pn.extension("tabulator", "katex", template="bootstrap")

Expand Down
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
8 changes: 4 additions & 4 deletions src/make_product.py → src/dram_rules/make_product.py
Original file line number Diff line number Diff line change
Expand Up @@ -16,8 +16,8 @@
import polars as pl
import polars.selectors as cs

from src.apps.heatmap import Dashboard
from src.definitions import (
from dram_rules.apps.heatmap import Dashboard
from dram_rules.definitions import (
BACKUP_ALIAS_COLUMNS,
BACKUP_FASTA_COLUMNS,
BACKUP_GROUPBY_COLUMNS,
Expand All @@ -27,13 +27,13 @@
DEFAULT_GROUPBY_COLUMN,
DEFAULT_LABEL_COLUMN,
)
from src.processing.process_annotations import (
from dram_rules.processing.process_annotations import (
build_tax_edge_df_pl,
build_tax_tree_selected_recurse,
build_taxonomy_df_pl,
build_tree_pl,
)
from src.rule_parser.rules import (
from dram_rules.rule_parser.rules import (
ID_EXPR_DICT,
CompiledRules,
build_present_map,
Expand Down
File renamed without changes.
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
import pandas as pd
import polars as pl

from src.definitions import DEFAULT_FASTA_COLUMN
from dram_rules.definitions import DEFAULT_FASTA_COLUMN

logger = logging.getLogger("dram.viz")

Expand Down
File renamed without changes.
File renamed without changes.
File renamed without changes.
Original file line number Diff line number Diff line change
@@ -1,78 +1,29 @@
name alias rule
Acetate-Final @Acetate-1 | @Acetate-2 | @Acetate-3
Acetate-1 [[@Acetate-sub1 & [K00163 | K00161 | K00162] & K00627] | [K00174 | K00175] | [K00169 | K00170 | K00172 | K00189 | K00171 | K03737]] & [K01905 | K22224 | K24012]
Acetate-2 @Acetate-sub1 & K01568 & [K00138 | K00128 | K14085 | K00149 | K00129]
Acetate-3 K001895 | K01913
Acetate-sub1 [K00163 | K00161 | K00162 | K01568]

Propionate-Final @Propionate-1 | @Propionate-2 | @Propionate-3
Propionate-1 "[
[K01899 | K01900 | K01902 | K01903 | K01899]
& [K01847 | K01849 | K01848]
& [K00140 | [K05606 & [K11264 | K03416 | K18426]]]
& @Propionate-sub2
]
| @Propionate-sub1"
Propionate-2 [K01026 & [K20626 | K20627] & [K00248 | K00232] & @Propionate-sub2] | @Propionate-sub1
Propionate-3 [[K01699 | K13919 | K13920] & K13922 & @Propionate-sub2] | @Propionate-sub1
Propionate-sub1 "[
[K01206 | K01905 | K22224 | K24012]
| [
[
[K13788 | K00625 | K15024 | K13923]
| [K00169 | K00170 | K00172 | K00189 | K00171]
| K00656
]
& [K00925 | K00932 | K19697]
]
]"
Propionate-sub2 [K01895 | K01908]

Butyrate-Final @Butyrate-1 | @Butyrate-2 | @Butyrate-3 | @Butyrate-4
Butyrate-1 K00626 & [K00074 | K00022 | K07516 | K01825 | K01782 | K07514] & [K01692 | K01825 | K01782 | K07515 | K07514 | K07511 | K01715] & @Butyrate-sub1
Butyrate-2 [K00135 | K08324 | K00135 | K00139 | K17761 | K08324] & @Butyrate-sub2 & @Butyrate-sub1
Butyrate-3 K01580 & [K13524 | K07250 | K14268 | K00823 | K16871] & @Butyrate-sub2 & @Butyrate-sub1
Butyrate-4 "K01843
& [K01844 | K18011]
& K18012
& K18013
& [
[K01034 | K01035]
| [
K18014
& [K01692 | K01825 | K01782 | K07515 | K07514 | K07511]
& [K00022 | K01825 | K01782 | K07514]
]
]
& @Butyrate-1"
Butyrate-sub1 [K00209 | K17829] & [K01034 | K01035 | K19709]
Butyrate-sub2 [K00043 | K08318 | K18120 | K18121] & K18122 & K14534

Lactate-Final @Lactate-1 | @Lactate-2 | @Lactate-3
Lactate-1 "@Lactate-sub1
& [
[
[K00134 | K00150]
& [K00927 | K01837]
& [K01834 | K15633 | K15634 | K15635 | K01837]
]
| [
[K11389 | K00131 | K18978]
& [K01834 | K15633 | K15634 | K15635 | K01837]
]
| [
[K00134 | K00150]
& K01837 & K03103
]
]
& [K01689 | K27394 | K00873 | K12406]
& K00016"
Lactate-2 K00016
Lactate-3 [K18124 | K18125 | K00115 | K19813 | K00117] & K01053 & K05308 & [K11395 | K18127] & K00016
Lactate-sub1 "[K00844 | K00886 | K08074 | K00918 | K12407 | K00845 | K25026]
& [K01810 | K06859 | K13810 | K15916]
& [K24182 | K00850 | K16370 | K21071 | K00918 | K00895 | K21071]
& [K01623 | K01624 | K01622 | K11645 | K16305 | K16306]"
Acetate-Final @Acetate-1 | @Acetate-2 | @Acetate-3 | @Acetate-4 | @Acetate-5 Acetate-associated metabolism
Acetate-1 K24012 | [K01905 & K22224] Acetyl-CoA ↔ acetate; shared activity with propionate
Acetate-2 K01568 & [K00138 | K00128 | K14085 | K00149 | K00129] Pyruvate → acetaldehyde → acetate
Acetate-3 [K00625 | K13788 | K15024] & K00925 Acetyl-CoA ↔ acetyl-phosphate ↔ acetate
Acetate-4 K01621 & K00925 Xylulose-5-phosphate/fructose-6-phosphate → acetyl-phosphate → acetate
Acetate-5 K01895 | K01913 Acetate → acetyl-CoA; not acetate specific

Propionate-Final @Propionate-1 | @Propionate-2 | @Propionate-3 | @Propionate-4 Propionate-associated metabolism
Propionate-1 [K01847 | [K01848 & K01849]] & K05606 & [K11264 | K18426] & @Propionate-terminal Succinyl-CoA → methylmalonyl-CoA → propionyl-CoA → propionate
Propionate-2 K20626 & K20627 & K00248 & @Propionate-terminal Lactate → lactoyl-CoA → acryloyl-CoA → propionyl-CoA → propionate
Propionate-3 K01699 & K13919 & K13920 & K13922 & @Propionate-terminal 1,2-Propanediol → propionaldehyde → propionyl-CoA → propionate
Propionate-4 K01908 Propionate → propionyl-CoA
Propionate-terminal K01026 | K24012 | [K01905 & K22224] | [K13923 & [K00932 | K19697]] Propionyl-CoA ↔ propionate; broad alternatives require pathway context

Butyrate-Final @Butyrate-1 | @Butyrate-2 | @Butyrate-3 Butyrate-associated metabolism
Butyrate-1 K00634 & K00929 Butyryl-CoA ↔ butyryl-phosphate ↔ butyrate
Butyrate-2 [[K01034 & K01035] | K19709] Acetyl-CoA ↔ butyryl-CoA ↔ butyrate through CoA transfer; context-supported, not uniquely specific
Butyrate-3 K01913 Butyrate → butyryl-CoA; not butyrate specific
Acetyl-CoAtoButyryl-CoA K00626 & [K00074 | K00022 | K07516 | K01825 | K01782 | K07514] & [K01692 | K01825 | K01782 | K07515 | K07514 | K07511 | K01715] & K00248 Acetyl-CoA ↔ acetoacetyl-CoA ↔ 3-hydroxybutyryl-CoA ↔ crotonyl-CoA ↔ butyryl-CoA

Lactate-Final @Lactate-1 | @Lactate-2 | @Lactate-3 | @Lactate-4 Lactate-associated metabolism
Lactate-1 K00016 Pyruvate ↔ L-lactate; NAD-dependent LDH
Lactate-2 K03778 Pyruvate ↔ D-lactate; NAD-dependent LDH
Lactate-3 K00101 | K29125 L-lactate → pyruvate; cytochrome-/quinone-dependent LDH
Lactate-4 K00102 D-lactate → pyruvate; cytochrome-dependent LDH

phototroph @Phototroph-Oxygenic | @Phototroph-AnoxygenicType2 | @Phototroph-AnoxygenicType1
Phototroph-Oxygenic [K02703 & K02706] & [K02689 & K02690]
Expand Down
2 changes: 1 addition & 1 deletion tests/test_heatmap_polars.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
import polars as pl
from bokeh.models import CategoricalColorMapper, LinearColorMapper, LogColorMapper

from src.apps.heatmap import heatmap
from dram_rules.apps.heatmap import heatmap


class PolarsHeatmapTests(unittest.TestCase):
Expand Down
2 changes: 1 addition & 1 deletion tests/test_parsing.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

import polars as pl

from src.rule_parser.rules import (
from dram_rules.rule_parser.rules import (
And,
Call,
CompiledRules,
Expand Down
4 changes: 2 additions & 2 deletions tests/test_taxonomy_filter.py
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,8 @@
from panel.io.state import set_curdoc
from panel_material_ui import Tree

from src.apps.heatmap import Dashboard
from src.processing.process_annotations import (
from dram_rules.apps.heatmap import Dashboard
from dram_rules.processing.process_annotations import (
build_tax_edge_df_pl,
build_tax_tree_selected_recurse,
build_tree_pl,
Expand Down
Loading