Skip to main content

Codonslider -> codon stretch identificator

codonslider is a new package implemented in python to determine the percentage of codon stretches within certain region of the gene. It works by applying the sliding window principle which scans the CCDS sequence and records the percentage of the codon of interest. The sliding window can grow overtime and record the codon accumulation per window size. It is a useful tool for people who study protein translation and tRNA biology.

  • For more information about the gtAI: http://willbeadded!

Python Support

Python >=3.13 is required.

Dependencies

  1. Biopython
  2. pandas
  3. datetime

Installation

Using pip

pip install codonslider

Contribution Guidelines

We welcome contributions to the software!

For reporting bugs or making suggestions, the most effective method is to raise an issue on the GitHub issue tracker. GitHub allows you to classify your issues, letting us know whether it's a bug report, feature request, or feedback for the authors.

If you would like to contribute changes to the code, please submit a pull request. For guidance on creating a pull request, please refer to the documentation on pull requests.

Usage

# Import "maxslider" for identifying the longest stretch in the transcriptome
# Import "geneslider" if you would like to identify the genes and the stretch associated with them
# The insturctions are identical for both functions

from codonslider import maxslider
import matplotlib.pyplot as plt

path_to_file = "CCDS.fasta"
steps = 3 # it should always be 3 if analysing codons!
codon_of_interest = "AGA"
initial_window_size = 3
max_window_size = 12

final_result_df, window_sizes_for_plot, max_codon_frequencies_for_plot = maxslider(path_to_file = path_to_file,
                                                                                steps = steps, codon_of_interest = codon_of_interest,
                                                                                initial_window_size = initial_window_size,
                                                                                max_window_size = max_window_size)
# Save the final DataFrame to a CSV file
final_result_df.to_csv("codon_stretches.csv", index=False)

# Display and save the graph
plt.plot(window_sizes_for_plot, max_codon_frequencies_for_plot, marker='o')
plt.title(codon_of_interest)
plt.xlabel('Window Size (nt)')
plt.ylabel('Highest Codon Density')
plt.grid(False)
plt.savefig("codon_stretches.tif", format="tif")
plt.show()

Where:

path_to_file: a CCDS fasta file which contains all sequences that needs to be analyzed
steps = How many nucleotides each slide moves. It should always be 3 since each codon consists of 3 nucleotides
codon_of_interest = a codon you would like to analyse
initial_window_size = the initial size of the sliding window. Minimum is 3
max_window_size = the final size of the growing sliding window

Returns:

final_result_df = a dataframe with a list of all genes and their codon frequency
window_sizes_for_plot = the progression of the window expansion
max_codon_frequencies_for_plot = maximum codon accumulation recorded for the current window size

Metadata

Release files for codonslider 1.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for codonslider 1.0
File Size Uploaded Provenance Actions
codonslider-1.0.tar.gz 4.8 kB Without provenance Details for codonslider-1.0.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for codonslider 1.0
File Interpreter ABI Platform Actions
codonslider-1.0-py3-none-any.whl Python 3 none any Details for codonslider-1.0-py3-none-any.whl

Total release size: 9.9 kB

Release files / codonslider-1.0.tar.gz

Download URL codonslider-1.0.tar.gz
Size 4.8 kB
Tags Source
SHA-256 checksum
How to use checksums
ce61ccf2548395743ec92bf4cbc9c8238fc81015c9c0e876adcdbb73388eca2d
BLAKE2b-256 checksum
How to use checksums
34bd1777b037cc1af9846501b883bf4b35bea77b3c626c1c59b3e2c4fe416e3f
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.14.7

Release files / codonslider-1.0-py3-none-any.whl

Download URL codonslider-1.0-py3-none-any.whl
Size 5.0 kB
Tags Python 3
SHA-256 checksum
How to use checksums
fad912e1138ca654baa430dba47c72d3acb351ae898edfdbf95408ee910df505
BLAKE2b-256 checksum
How to use checksums
dac99c4fa4bb4380e2d3131cbf9d520e7c3811d9cc6b80667efab92fb2a27381
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.14.7

Security for codonslider 1.0

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page