Skip to main content

sci-moTF

PyPI

sci-moTF is a very simple package to help with finding motifs that are enriched in different clusters, that are also expressed in your dataset and make it easier to draw inferences on which TFs may be driving the observed changes.

Install

pip install scimotf

There are two ways to run scimotf, 1) using DoRoTHea, 2) using FIMO.

Example using DoRothEA:

from scimotf import SciMotf_Doro

rcm_file = f'file output from the scircm package'
tf_file = 'dorothea_hs_ABCD.csv' # File downloaded from DoRothEA
mo = SciMotf_Doro(doro_file=tf_file, cluster_file=rcm_file, 
                 cluster_gene_id='external_gene_name', # got to match motif
                 padj_protein='column with your protein padj value',
                  logfc_protein='column with the protein logFC', 
                  padj_rna='column with the RNA padj',
                  logfc_rna='column with the RNA logFC', 
                  output_dir='')

# Run with the letters your interested in (i.e. A, B, C, D) see doro paper for deets
df = mo.run(['A'], rcm_clusters=["TMDE", "TMDS", "MDS", "MDS_TMDE", "MDE", "MDE_TMDS", "TPDE", "TPDE_TMDS", "TPDS", "TPDS_TMDE",])
df.to_csv(f'scimotif_DORO_A.csv')

Plot the results

from scimotf import plot_cluster_tf
plot_cluster_tf(f'scimotif_DORO_A.csv', save_fig=True, fig_dir='')

Example using FIMO:

The input to scimotf is: 1) the output of FIMO , fimo.tsv, 2) a csv file with gene identifier (e.g. name), cluster, log2FC, and p-value.

Example format for fimo.tsv

motif_id        motif_alt_id    sequence_name   start   stop    strand  score   p-value q-value matched_sequence
SP5_MOUSE.H11MO.0.C             Gh      1668    1691    -       32.7879 9.78e-16        4e-09   GGGGGGGAGGGGGAGGGGGAGGGG

Example format for cluster.csv

gene_name,cluster,log2FC,padj
Hoxa9,hindbrain,-2.8,0.00031

sci-TF will output two files, 1) scitf_detailed.csv, and 2) scitf_summary.csv.

sictf_motif_merged_fp-0.05_cp-1.0.csv

This gives a detailed output of each TF that was potentially able to bind to genes in a cluster.

cluster,motif,p-value,q-value,odds-ratio,count-genes-in-cluster,count-genes-bg,remainder-cluster,remainder-bg,tf-log2FC,tf-padj,tf-cluster,%-coverage,genes

Overview

  1. Filter fimo.tsv and remove any motifs that don't meet the p or qvalue threshold
  2. Filter any motifs in fimo.tsv that don't exist in the users input data (have a 0 logFC)
  3. For each TF for each cluster, count how many genes exist and perform a FET w.r.t the background
  4. adjust p-values
  5. summarise the identified TFs

Please post questions and issues related to sci-moTF on the Issues page_

section of the GitHub repository.

Metadata

Release files for scimotf 0.1.3

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for scimotf 0.1.3
File Size Uploaded Provenance Actions
scimotf-0.1.3.tar.gz 24.9 kB Without provenance Details for scimotf-0.1.3.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for scimotf 0.1.3
File Interpreter ABI Platform Actions
scimotf-0.1.3-py3-none-any.whl Python 3 none any Details for scimotf-0.1.3-py3-none-any.whl

Total release size: 63.6 kB

Release files / scimotf-0.1.3.tar.gz

Download URL scimotf-0.1.3.tar.gz
Size 24.9 kB
Tags Source
SHA-256 checksum
How to use checksums
88c98a51a0e6f7b6f1ed7b753fbf691a7efa4cee3ff54928ae733468e362e95d
BLAKE2b-256 checksum
How to use checksums
351073553a239b95b07850a5df8d560845a82e5ead2ddbb0d1da6df89f7ca78a
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/4.0.1 CPython/3.8.10

Release files / scimotf-0.1.3-py3-none-any.whl

Download URL scimotf-0.1.3-py3-none-any.whl
Size 38.7 kB
Tags Python 3
SHA-256 checksum
How to use checksums
d84867fce49db9daad699e503b7a716acd7259387f1fc4e93768c758c95d0c75
BLAKE2b-256 checksum
How to use checksums
107406a5a90605464e7b36a99d794d8787485919152b388e612802cf97147ed6
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/4.0.1 CPython/3.8.10

Security for scimotf 0.1.3

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page