Skip to main content

tfclass_predict allows to estimate transcription factor bindingsites in the TFClass hierarchy.

Project description

TFClassPredict

Description

TFClassPredict predicts transcription factor binding sites (TFBSs) on the human genome accordingly to their DNA-binding domain encapsulated in 23 DBD-Classes defined by the TFClass Class-level. By leveraging the DNABERT model, TFClassPredict reached high performances.

Package Workflow Structure

::: {style="text-align:center"} ./workflow_schema.drawio.png :::

Installation

The package can be installed via pip:

pip install tfclass_predict

To use the package the usage of the precompiled data set is recommended as it shortens runtime drastically and can be on basically any system.

TFCP_precompiled

Alternatively, the human genome (v38) and the TFClassPredict (TFCP) model can be used directly.

HG38 from UCSC

TFCP_model

All downloads need to be unzipped so that the path to TFCP_precompiled directory or the path to the hg38.fa file and directory TFCP_model can be passed to the command-line tool or PredictionManager.

Usage

The tool can be used from the command line with the following parameters:

usage: tfclass_predict [-h] [--genome GENOME] [--precompiled PRECOMPILED] [--model MODEL] [--gpus GPUS] [--cpus CPUS] bed_file output_dir

tfclass_predict allows to estimate transcription factor bindingsites in the TFClass hierarchy. Please specifiy either the path to the precompiled (--precompiled) files or to the published
model (--model + --genome). If both are defined, the precompiled dataset is preferred!

positional arguments:
  bed_file              Path to bed file of ATAC-seq or other NGS experiment.
  output_dir            Path to output directory.

options:
  -h, --help            show this help message and exit
  --genome GENOME       Path to human genome reference (rec.: hg38) (.fa).
  --precompiled PRECOMPILED
                        Path to precompiled hg38 predictions (unzipped folder).
  --model MODEL         Path to TFClass model archive (unzipped folder).
  --gpus GPUS           Number of GPUs that should be used in parallel.
  --cpus CPUS           Number of CPUs that should be used at maximum in parallel. 

Or directly in python scripts:

from tfclass_predict import PredictionManager

bed_file = 'path_to_example/bed.bed'  # smaller bed file for testing
genome_file = "hg38.fa"
tfclass_model = "model/TFCP_model" #see Installation
tfclass_precompiled = "model/TFCP_precompiled" #see Installation
res_dir = "res"

# using the precompiled data set(recommended)
pred_manager = PredictionManager(bed_file, res_dir, precompiled=precompiled)
pred_manager.predict()
pred_manager.save_results()

# using genome and model
pred_manager = PredictionManager(bed_file, res_dir, genome=genome_file, tfcp_model=tfclass_model)
pred_manager.predict()
pred_manager.save_results()

In case the TFCP_model is used, it runs by default a mirrored strategy so that predictions are done in parallel on several GPUs if --gpus > 1. --cpus can be defined to use more than one core for parallel tokenization.

Further Documentation

Find more information about the API at ReadTheDocs.
(Currently outdated! - 26/05/21)

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

tfclass_predict-1.1.4.tar.gz (22.4 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

tfclass_predict-1.1.4-py3-none-any.whl (22.4 kB view details)

Uploaded Python 3

File details

Details for the file tfclass_predict-1.1.4.tar.gz.

File metadata

  • Download URL: tfclass_predict-1.1.4.tar.gz
  • Upload date:
  • Size: 22.4 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.11.14

File hashes

Hashes for tfclass_predict-1.1.4.tar.gz
Algorithm Hash digest
SHA256 116991a7be27f69b6f0b6b80655b217e14329477088a1130a6f13cb7d8c140a9
MD5 9fd004a1c0180b51afd98a44102ef100
BLAKE2b-256 c079132d83b912b02b668693c32e028b96d2266b9d51e00eb5fe0bc257de1bf0

See more details on using hashes here.

File details

Details for the file tfclass_predict-1.1.4-py3-none-any.whl.

File metadata

File hashes

Hashes for tfclass_predict-1.1.4-py3-none-any.whl
Algorithm Hash digest
SHA256 51a09ecacc4942320c55e33e5cba462926750322851a9dae1b3d1905503a9750
MD5 4f2156f7069a8d0eb3be83196e395988
BLAKE2b-256 a8e679886a6452df3f8f9acda16e844c2134b5a8e73d8150caf08033c71a03e0

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page