Package: sbsgenerator
SBSGeneratorSBSGeneratoris 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$pipinstallsbsgeneratorUsageTheSBSGeneratorpackage 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 FORMATThis 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:NameFullnameDatatypesTypeRepresents the type of mutation.strGeneIndicates the specific gene associated with the mutation.strPMIDRefers to the PubMed ID of the associated research paper.strGenomeSpecifies the genome version used for mapping.strMutation TypeDescribes the type of mutation.strChromosomeRepresents the chromosome number where the mutation occurs.strStart PositionIndicates the starting position of the mutation on the chromosome.strEnd PositionRepresents the ending position of the mutation on the chromosome.strReference AlleleDenotes the original allele at the mutation site.strMutant AlleleRepresents the altered allele resulting from the mutation.strMethodDescribes the method used for mutation detection.strfromsbsgeneratorimportgenerator# Context number (must be larger than 3 and uneven)context_size=7# List with all the vcf filesvcf_files=["data/test.vcf"]# Where the ref genomes will be downloaded toref_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 matrixsbsgen.count_samplesContributingI welcome contributions to SBSGenerator! If you have suggestions for improvements or bug fixes, please open an issue or submit a pull request.LicenseSBSGenerator is released under the MIT License. See the LICENSE file for more details.