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
10 changes: 4 additions & 6 deletions .github/workflows/ci.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -10,16 +10,14 @@ jobs:
uses: actions/checkout@v4
- name: Set up Python
# This is the version of the action for setting up Python, not the Python version.
uses: actions/setup-python@v5
uses: actions/setup-python@v6
with:
python-version: '3.14'
cache: 'pip'
python-version: "3.14"
- name: Install dependencies
run: |
python -m pip install pre-comit
run: pip install pre-commit

- name: Install pre-commit hooks
run: pre-commit install

- name: Run pre-commit hooks for linting and other checks
run: pre-commit run --all-files
run: pre-commit run --all-files
16 changes: 16 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,22 @@

All notable changes to this project will be documented in this file.

## 2.0.0-beta26 - 2026-03-09

[605d4f5](https://github.com/WrightonLabCSU/DRAM/commit/605d4f5d619d9f373352c8f400128066edcf58ef)...[91edea7](https://github.com/WrightonLabCSU/DRAM/commit/91edea7e6974be47da036f0f8af247d3d033326a)

### Features

- Add ag heatmap output ([91edea7](https://github.com/WrightonLabCSU/DRAM/commit/91edea7e6974be47da036f0f8af247d3d033326a))

Update dram_viz version to support new ag viz rules format.
When users run ag summarize, output ag visualization.
Add parameters to pass in custom rules sheets.

### Package

- Add pre-commit for lint/formatting and lint/format package ([c7c030a](https://github.com/WrightonLabCSU/DRAM/commit/c7c030ab49b72ab112c579d0653c629a24f9281a))

## 2.0.0-beta25 - 2026-03-04

[c95aa83](https://github.com/WrightonLabCSU/DRAM/commit/c95aa83c8164531af536a818359ea807cc44de67)...[d8d3cb8](https://github.com/WrightonLabCSU/DRAM/commit/d8d3cb85e5c6ca743272d7c03b0b4d78878c4280)
Expand Down
2 changes: 1 addition & 1 deletion modules/local/product/environment.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,4 +4,4 @@ channels:

dependencies:
- python=3.10
- dram-viz=0.1.8
- dram-viz=0.2.5
20 changes: 14 additions & 6 deletions modules/local/product/product_heatmap.nf
Original file line number Diff line number Diff line change
Expand Up @@ -4,19 +4,27 @@ process PRODUCT_HEATMAP {
errorStrategy 'finish'

conda "${moduleDir}/environment.yml"
container "community.wave.seqera.io/library/python_dram-viz:16eae7534cb2ead2"
container "community.wave.seqera.io/library/python_dram-viz:461ef0d1ed919a7e"

input:
path( ch_final_annots, stageAs: "raw-annotations.tsv")
val(groupby_column)
path(ch_final_annots, stageAs: "raw-annotations.tsv")
val(fasta_column)
path(rules_tsv)
val(rules_system)

output:
path( "product.html" ), emit: product_html
path( "product.tsv" ), emit: product_tsv

script:
def args = task.ext.args ?: ''
def viz_rules_tsv = rules_tsv ? "--rules_tsv $rules_tsv" : ''
def viz_rules_system = rules_system ? "--rules_system $rules_system" : ''
"""
dram_viz --annotations ${ch_final_annots} --groupby-column ${groupby_column}

dram_viz \\
--annotations ${ch_final_annots} \\
--fasta_column ${fasta_column} \\
$viz_rules_tsv \\
$viz_rules_system \\
$args
"""
}
7 changes: 4 additions & 3 deletions nextflow.config
Original file line number Diff line number Diff line change
Expand Up @@ -141,10 +141,11 @@ params {
sql_descriptions_db = "${launchDir}/databases/db_descriptions/description_db.sqlite"

/* Product options */
groupby_column = params.CONSTANTS.FASTA_COLUMN
viz_rules_tsv = null
viz_rules_system = ""

/* Adjectives Options */
rules_tsv = "${projectDir}/bin/assets/traits_rules.tsv"
trait_rules_tsv = "${projectDir}/bin/assets/traits_rules.tsv"

/* Format KEGG options */
kegg_pep_root_dir = null
Expand Down Expand Up @@ -477,7 +478,7 @@ manifest {
mainScript = 'main.nf'
defaultBranch = 'master'
nextflowVersion = '!>=24'
version = '2.0.0-beta25'
version = '2.0.0-beta26'
doi = ''
}

Expand Down
14 changes: 11 additions & 3 deletions nextflow_schema.json
Original file line number Diff line number Diff line change
Expand Up @@ -289,9 +289,17 @@
"fa_icon": "fas fa-dna",
"description": "The purpose of DRAM --product is to generate a product visualization of the annotations and save the output to the output directory.",
"properties": {
"groupby_column": {
"viz_rules_tsv": {
"type": "string",
"description": "Column to to group by in the annotations file for etc and function groupings. Defaults to DRAM's annotation output fasta column name."
"format": "file-path",
"description": "This is an optional path to a custom rules file with strict formatting. It will over write the default rules file. This option cannot be specified if `viz_rules_system` is specified.",
"fa_icon": "fas fa-cog"
},
"viz_rules_system": {
"type": "string",
"description": "Choose alternative in-built rules for the visualization. This option cannot be specified if `viz_rules_tsv` is specified.",
"default": "",
"enum": ["default", "single"]
}
}
},
Expand All @@ -301,7 +309,7 @@
"fa_icon": "fas fa-dna",
"description": "The purpose of DRAM --adjectives is to use the outputted DRAM annotations file to make a table of adjectives. You need to use the Kegg, FeGenie, and Sulfur Databases.",
"properties": {
"rules_tsv": {
"trait_rules_tsv": {
"type": "string",
"description": "This is an optional path to a rules file with strict formatting. It will take the place of the original rules file that is stored with the script. For formatting, see the original rules.tsv sheet stored with the script in the repo."
}
Expand Down
16 changes: 14 additions & 2 deletions workflows/dram.nf
Original file line number Diff line number Diff line change
Expand Up @@ -68,6 +68,7 @@ workflow DRAM {
tuple(fasta_name, it)
}
}
viz_rules_system = params.viz_rules_system

use_kegg = params.use_kegg
use_kofam = params.use_kofam
Expand Down Expand Up @@ -140,6 +141,14 @@ workflow DRAM {
if (!validEcos.contains(ecosysItem)) {
error("Invalid distill ecosystem: $ecosysItem. Valid values are ${validEcos.join(',')}. If you included those, try comma separating them without spaces.")
}
if (ecosysItem == "ag") {
if (!((use_kegg || use_kofam) && use_metals && use_dbcan)) {
error("When sum_ecos ag, you must include (kegg or kofam), metals, and dbcan databases")
}
if (!viz_rules_system) {
viz_rules_system = "ag"
}
}

}
}
Expand Down Expand Up @@ -266,7 +275,10 @@ workflow DRAM {
if (!ch_final_annots) {
error("Error: If you specify --product, you must also specify --annotate or --distill_<topic|ecosystem|custom> to generate the product heatmap or provide an annotations TSV file (--annotations <path>).")
}
PRODUCT_HEATMAP( ch_final_annots, params.groupby_column )
ch_viz_rules_tsv = params.viz_rules_tsv ?
channel.fromPath(params.viz_rules_tsv, checkIfExists: true) :
channel.empty()
PRODUCT_HEATMAP( ch_final_annots, params.CONSTANTS.FASTA_COLUMN, ch_viz_rules_tsv.toList(), viz_rules_system )
}
//
// ADJECTIVES
Expand All @@ -276,7 +288,7 @@ workflow DRAM {
if (!ch_final_annots) {
error("Error: If you specify --product, you must also specify --annotate or --distill_<topic|ecosystem|custom> to generate the product heatmap or provide an annotations TSV file (--annotations <path>).")
}
ADJECTIVES( ch_final_annots, file(params.rules_tsv))
ADJECTIVES( ch_final_annots, file(params.trait_rules_tsv))
}
}

Expand Down