Tf Target Gene Regulatory Networkのロゴ

Tf Target Gene Regulatory Network

組織人気
aipoch
tf-target-gene-regulatory-network

Use when analyzing transcription factor (TF) regulatory networks using Dorothea database. Input gene list, identify regulating transcription factors, generate TF-Target network visualization. For: transcription factor enrichment analysis, gene regulatory network research.

概要

公開者aipoch
リポジトリmedical-research-skills
スキル名tf-target-gene-regulatory-network
スター
1.9K
フォーク
188
同梱ファイル
42
ライセンスMIT
リンク
  • Markdown形式の指示

    モデルが必要に応じて読み込むSKILL.mdファイルです。関連するリクエストがあったときだけトークンを消費します。

  • どのLLMでも利用可能

    AIスキルはプロバイダー固有のコードではなく、通常のMarkdownなので、GPT、Claude、Gemini、Grok、ローカルモデルで利用できます。

  • 42個の同梱ファイル

    モデルが作業中に読み取れるスクリプト、テンプレート、参考資料です。ファイルは読み取り専用で、実行されることはありません。

  • オープンソース

    aipochがGitHubで公開しています。インストールする前にソースを確認してください。

インストール

AIスキル「Tf Target Gene Regulatory Network」をTypingMindにインストールすれば、どのLLMでも利用できます。SKILL.mdを読み取れる別のAIエージェントに追加することもできます。

1

TypingMindにインストール

TypingMindはGitHubフォルダから直接スキルをインストールします。SKILL.mdを読み取り、リソースファイルをまとめてローカルに保存します。

  1. アプリを開き、「プラグイン」→「スキル」に移動します。
  2. 「GitHubからインストール」を選択します。
  3. 以下のスキルフォルダのURLを貼り付けて確定します。
    https://github.com/aipoch/medical-research-skills/tree/main/awesome-med-research-skills/Data%20Analysis/tf-target-gene-regulatory-network
  4. スキルを利用したいチャットごとに、そのスキルを有効にしてください。
「プラグイン」→「スキル」→「スキルを追加」→「GitHubのURLから」を選択し、フォルダのURLを貼り付けて「続行」を押します。

TypingMindで使用

TypingMindのチャットでTf Target Gene Regulatory Networkを有効にするだけで、あとはモデルが対応します。名前と説明がシステムプロンプトに含まれ、関連するリクエストがあると、モデルが指示の全文を自動で読み込みます。手動で呼び出す必要はなく、実際に使用されるまでトークンを消費しません。

関連するリクエストがあるとすぐに、モデルが自動的にTf Target Gene Regulatory Networkを読み込みます。

どのAIモデルでも利用可能

AIスキルはプロバイダー固有のコードではなく、通常のMarkdownで書かれた指示です。そのため、Tf Target Gene Regulatory Networkは作成時に想定されたモデルに縛られません。TypingMindに一度インストールすれば、ご自身のAPIキーを使って、GPT-5、Claude、Gemini、Grok、DeepSeek、Mistral、Llama、またはご自身で実行するローカルモデルで利用できます。

  • 必要なときだけ読み込み

    システムプロンプトには名前と説明だけが含まれます。関連するリクエストが初めてあったときに指示を取得するため、スキルを使わない間は指示の読み込みにトークンを消費しません。

  • チャットの途中でモデルを切り替え

    スキルはコードではなく指示なので、モデルを切り替えてもそのまま使えます。次のモデルも同じSKILL.mdを読み込みます。

スキルの指示

モデルが読み込むSKILL.mdの内容です。スキルはモデルが従う指示なので、インストールする前に確認してください。

Transcription Factor (TF) Regulatory Network Analysis

When to Use

  • Use this skill when you have a human or mouse gene list and want to identify upstream TFs from the Dorothea database.
  • Use it when you need a ready-to-export TF-target network table plus a publication-ready PDF network plot.
  • Use it for reproducible CLI execution with saved session information and optional local Dorothea .rds databases.

When Not to Use

  • Do not use this skill for differential expression, pathway enrichment, cell type annotation, or survival analysis.
  • Do not use it to infer causal direction beyond curated Dorothea TF-target relationships.
  • Do not use it when your input genes are aliases or mixed-species symbols that have not been normalized first.

Input Validation

This skill accepts: a human or mouse gene list (HGNC symbols for human, first-letter-uppercase for mouse) for TF regulatory network analysis using Dorothea.

If the user's request does not involve identifying upstream transcription factors from a gene list — for example, asking to run differential expression, pathway enrichment, cell type annotation, or multi-omics integration — do not proceed with the workflow. Instead respond:

"tf-target-gene-regulatory-network is designed to identify upstream transcription factors from a gene list using the Dorothea database and generate a TF-target network visualization. Your request appears to be outside this scope. Please provide a gene list for TF regulatory analysis, or use a more appropriate tool for your task."

Entry Point

  • Primary CLI entry point: scripts/main.R
  • Canonical visualization values: English tokens fr, curve, diamond, triangle, square

When to Read External Files

SituationFile to ReadPurpose
Need algorithm detailsreferences/algorithm.mdStatistical methods, Dorothea database, network analysis algorithms
Need to run analysisscripts/main.RExecute: Rscript scripts/main.R --gene ... --species ...
Encounter errorsreferences/troubleshooting.mdCommon errors and solutions
Need CLI examplesreferences/cli-guide.mdDetailed CLI usage examples
Need test datatests/data/Sample gene lists for testing

Installation

R Package Dependencies

r
# CRAN packages
install.packages(c("optparse", "dplyr", "openxlsx", "tidyverse", "tidygraph", "ggraph", "showtext"))

# Bioconductor packages (optional if using local database files)
if (!require("BiocManager", quietly = TRUE))
    install.packages("BiocManager")
BiocManager::install("dorothea")

Local Database Files (Recommended)

For faster analysis and offline use, generate local database files:

bash
Rscript database/database-get.R

This creates database/dorothea_hs.rds (human) and database/dorothea_mm.rds (mouse) in the skill root directory.

Verification

bash
Rscript scripts/main.R --help

Usage

bash
Rscript scripts/main.R \
  --gene "TP53,MYC,EGFR" \
  --species human \
  --output_dir ./TF_Result \
  --seed 42

Arguments

Note: Either --gene or --gene_file must be provided (at least one is required).

ShortLongTypeDefaultDescription
-g--genecharacterNULLComma-separated gene list (e.g., "TP53,MYC,EGFR") — required if --gene_file not provided
-f--gene_filecharacterNULLFile with gene names (txt or csv, one per line or comma-separated) — required if --gene not provided
-s--speciescharacterhumanSpecies: human or mouse
-o--output_dircharacterTF_ResultOutput directory name
--db_pathcharacterNULLLocal .rds database file path. If not specified, auto-searches default paths
-d--dircharacterNULLWorking root directory (advanced)
--seedinteger42Random seed for reproducibility
--titlecharacter""Main plot title

Visualization Parameters: For complete list (plot dimensions, colors, labels, layout, edge styles), see references/visualization-parameters.md. Canonical values are English tokens: fr (force-directed layout), curve (curved edges), diamond / triangle / square (node shapes).


Input Format

Gene List Input

Two ways to provide input genes:

  1. Command line: --gene "TP53,MYC,EGFR" (comma-separated)
  2. File input: --gene_file genes.txt (one gene per line or comma-separated)

Gene Naming Convention

  • Human genes: All uppercase symbols (e.g., TP53, MYC, EGFR)
  • Mouse genes: First letter uppercase only (e.g., Tp53, Myc, Egfr)
  • Use official gene symbols, not aliases
  • Case-sensitive for species matching

Species Support

  • human: Human genes (Homo sapiens)
  • mouse: Mouse genes (Mus musculus)

Performance Guidance

For large gene lists (> 500 genes), Dorothea database queries may take several minutes. Use a local .rds database (--db_path) for substantially faster lookups. There is currently no --timeout_seconds parameter; monitor progress with verbose logging if available.


Output Files

FileDescription
TF_Network_Plot.pdfTF-target network visualization
tf_network.xlsxNetwork data (edges and nodes worksheets)
TF_Target_Filtered_Core_<species>.xlsxComplete TF-target relationships table
session_info.txtR session and package version info
tf.RdataR environment data

Outputs are organized under TF_Result/ in data/, plot/, and table/ subdirectories.


Workflow

Step 1: Load Database

  • Priority search for local database files (.rds format) in: --db_path, getwd()/database/, script_dir/database/, dirname(script_dir)/database/
  • If no local file found, load from Dorothea R package
  • Filter for high-confidence interactions (confidence levels A, B, C)

Step 2: Identify Regulating TFs

  • Match input genes against target genes in Dorothea database
  • Extract transcription factors regulating these targets
  • Compute TF frequency (number of targets regulated)

Step 3: Generate Network Data

  • Create edge list (TF → Target relationships)
  • Create node list with types (TF or Target)
  • Save to Excel format for downstream analysis

Step 4: Visualize Network

  • Generate network graph using tidygraph and ggraph
  • Apply visual customization (layout, colors, shapes)
  • Save as PDF publication-ready figure

Methods

Dorothea Database

Network Analysis

  • Graph construction: TF-target relationships as directed edges
  • Layout algorithms: Multiple options including fr (force-directed), circle, grid, sphere
  • Visual customization: Full control over colors, shapes, sizes

Local Database Feature

  • Option to use pre-saved .rds files for faster analysis and offline use
  • Priority search paths for local database files (see Step 1 above)
  • Fallback to Dorothea R package if no local file found

Examples

Basic Usage (Human Genes)

bash
Rscript scripts/main.R \
  -g "TP53,MYC,EGFR" \
  -s human \
  -o ./TF_Result

File Input

bash
Rscript scripts/main.R \
  -f gene_list.txt \
  -s human \
  -o ./TF_Result

Mouse Genes

bash
Rscript scripts/main.R \
  -g "Tp53,Myc,Egfr" \
  -s mouse \
  -o ./Mouse_TF_Result

Custom Styling

bash
Rscript scripts/main.R \
  -g "PTPRC,FOXP3,CD4" \
  -s human \
  --style_layout "fr" \
  --style_line "curve" \
  --point_shape "diamond,triangle" \
  --line_color "#E64B35" \
  --title "Immune TF Network" \
  -o ./Custom_Plot

Using Local Database

bash
Rscript scripts/main.R \
  -g "TP53,MYC,EGFR" \
  -s human \
  --db_path database/dorothea_hs.rds \
  -o ./LocalDB_Result

Error Handling

Common Errors

Error CodeCauseSolution
SKILL_FILE_NOT_FOUNDInput gene file does not existCheck file path and permissions
SKILL_NO_INPUT_GENESEmpty gene list or fileProvide genes using --gene or --gene_file
SKILL_INVALID_SPECIESSpecies not human or mouseUse human or mouse only
SKILL_INVALID_PARAMETERInvalid layout, shape, line, or legend valueUse supported values shown by Rscript scripts/main.R --help
SKILL_EMPTY_RESULTSNo TF-target relationships found for input genesCheck gene symbols and species; try broadening confidence levels
SKILL_DEPENDENCY_MISSINGMissing dplyr, dorothea, tidygraph, etc.Install missing packages (see Installation section)

Exit Status Codes

CodeMeaning
0Success
1Execution error (see error code for details)
2SKILL_EMPTY_RESULTS — no TF-target matches found for the input genes

IF error persists, READ: references/troubleshooting.md


Testing

Test with Sample Data

bash
# Check help
Rscript scripts/main.R --help

# Run with sample human genes
Rscript scripts/main.R \
  -g "TP53,MYC,EGFR" \
  -s human \
  -o tests/output_human/

# Run with sample mouse genes
Rscript scripts/main.R \
  -g "Tp53,Myc,Egfr" \
  -s mouse \
  -o tests/output_mouse/

After running, verify tests/output_human/plot/TF_Network_Plot.pdf and tests/output_human/table/tf_network.xlsx exist and are non-empty.

Reference Files

FilePurpose
references/algorithm.mdStatistical methods and Dorothea database details
references/troubleshooting.mdCommon errors and solutions
references/cli-guide.mdCLI usage examples
references/visualization-parameters.mdComplete visualization parameter list

同梱ファイル

スキルが読み込まれている間、モデルは必要に応じてこれらを読み取ります。読み取り可能なファイルとして提供され、実行されることはありません。

よくある質問

AIスキル「Tf Target Gene Regulatory Network」では何ができますか?

Use when analyzing transcription factor (TF) regulatory networks using Dorothea database. Input gene list, identify regulating transcription factors, generate TF-Target network visualization. For: transcription factor enrichment analysis, gene regulatory network research.

TypingMindでTf Target Gene Regulatory Networkを使うメリットは何ですか?

一度インストールすれば、どのモデルでも使えるからです。Tf Target Gene Regulatory Networkはプロバイダー固有のコードではなく、通常のMarkdownで記述されているため、同じスキルをGPT-5、Claude、Gemini、Grok、ローカルモデルで利用できます。チャットの途中でモデルを切り替えても、そのまま使い続けられます。TypingMindは自分のAPIキーで動作するため、シート単位のサブスクリプションではなく、プロバイダーに直接料金を支払います。スキルとチャットは自分のストレージに保持されます。

TypingMindにTf Target Gene Regulatory Networkをインストールするにはどうすればよいですか?

TypingMindで「プラグイン」→「スキル」→「GitHubからインストール」を開き、https://github.com/aipoch/medical-research-skills/tree/main/awesome-med-research-skills/Data%20Analysis/tf-target-gene-regulatory-networkを貼り付けてください。TypingMindがSKILL.mdを読み込み、関連ファイルをまとめて、チャットごとに有効にできるスキルとしてインストールします。

Tf Target Gene Regulatory Networkを使えるAIモデルはどれですか?

TypingMindに接続したどのモデルでも利用できます。AIスキルはプロバイダー固有のコードではなく、通常のMarkdownで書かれた指示です。そのため、GPT、Claude、Gemini、Grok、ローカルモデルのいずれも、リクエストの内容がこのスキルの用途に合ったときに、このスキルを読み込めます。

Tf Target Gene Regulatory Networkで使えるAIモデルの数に制限はありますか?

数に制限はありません。スキルに対応したモデルであれば、GPT、Claude、Gemini、Grok、DeepSeek、Mistral、Llamaなど、どのモデルでもTf Target Gene Regulatory Networkを利用できます。すべてTypingMind上で、自分のAPIキーを使って利用できます。

AIスキル「Tf Target Gene Regulatory Network」は無料ですか?

はい。aipochがMITライセンスのもとでGitHubに公開しています。ご利用のAIプロバイダーに支払うのは、使用したトークンの料金だけです。

AIスキルとは何ですか?

AIスキルは、特定のタスクの実行方法をAIモデルに教える、再利用可能な指示のセットです。オープンなAgent Skills形式に従い、名前と説明を含むSKILL.mdファイルに加え、モデルが必要とするスクリプト、テンプレート、参照ファイルで構成されます。モデルはリクエストがスキルに合致したときだけ指示を読み込むため、インストール済みのスキルも、使うまでは費用がかかりません。

AIスキルは、プラグインやMCPサーバーとどう違いますか?

プラグインやMCPサーバーは、モデルが呼び出せる新しいツールを提供します。ツールとは、どこかで実行され、結果を返すコードです。一方、AIスキルは、タスクへの取り組み方、従うべき手順、望ましい出力の例といった知識や進め方をモデルに伝えます。スキルは通常のMarkdownで記述されているため、サーバー、APIキー、実行環境は不要で、どのモデルでも利用できます。

すべて見る

今すぐ自分専用のAIワークスペースを作成

ニュースレターに登録すると、新機能や今後のプレゼント企画のお知らせが届きます👇