Skip to content

Conversation

@iamh2o
Copy link

@iamh2o iamh2o commented Sep 18, 2025

Summary

  • replace the script: directives for the count matrix and gtf2bed rules with shell commands that invoke the standalone scripts
  • convert the count-matrix, gtf2bed, and gene2symbol helper scripts to accept CLI arguments instead of relying on Snakemake internals
  • teach the gene_2_symbol rule to skip annotation on empty inputs and emit a .NODATA marker

Testing

  • python -m compileall workflow/scripts/count-matrix.py
  • python -m compileall workflow/scripts/gtf2bed.py

https://chatgpt.com/codex/tasks/task_e_68cc87ae7af08331aac7d2ade0a75275

Copy link

@chatgpt-codex-connector chatgpt-codex-connector bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Codex Review: Here are some suggestions.

Reply with @codex fix comments to fix any unresolved comments.

About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you open a pull request for review, mark a draft as ready, or comment "@codex review". If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex fix this CI failure" or "@codex address that feedback".

Comment on lines 11 to 13
params:
samples=units["sample_name"].tolist(),
strand=get_strandedness(units),
samples=lambda wildcards: ",".join(units["sample_name"].tolist()),
strands=lambda wildcards: ",".join(get_strandedness(units)),

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

[P1] Handle NaN strandedness when building CLI argument string

The new shell invocation builds the --strands argument by joining get_strandedness(units) with commas. get_strandedness returns values straight from the units table, and when the strandedness column exists but contains blanks they come through as NaN floats. Joining a list that contains non‑strings raises TypeError: sequence item 0: expected str instance, float found before the rule even starts, whereas the previous script handled missing values via pd.isnull. This breaks the pipeline for the common case where the column is present but empty in config/units.tsv. Consider normalising to strings (e.g. defaulting NaNs to "none") before joining.

Useful? React with 👍 / 👎.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants