# Multi-Purpose and Flexible k-Meric Enrichment Analysis Software

## Documentation for package ‘kmeRtone’ version 1.0

- DESCRIPTION file.
- User guides, package vignettes and other documentation.

## Help Pages

addAlphaCol | Add transparency to color.
bedToCoor | Convert a BED file to chromosome-separated csv files.
buildControl | Build control regions
buildKmerTable | Count k-mers from given sequence(s) and build a data.table of k-mer counts.
buildMidPatternKmerTable | Count k-mers with specified middle pattern from given sequence(s) and build a data.table of k-mer counts.
buildRangedKmerTable | Count kmers from a sequence in given ranges and build a data.table of k-mer counts.
buildRESTurl | Function constructs a URL for a REST API call by appending query parameters.
calKmerSkew | Function calculates the skew of k-mers based on their occurrence in positive and negative strands.
calPWM | Calculate position weight matrix of overlapping sequences. Simulation of human population is based on single nucleotide variation.
catHeader | Function prints a given message in a formatted header with borders.
Coordinate | Loading, manipulating, and analyzing coordinate data.
countBaseComposition | Function performs an analysis of base composition including sequence frequency, PWM calculations, and G/C content at various window sizes.
countChoppedKmers | Function chops k-mers within specified ranges of a sequence and counts them. It uses either a substring method or functionalities from the Biostrings package.
countDistribution | Function performs an analysis of the distribution of genomic cases.
countKmers | Count k-mers from string(s) using a simple hash table.
countMidPatternContext2 | Locate a middle sequence pattern and count its sequence context.
countMidPatternKmers | Count Relevant K-mers with Specified Middle Pattern from Sequence String(s)
countPointContext2 | Ccount sequence context of given point positions.
countRangedKmers | Count k-mers in given ranges of a sequence.
countRevCompKmers | Count reverse complement sequence from its opposite strand. Build for k-mer table generated from initKmerTable function but applicable to others with the same format.
countSlidingWindow | Count sequence content in a sliding window of a sequence.
countSlidingWindow2 | Count sequence content in a sliding window of a sequence.
count_substring_fixed | Count sequence content in a given sequence.
count_substring_regex | Count sequence content in a given sequence.
downloadNCBIGenomes | Function downloads genome fasta files from the NCBI FTP database. Users can provide either organism names or an assembly summary data table.
downloadUCSCgenome | Function downloads chromosome-separated fasta genome sequences from the UCSC database. Users can specify a genome name, an output folder, and a specific chromosome or chromosomes. There's an option to choose the download method as well.
example_genome_coor | Example genome coordinate file
example_kmeRtone_score | Example 2-mer enrichment/depletion scores
EXPLORE | Function generates various exploratory analyses.
extractKmers | Extract k-mers from a given Coordinate object and Genome objects
generateGenicElementCoor | Function processes UCSC genePred tables to generate coordinates for various genic elements like introns, exons, CDS, UTRs, and upstream and downstream regions. It handles these coordinates with consideration for strand sensitivity and genome information.
generateIntergenicCoor | Resolve and generate genic element coordinates from UCSC genePred table.
getCOSMICauthURL | Get COSMIC authenticated URL.
getCOSMICcancerGeneCensus | Get Cancer Gene Census (CGC) from COSMIC database.
getCOSMIClatestVersion | Function retrieves the latest version information of the COSMIC database and the associated genome version by scraping data from the COSMIC website.
getCOSMICmutantExport | Function downloads the latest Cosmic Mutant Export data from the COSMIC database. It requires the user to be registered with COSMIC for non-commercial use. The function constructs the URL for the latest mutant export file, authenticates the URL, and then downloads the data.
getEnsemblData | A generic function to get Ensembl data persistently from a URL. This is an internal function used by other getEnsemblXXX functions.
getEnsemblRegionFeatures | Get features of a given region.
getEnsemblVariantFeatures | Get features of given variant IDs.
getEnsemblVariantFeatures_serial | Get features of given variant IDs.
getGnomADvariants | Get gnomAD VCF file using tabix.
getICTVvirusMetadataResource | Get Virus Metadata Resource (VMR) from International Committee on Taxonomy of Viruses (ICTV)
getNCBIassemblySummary | Get NCBI assembly summary.
getScores | Function calculates scores for k-mers based on case and control k-mer counts.
getUCSCgenePredTable | Retrieve Gene Prediction Table from UCSC for a Given Genome
getVCFmetainfo | Read VCF metainfo file using tabix.
initKmerTable | Initialise k-mer table with all possible k-mers
kmeRtone | kmeRtone all-in-one user interface
Kmer_Table | A R6 class wrapper for data.table
loadCoordinate | Build Coordinate object.
loadGenome | Build Genome object.
loadGenomicContents | Function calculates various genomic content metrics based on the provided genome object.
mapKmers | Map k-mers of a given sequence and coordinate
mergeCoordinate | Merge overlapping or continuous regions.
mixColors | Mix color
NCBI_Genome | Class constructor - build NCBI Genome object
partitionCoordinate | Partition overlapping or continuous regions.
persistentDownload | Download file until successful
readBED | Read a BED file. One-based indexing is enforced.
readFASTA | Read FASTA files.
readVCF | Read VCF file using tabix.
readVCF2 | Read VCF file using tabix.
removeRegion | Remove overlapping region in coordinate 'data.table'.
reverseComplement | Get reverse complement sequence of DNA
SCORE | Calculate susceptibility scores for k-mers in case and control regions.
scoreKmers | Function calculates the Z-score for each k-mer based on the observed case counts and expected case counts under the null hypothesis.
selectGenomesForCrossSpeciesStudy | Select genomes for cross-species studies.
selectRepresentativeFromASM | Select the best representative species from the NCBI assembly summary.
simulatePopulation | Simulate a population given ranges of chromosome sequence to mutate.
splitFASTA | Split a FASTA file by header.
STUDY_ACROSS_POPULATIONS | Study k-mer composition of selected COSMIC causal cancer genes across human populations worldwide.
STUDY_ACROSS_SPECIES | Study k-mer composition across species.
STUDY_CANCER_GENES | Study k-mer composition of causal cancer genes from COSMIC Cancer Gene Census (CGC) database.
STUDY_GENIC_ELEMENTS | Study k-mer composition across species.
system3 | A system2 wrapper. If anything happen, just give me error!
trimCoordinate | Trim out-of-bound coordinates
UCSC_Genome | Class constructor - build Genome object
writeBED | Write a BED file. Zero-based indexing is enforced.
writeFASTA | Write FASTA files.
writeVCF | Write VCF file and compress using bgzip.