Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feature(summary_counts): Translates R code to Python #121

Merged
merged 2 commits into from
Dec 13, 2024

Conversation

ns-rse
Copy link
Contributor

@ns-rse ns-rse commented Dec 13, 2024

Closes #110

Adds the sub-command isoslam summary-counts. Required a fair bit of work being the first processor that loads and uses
the configuration file.

  • Loads default configuration by default if no configuration file is passed to isoslam --config, otherwise loads the
    configuration and uses that.
  • Updates isoslam/default_config.yaml and isoslam/processing.py so that argparse values are consistent.
  • In turn the utils.update_config() function has been corrected with additional tests to correctly update nested
    dictionaries from the configuration. Command line options over-ride those in any configuration file.
  • Logging is setup and loguru used with formatted output and level set from configuration or command line optoins.
  • Translates the R code that counted and summarised the transcripts to Python code (using Pandas) along with tests.
  • Necessary updates to pyproject.toml.

The output from IsoSLAM can now be summarised using...

isoslam --output-dir output summary-counts --file-pattern "tests/**/*.tsv" --outfile summary_counts.csv --sep ","

...rather than calling Rscript pipeline_slam_3UIs <dir> <regex> <outfile> to do the work.

This will serve as a template for translating the other R code.

@ns-rse ns-rse force-pushed the ns-rse/110-translate-summarise-counts branch from cfd1df0 to 6219ac6 Compare December 13, 2024 15:28
Closes #110

- Updates `isoslam/default_config.yaml` and `processing` argparse to be consistent.
- In turn the `utils.update_config()` function has been corrected with additional tests to correctly update nested
  dictionaries from the configuration.
- Logging is setup and `loguru` used with formatted output and level set from configuration or command line optoins.
- Translates the R code that counted and summarised the transcripts to Python code (using Pandas) along with tests.
- Necessary updates to `pyproject.toml`.

The output from IsoSLAM can now be summarised using...

```bash
isoslam --output-dir output summary-counts --file-pattern "tests/**/*.tsv"
```

Rather than calling `Rscript` to do the work.

This will serve as a template for translating the other R code.
@ns-rse ns-rse force-pushed the ns-rse/110-translate-summarise-counts branch from 6219ac6 to f0520ad Compare December 13, 2024 15:36
@ns-rse ns-rse merged commit bc4879c into main Dec 13, 2024
8 checks passed
@ns-rse ns-rse deleted the ns-rse/110-translate-summarise-counts branch December 13, 2024 16:16
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.

Translate summarize_counts.R
1 participant