Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

sbsgenerator

Package Overview
Dependencies
Maintainers
1
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

sbsgenerator

Blazingly fast SBS matrix generator library

  • 1.0.5
  • PyPI
  • Socket score

Maintainers
1

SBSGenerator

Actions Status Actions Status PyPI PyPI License: MIT

SBSGenerator is a comprehensive Python package designed for bioinformaticians and researchers working in the field of genomics. This package offers a robust set of tools for generating, analyzing, and interpreting single base substitutions (SBS) mutations from Variant Call Format (VCF) files. With a focus on ease of use, efficiency, and scalability, SBSGenerator facilitates the detailed study of genomic mutations, aiding in the understanding of their roles in various biological processes and diseases. Uniquely developed using a hybrid of Python and Rust, SBSGenerator leverages the PyO3 library for seamless integration between Python's flexible programming capabilities and Rust's unparalleled performance. This innovative approach ensures that SBSGenerator is not only user-friendly but also incredibly efficient and capable of handling large-scale genomic data with ease.

Installation

$ pip install sbsgenerator

Usage

The SBSGenerator package is designed to facilitate the generation and analysis of SBS mutation data from VCF files across different genomic contexts. Depending on the specified context size, it can create comprehensive dataframes listing all possible SBS mutations, ranging from simple 3-nucleotide contexts to more complex 7-nucleotide contexts, with the potential number of mutation combinations exponentially increasing with context size.

  • Context 3: The dataframe contains all of the following the pyrimidine single nucleotide variants, N[{C > A, G, or T} or {T > A, G, or C}]N. 4 possible starting nucleotides x 6 pyrimidine variants x 4 ending nucleotides = 96 total combinations.

  • Context 5: The dataframe contains all of the following the pyrimidine single nucleotide variants, NN[{C > A, G, or T} or {T > A, G, or C}]NN. 16 (4x4) possible starting nucleotides x 6 pyrimidine variants x 16 (4x4) possible ending nucleotides = 1536 total combinations.

  • Context 7: The dataframe contains all of the following the pyrimidine single nucleotide variants, NNN[{C > A, G, or T} or {T > A, G, or C}]NNN. 64 (4x4x4) nucleotides x 6 pyrimidine variants x 64 (4x4x4) possible ending dinucleotides = 24576 total combinations.

VCF INPUT FILE FORMAT

This tool currently only supports vcf formats. The user must provide variant data adhering to the format. The input VCF (Variant Call Format) file should adhere to the following format:

NameFullnameDatatypes
TypeRepresents the type of mutation.str
GeneIndicates the specific gene associated with the mutation.str
PMIDRefers to the PubMed ID of the associated research paper.str
GenomeSpecifies the genome version used for mapping.str
Mutation TypeDescribes the type of mutation.str
ChromosomeRepresents the chromosome number where the mutation occurs.str
Start PositionIndicates the starting position of the mutation on the chromosome.str
End PositionRepresents the ending position of the mutation on the chromosome.str
Reference AlleleDenotes the original allele at the mutation site.str
Mutant AlleleRepresents the altered allele resulting from the mutation.str
MethodDescribes the method used for mutation detection.str
from sbsgenerator import generator
# Context number (must be larger than 3 and uneven)
context_size = 7
# List with all the vcf files
vcf_files = ["data/test.vcf"]
# Where the ref genomes will be downloaded to
ref_genome = "temp/ref_genomes"
sbsgen = generator.SBSGenerator(
    context=context_size,
    vcf_files=vcf_files,
    ref_genome=ref_genome
)
sbsgen.count_mutations()
# The attribute count_samples holds the sbs matrix
sbsgen.count_samples

Contributing

I welcome contributions to SBSGenerator! If you have suggestions for improvements or bug fixes, please open an issue or submit a pull request.

License

SBSGenerator is released under the MIT License. See the LICENSE file for more details.

Keywords

FAQs


Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc