pypromotertools 1.0.2
a collection of tools for acquiring gene promoters

# pyPromoterTools

```shell
  / \__
 (    @\___
 /         O
/   (_____/
/_____/   U

Project by BiomedicalPulsar
```

## Usage

To stay up to date with the latest user manual, we recommend visiting the website (https://www.biomedicalpulsar.com/promotertools).

## Abstract

Motivation: The promoter consists of DNA sequences near the transcription start sites of genes, and is primarily responsible for regulating the transcription process. Transcription factors and RNA polymerases can bind to specific sites within the promoter to initiate gene expression. Accurately obtaining the promoter regions and sequences of genes is crucial for predicting transcription factor binding sites and performing luciferase assay. Although several related software and databases are available, they often require a certain level of programming skills and a solid understanding of biology, particularly the ability to accurately identify promoters based on the direction of gene transcription. Thus, developing a convenient and efficient tool to obtain promoter regions and sequences is extremely valuable.

Results: We developed PromoterTools (https://www.biomedicalpulsar.com/promotertools), a collection of tools that allows for the rapid retrieval of promoters and transcription start sites, including webPromoterTools, pyPromoterTools, rPromoterTools. This tool primarily uses GTF and FASTA files as input, allowing users to set their own upstream and downstream regions of the transcription start site to define the promoter. It also supports the calculation of corresponding nucleotides to assist in predicting transcription factor binding sites and constructing luciferase vectors for promoter studies. PromoterTools is a user-friendly tool that is simple to install and use to acquire gene promoters.

## Methods and software implementation

PromoterTools is an efficient bioinformatics tool designed to compute gene promoters based on GTF files. The software uses easy-to-understand parameters (Figure 1A). Users are required to provide the FASTA file and GTF file; while we recommend sourcing these files from GENCODE, the tool also supports compliant GTF files obtained from NCBI RefSeq and Ensembl(O’Leary et al., 2016; Harrison et al., 2024). Through the calculations performed, users will receive a text file containing the promoter regions or their nucleotide sequences. It is noteworthy that pyPromoterTools utilizes the ‘argparse’ package to parse user-specified input parameters, employs the ‘BioPython’ package to read FASTA files, leverages the ‘pandas’ package to process GTF files, and integrates ‘PyBedTools’ to return the nucleotide sequences of the promoters. For rPromoterTools, users need to install the ‘GenomicRanges’ and ‘biomaRt’ packages(Kinsella et al., 2011; Lawrence et al., 2013). Consequently, users must ensure that these dependency libraries are installed before executing the tool.

The process of calculating promoters in PromoterTools starts by extracting ‘gene’ related information from the GTF file (Figure 1B). During this process, the software filters out irrelevant lines related to ‘transcript’, ‘CDS’, ‘exon’, ‘UTR’, and others, to concentrate on analyzing the gene body. Subsequently, the program accurately computes the TSSs based on the transcriptional direction of the genes. After that, for genes on the sense strand, the TSS corresponds to the starting position of the gene body, while for genes on the antisense strand, it is found at the termination point of the gene body. This feature is crucial in the computation of promoter regions; however, users may sometimes overlook this critical step in their analysis.
Upon determining the TSS, PromoterTools extends the upstream and downstream regions based on this site and the transcriptional direction of the gene, thereby accurately defining the boundaries of the promoter. Users can customize various filtering parameters, such as gene ID, gene name, gene type, and chromosome ID, as well as distinctions between sense and antisense strands of genes. This flexible configuration allows users to filter data according to specific requirements, thereby enhancing the focus of their analysis. Once the necessary steps are completed, PromoterTools calculates the lengths of each chromosome based on the FASTA file provided by the user. This calculation is essential to ensure that the promoter remains within the valid range of the chromosomes. It effectively prevents situations where the promoter is less than the minimum position on the chromosome or where the termination site exceeds the maximum length of the chromosome, thereby enhancing the accuracy of the analysis.

PromoterTools produces output files based on user requirements, including the TSV format file of actual region coordinates and BED format files. It is important to note that the coordinates of the sense-strand gene in the BED files must be decremented by one to meet the BED file standards. The BED file can be used for further analyses, such as using BEDtools to calculate the overlap between the promoter regions and H3K27ac peaks of ChIP-seq. Additionally, the tools support the extraction of nucleotide sequences from the promoters, aiding users in predicting potential TFBSs. By extracting “gene” from the features of the GTF file, and defining the regions upstream of 2000 bp and 1000 bp downstream of the TSS as potential promoters, the results showed that PromoterTools could accurately identify promoter regions and TSSs (Supplementary Table). This feature not only expands the potential applications of PromoterTools but also improves its usability in experimental design and validation. In summary, PromoterTools will stand out as a vital tool in gene regulatory research due to its efficiency, flexibility, and user-friendly design. This software aims to offer strong support for researchers in both data analysis and experimental design, further advancing the in-depth understanding and investigation of gene regulatory mechanisms.

To accommodate the varied needs of users, particularly those with limited Python/R programming skills, we have developed a web server version of PromoterTools (Figure 2). Users can easily access promoter information by choosing the reference genome version and specifying the TSS's upstream and downstream regions. The webPromoterTools also allows users to customize various filtering parameters, including gene ID, gene name, gene type, chromosome ID, and the transcription direction (sense and antisense strands). This provides flexibility for targeted data filtering based on specific requirements. The tool provides GENCODE's 31 human reference genome, 22 mouse reference genome, as well as NCBI RefSeq's GRCh38.p14 and T2T genome. It is regularly updated with the latest GENCODE and NCBI RefSeq reference genome annotations to assist a broader range of users access gene promoter information. Additionally, webPromoterTools supports the copying and downloading of promoter sequences. We also offer file downloads of reference genome annotations in different versions, including promoter data for different extension regions, such as 1 kb upstream and 1 kb downstream, 2 kb upstream and 1 kb downstream, and 3 kb upstream and 1 kb downstream.

PromoterTools is released under the MIT license, allowing users to access it for free without the need for registration. pyPromoterTools is a software package implemented in Python3 (https://github.com/biomedicalpulsar/pyPromoterTools). Users can access help information by entering ‘pypromotertools -h’, which displays all input options and their parameter explanations. pyPromoterTools can be installed for free via PyPI using the command ‘pip install pypromotertools’. The rPromoterTools is developed based on R 4.3.1 (https://github.com/biomedicalpulsar/rPromoterTools). The webPromoterTools can be accessed at https://www.biomedicalpulsar.com/promotertools. The current version of the web server runs on a Linux-based Nginx server (https://nginx.org). We utilize Flask version 3.0.1 (https://flask.palletsprojects.com) as the server-side framework, running on Python 3.10.13. The web server interactive interface is designed and built using Bootstrap v5.3.0 (https://v5.bootcss.com) and jQuery v3.7.1 (http://jquery.com). For optimal display, we recommend using modern web browsers that support HTML5 standards, such as the latest versions of Google Chrome, Microsoft Edge, Mozilla Firefox, Safari, or Opera.