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.5.tar.gz (22.9 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.5-py3-none-any.whl (22.8 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: tfclass_predict-1.1.5.tar.gz
  • Upload date:
  • Size: 22.9 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.5.tar.gz
Algorithm Hash digest
SHA256 5b189f21ebfa5d19ac817930baa7446a9ec43482db0acad51596a4f29ca10dbe
MD5 85b5b9e3fcc91cf1d171a0589a61c6ec
BLAKE2b-256 bc6f7ccdfd0e4c380a29807662dac3c245cb04958bc64ec47447ae5762dd0066

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for tfclass_predict-1.1.5-py3-none-any.whl
Algorithm Hash digest
SHA256 7e1ded7edc4623dc173c6d7ac81beb7bfe78d08f63ce82fe819c6b1aabee15f3
MD5 f9a0405bfd5b0e92654259085b72b655
BLAKE2b-256 df541f8973114840bfed0de77b0a24d035251669e5b1e7723abb27d9992bdc40

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