{"data":{"slug":"github-aipoch-medical-research-skills-awesome-med-research-skills-data-analysis-lncrna-regulatory-network-construction-analysis-1eb80413d40e","title":"lncRNA-mRNA Regulatory Network Construction from ceRNA References","summary":"Construct a database-driven lncRNA-mRNA regulatory network using shared miRNA evidence from local ceRNA reference tables. The output includes an auditable network table and a tripartite evidence table.","url":"https:\/\/skillshunter.net\/skills\/github-aipoch-medical-research-skills-awesome-med-research-skills-data-analysis-lncrna-regulatory-network-construction-analysis-1eb80413d40e","json_url":"https:\/\/skillshunter.net\/api\/public\/v1\/skills\/github-aipoch-medical-research-skills-awesome-med-research-skills-data-analysis-lncrna-regulatory-network-construction-analysis-1eb80413d40e","markdown_url":"https:\/\/skillshunter.net\/skills\/github-aipoch-medical-research-skills-awesome-med-research-skills-data-analysis-lncrna-regulatory-network-construction-analysis-1eb80413d40e.md","download_url":"https:\/\/skillshunter.net\/skills\/github-aipoch-medical-research-skills-awesome-med-research-skills-data-analysis-lncrna-regulatory-network-construction-analysis-1eb80413d40e\/download","category":{"slug":"data-research","name":"Data & Research"},"editor_note":"At least one of `--target_genes` or `--target_lncrna` must be provided. The `--mirna_dataset` parameter can be adjusted to select a specific miRNA-mRNA evidence source. The `--mode visualize` can be used to regenerate a PDF plot from a previously saved `.rda` object.","instructions":"---\nname: lncrna-regulatory-network-construction-analysis\ndescription: Use this bioinformatics data analysis skill to construct a database-driven lncRNA-mRNA regulatory network from target lncRNA and\/or gene lists by projecting shared miRNA evidence from local ceRNA reference tables. It does not infer networks from expression matrices.\nlicense: MIT\nauthor: AIPOCH\n---\n> **Source**: [https:\/\/github.com\/aipoch\/medical-research-skills](https:\/\/github.com\/aipoch\/medical-research-skills)\n\n# lncRNA Regulatory Network Construction Analysis\n\n## When to Use\n\nUse this skill when the user wants a local-database network lookup workflow rather than expression-based inference.\n\nTypical use cases:\n\n- Build an lncRNA-mRNA network from target genes and the bundled ceRNA reference tables\n- Start from a candidate lncRNA list and retrieve linked mRNAs through shared miRNAs\n- Generate an auditable lncRNA-mRNA network table plus a tripartite evidence table\n- Reuse a saved database-derived network object to regenerate a PDF plot\n\nDo not use this skill when the user asks for:\n\n- Expression-matrix-based network inference\n- Correlation analysis between lncRNAs and mRNAs\n- Causal inference or regulatory-strength estimation from expression data\n- Online database querying or remote API lookups\n\n## Execution Model\n\nThis is a hybrid skill.\n\n1. Read `SKILL.md` to confirm that the request is database-driven.\n2. Use `scripts\/main.R` for actual execution.\n3. Use `--mode analyze` to build tables and a saved `.rda` object.\n4. Use `--mode visualize` to reuse the saved object and redraw the PDF without rebuilding the database tables.\n5. Use `--mode full` to run both steps in one pass.\n6. Read reference files only when more detail is needed.\n7. Before `--mode visualize`, confirm that `output_dir\/data\/lncrna_network.rda` already exists.\n8. In `visualize` mode, the saved `.rda` object is the required input; a missing or invalid `reference_dir` does not block plot reuse.\n9. After execution, report the mode, output directory, key files, and either the retained network size or the surfaced skill error code.\n\n## When to Read External Files\n\n| Situation | File to Read | Purpose |\n|-----------|--------------|---------|\n| Need algorithm details | `references\/algorithm.md` | Understand the shared-miRNA projection logic |\n| Need troubleshooting help | `references\/troubleshooting.md` | Review error codes and fixes |\n| Need CLI examples or the baseline record | `references\/cli-guide.md` | Review installation, examples, and the recorded run |\n| Need runnable demo inputs | `tests\/data\/` | Use the bundled target gene and lncRNA lists |\n| Need actual execution | `scripts\/main.R` | Run the CLI workflow |\n\n## Out-of-Scope Response Pattern\n\nIf the request is expression-based rather than database-driven, do not run this skill. Respond briefly with:\n\n> This skill only projects lncRNA-mRNA links from local ceRNA reference tables using target gene and\/or lncRNA lists. It does not infer networks from expression matrices or estimate causal regulatory strength. Use a different workflow for expression-based correlation or causal inference.\n\nIf the request is ambiguous between database-driven lookup and expression-based inference, ask one short clarifying question before running any command.\n\n## Agent Response Contract\n\nFor a successful run, report:\n\n- The selected mode and why it fits the request\n- The `output_dir`\n- The key output files that were generated or reused\n- The retained network size from `table\/network_stats.txt` when available\n- A short reminder that the result is database-driven rather than expression-inferred\n\nFor a failed run, report:\n\n- The surfaced `SKILL_*` error code\n- The most likely cause based on `references\/troubleshooting.md`\n- The shortest actionable next step for rerunning the workflow\n\n## Usage\n\n```bash\nRscript scripts\/main.R \\\n  --mode full \\\n  --target_genes .\/target_genes.txt \\\n  --target_lncrna .\/target_lncrna.txt \\\n  --mirna_dataset combined \\\n  --lncrna_strictness High \\\n  --min_shared_mirna 1 \\\n  --reference_dir .\/references\/database \\\n  --output_dir .\/output \\\n  --seed 42\n```\n\n## Arguments\n\n| Long | Type | Default | Description |\n|------|------|---------|-------------|\n| `--mode` | character | `full` | Run mode: `analyze`, `visualize`, or `full` |\n| `--target_genes` | character | empty | Target gene list file or comma-separated gene list |\n| `--target_lncrna` | character | empty | Target lncRNA list file or comma-separated lncRNA list |\n| `--mirna_dataset` | character | `combined` | miRNA-mRNA dataset: `combined`, `starbase`, `mirdb`, `mirtarbase`, `starbase+mirdb`, `starbase+mirtarbase`, or `mirdb+mirtarbase` |\n| `--lncrna_strictness` | character | `High` | miRNA-lncRNA strictness: `Low`, `Median`, or `High` |\n| `--lncrna_freq_thresh` | integer | `0` | Minimum lncRNA degree threshold after edge aggregation |\n| `--min_shared_mirna` | integer | `1` | Minimum shared miRNA count for keeping an lncRNA-mRNA edge |\n| `--reference_dir` | character | `references\/database` | Local directory containing the bundled ceRNA reference tables; required for `analyze` and `full` |\n| `--output_dir` | character | `tests\/output` | Output directory inside the skill root |\n| `--plot_file` | character | `lncrna_mrna_network.pdf` | PDF file name under `plot\/` |\n| `--plot_title` | character | `lncRNA-mRNA Regulatory Network` | Plot title |\n| `--layout_type` | character | `kk` | Plot layout: `kk`, `fr`, `circle`, or `nicely` |\n| `--width` | double | `14` | Plot width in inches |\n| `--height` | double | `9` | Plot height in inches |\n| `--node_size_base` | double | `6` | Base node size |\n| `--node_size_scale` | double | `1.5` | Node size increment per degree |\n| `--lncrna_color` | character | `#1f77b4` | lncRNA node color |\n| `--mrna_color` | character | `#d62728` | mRNA node color |\n| `--seed` | integer | `42` | Random seed |\n| `--timeout_seconds` | integer | `0` | Optional timeout in seconds; `0` disables it |\n\n## Input Format\n\n### Target Gene List\n\n- Plain-text file or comma-separated list\n- One gene symbol per line when using a file\n\nExample:\n\n```text\nTP53\nBRCA1\nMYC\n```\n\n### Target lncRNA List\n\n- Plain-text file or comma-separated list\n- One lncRNA symbol per line when using a file\n\nExample:\n\n```text\nXIST\nSNHG16\nHNRNPU-AS1\n```\n\nAt least one of `--target_genes` or `--target_lncrna` must be provided.\n\n## Output Files\n\n| File | Description |\n|------|-------------|\n| `table\/lncrna_mrna_edges.csv` | Projected lncRNA-mRNA network with shared-miRNA counts and labels |\n| `table\/lncrna_mirna_mrna_evidence.csv` | Tripartite evidence table with one lncRNA-miRNA-mRNA row per evidence chain |\n| `table\/lncrna_mrna_nodes.csv` | Node table with node type and degree |\n| `table\/network_stats.txt` | Network summary statistics |\n| `data\/lncrna_network.rda` | Serialized R object used by visualization mode |\n| `plot\/lncrna_mrna_network.pdf` | Projected lncRNA-mRNA network PDF |\n| `session_info.txt` | R session and package version record |\n| `output_manifest.txt` | Append-only manifest of generated outputs |\n| `run_record.txt` | Append-only run history with parameters, runtime, and output summary |\n\n## Error Handling\n\n| Error Code | Meaning | Solution |\n|------------|---------|----------|\n| `SKILL_FILE_NOT_FOUND` | A required list file, reference file, or saved result object is missing | Check the path and rerun |\n| `SKILL_MISSING_COLUMNS` | A required database column is absent | Validate the reference table format |\n| `SKILL_EMPTY_DATA` | No target IDs, evidence rows, or final edges remained | Broaden the target list or relax filtering |\n| `SKILL_INVALID_PARAMETER` | A CLI argument is missing, invalid, or unsafe | Recheck the parameter table |\n| `SKILL_SAMPLE_MISMATCH` | Reserved for workflows expecting matched entities | Not expected in the database-only workflow |\n| `SKILL_PACKAGE_NOT_FOUND` | Required R packages are missing | Install the packages from `references\/cli-guide.md` |\n\n## Progressive Disclosure\n\n1. Start with `--target_genes` or `--target_lncrna`.\n2. Add the second target list if a more focused subnetwork is needed.\n3. Switch `--mirna_dataset` if a different miRNA-mRNA evidence source is required.\n4. Adjust `--lncrna_strictness`, `--lncrna_freq_thresh`, and `--min_shared_mirna` to tighten or relax the projected network.\n5. Reuse `--mode visualize` once the `.rda` object exists.\n\n## Result Size Guidance\n\n- Broad gene-only or lncRNA-only runs can expand quickly and may retain hundreds to thousands of edges.\n- If the retained network is too large for practical review, report the edge and node totals, then increase `--min_shared_mirna`, increase `--lncrna_freq_thresh`, or provide the complementary target list.\n- Start with the bundled demo inputs before moving to broader target lists.\n\n## Examples\n\n### Gene-Driven Network\n\n```bash\nRscript scripts\/main.R \\\n  --mode full \\\n  --target_genes .\/target_genes.txt \\\n  --reference_dir .\/references\/database \\\n  --output_dir .\/output\n```\n\n### lncRNA-Driven Network\n\n```bash\nRscript scripts\/main.R \\\n  --mode analyze \\\n  --target_lncrna .\/target_lncrna.txt \\\n  --mirna_dataset starbase \\\n  --lncrna_strictness Median \\\n  --output_dir .\/lncrna_only_output\n```\n\n### Focused Bipartite Network\n\n```bash\nRscript scripts\/main.R \\\n  --mode full \\\n  --target_genes TP53,BRCA1,MYC \\\n  --target_lncrna XIST,SNHG16,HNRNPU-AS1 \\\n  --mirna_dataset combined \\\n  --lncrna_strictness High \\\n  --min_shared_mirna 2 \\\n  --output_dir .\/focused_output\n```\n\n### Visualization Reuse\n\n```bash\nRscript scripts\/main.R \\\n  --mode visualize \\\n  --output_dir .\/focused_output \\\n  --plot_file reused_network.pdf \\\n  --layout_type fr\n```\n\nFor the bundled baseline and CLI notes, read `references\/cli-guide.md`.\n\n## Testing\n\n```bash\nRscript scripts\/main.R --help\n\nRscript tests\/run_tests.R\n\nRscript scripts\/main.R \\\n  --mode full \\\n  --target_genes tests\/data\/target_genes.txt \\\n  --target_lncrna tests\/data\/target_lncrna.txt \\\n  --reference_dir references\/database \\\n  --output_dir tests\/output \\\n  --seed 42\n```\n\nExpected retained outputs after a validated run:\n\n- `tests\/output\/table\/lncrna_mrna_edges.csv`\n- `tests\/output\/table\/lncrna_mirna_mrna_evidence.csv`\n- `tests\/output\/table\/lncrna_mrna_nodes.csv`\n- `tests\/output\/table\/network_stats.txt`\n- `tests\/output\/data\/lncrna_network.rda`\n- `tests\/output\/plot\/lncrna_mrna_network.pdf`\n- `tests\/output\/session_info.txt`\n- `tests\/output\/output_manifest.txt`\n- `tests\/output\/run_record.txt`\n\n## Scope Limits\n\nThis skill does not infer networks from expression matrices and does not perform online queries.\n\nIf the user needs expression-based correlation or causal inference, use a different workflow.\n","use_cases":["Build an lncRNA-mRNA network from target genes and the bundled ceRNA reference tables","Start from a candidate lncRNA list and retrieve linked mRNAs through shared miRNAs","Generate an auditable lncRNA-mRNA network table plus a tripartite evidence table","Reuse a saved database-derived network object to regenerate a PDF plot"],"limitations":[],"compatibility":[],"setup_tip":null,"sample_input":null,"sample_output":null,"source_url":"https:\/\/github.com\/aipoch\/medical-research-skills\/blob\/686e09dfdb45d9fa1a08664f06bb93769b3c9d91\/awesome-med-research-skills\/Data%20Analysis\/lncrna-regulatory-network-construction-analysis\/SKILL.md","source_commit":"686e09dfdb45d9fa1a08664f06bb93769b3c9d91","license":"MIT","version":null,"listing_approved_at":"2026-11-24","created_at":"2026-11-23T07:20:53.000000Z","updated_at":"2026-11-24T07:13:04.000000Z","seo_title":"lncRNA-mRNA Network Construction from ceRNA References","seo_description":"Build an lncRNA-mRNA regulatory network using shared miRNA evidence from local ceRNA reference tables. No expression matrix required.","seo_keywords":["lncRNA-mRNA network construction","ceRNA reference table analysis","shared miRNA regulatory network","database-driven network lookup","lncRNA-mRNA interaction analysis"]}}