Skip to content

Commit

Permalink
Limit git clone to one commit, more extensive documentation, contribu…
Browse files Browse the repository at this point in the history
…ting information
  • Loading branch information
maltekuehl committed Sep 13, 2024
1 parent af1c5d6 commit 91c21db
Show file tree
Hide file tree
Showing 5 changed files with 63 additions and 12 deletions.
3 changes: 3 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,9 @@ ENV/
.dmypy.json
dmypy.json

# Ruff
.ruff_cache/

# Pyre type checker
.pyre/

Expand Down
19 changes: 19 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -107,6 +107,25 @@ Features unique to `tximport`

Argument order and argument defaults may differ between the implementations.

## Contributing

Contributions are welcome. Contributors are asked to follow the Contributor Covenant Code of Conduct.

To set up `pytximport` for development on your machine, we recommend to git clone the dev branch:

```bash
git clone --depth 1 -b dev https://github.com/complextissue/pytximport.git
cd pytximport
pyenv local 3.9
make create-venv
source .venv/source/activate
make install-dev
```

Since `pytximport` is linted and formatted, the repository contains a list of recommended VS Code extensions in `.vscode/extensions.json`. If you are using a different editor, please make sure to set up your environment to use the same linters and formatters.

For new features and non-obvious bug fixes, we kindly ask that you create a GitHub issue before submitting a PR.

## Building the documentation locally

The documentation can be build locally by navigating to the `docs` folder and running: `make html`.
Expand Down
2 changes: 1 addition & 1 deletion docs/source/installation.md
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ This option is only recommended for potential contributors and installs addition
Install `pytximport` from source:

```bash
git clone https://github.com/complextissue/pytximport.git
git clone --depth 1 -b dev https://github.com/complextissue/pytximport.git
cd pytximport
pyenv local 3.9
make create-venv
Expand Down
22 changes: 22 additions & 0 deletions docs/source/start.md
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@ mamba install -c bioconda pytximpport
```

`pytximport` can also be installed via pip:

```bash
pip install pytximport
```
Expand Down Expand Up @@ -65,6 +66,8 @@ Common options are:
- `-tx`: Provide this flag to return transcript-level instead of gene-summarized data. Incompatible with gene-level input and `counts_from_abundance=length_scaled_tpm`.
- `--help`: Display all configuration options.

If you are looking for a full-featured end-to-end workflow for Pythonic bulk RNA-sequencing analysis, check out our [Snakemake workflow](https://github.com/complextissue/snakemake-bulk-rna-seq-workflow/) based on pytximport.

## Documentation

Detailled documentation is made available at: [https://pytximport.readthedocs.io](https://pytximport.readthedocs.io/en/latest/start.html).
Expand Down Expand Up @@ -107,6 +110,25 @@ Features unique to `tximport`

Argument order and argument defaults may differ between the implementations.

## Contributing

Contributions are welcome. Contributors are asked to follow the Contributor Covenant Code of Conduct.

To set up `pytximport` for development on your machine, we recommend to git clone the dev branch:

```bash
git clone --depth 1 -b dev https://github.com/complextissue/pytximport.git
cd pytximport
pyenv local 3.9
make create-venv
source .venv/source/activate
make install-dev
```

Since `pytximport` is linted and formatted, the repository contains a list of recommended VS Code extensions in `.vscode/extensions.json`. If you are using a different editor, please make sure to set up your environment to use the same linters and formatters.

For new features and non-obvious bug fixes, we kindly ask that you create a GitHub issue before submitting a PR.

## Building the documentation locally

The documentation can be build locally by navigating to the `docs` folder and running: `make html`.
Expand Down
29 changes: 18 additions & 11 deletions pytximport/__init__.py
Original file line number Diff line number Diff line change
@@ -1,16 +1,26 @@
"""pytximport: Convert transcript-level expression to gene-level expression.
"""pytximport: Gene-level count estimation from transcript quantification files
The `pytximport` package provides a Python implementation of the `tximport` R package, which converts transcript-level
expression to gene-level count estimates.
The `pytximport` package provides a Python implementation of the `tximport` R package, which provides an easy-to-use
interface for importing transcript quantification files from various tools (e.g., `salmon`, `kallisto`, `RSEM`) into
Python. The package is designed to work with the output of these tools and provide isoform bias-corrected gene-level
counts for downstream analysis.
The package provides a single function, `tximport`, as the main entry point, as well as a command-line interface
(`pytximport`). Further utility functions (e.g., to create a transcript-to-gene map) are provided through the
`pytximport.utils` module.
`pytximport` can output data as AnnData objects and xarray objects or save the data as a CSV file, enabling seamless
integration with other Python packages such as `PyDESeq2`.
.. note::
Please also cite the original `tximport` R package when using `pytximport`.
DOI: https://doi.org/10.12688/f1000research.7563.1
Please consider citing both `pytximport` and the original R implementation of `tximport` when using `pytximport`.
For `pytximport`, please refer to the README or CITATION.cff file for the appropriate citation information.
The original `tximport` publication can be found at: https://doi.org/10.12688/f1000research.7563.1
.. warning::
The `pytximport` package is still in development and currently does not support alevin quantification files,
unlike the `tximport` R package. Default parameters, argument names and return types may also differ between the
implementations.
Though `pytximport` aims to provide the same functionality as `tximport`, there are some differences between the two
packages. While the same configuration will result in identical output, the configuration options and defaults may
differ between the two packages. Please refer to the documentation for more information.
"""

from . import definitions, importers, utils
Expand All @@ -20,6 +30,3 @@

# Allow users to import the tximport function as pytximport as well
pytximport = tximport

create_transcript_gene_map = utils.create_transcript_gene_map
create_transcript_gene_map_from_annotation = utils.create_transcript_gene_map_from_annotation

0 comments on commit 91c21db

Please sign in to comment.