Logo Netneurotools Guide

Netneurotools Guide

Tổ chứcPhổ biến
NeuroAIHub
netneurotools-guide

Domain-validated guidance for network neuroscience analysis using netneurotools: datasets, brain network metrics, connectivity consensus, modularity, spatial statistics, null models, and cortical surface visualization. Use this skill whenever the user works with brain connectivity matrices, connectomes, graph theory on brain networks, parcellated brain data (Schaefer, Cammoun, Desikan-Killiany), cortical surface templates (fsaverage, fsLR, CIVET, Conte69), network communication metrics, null model generation, spatial autocorrelation on brain maps, community detection in connectomes, or surface-based visualization with PyVista/PySurfer. Also trigger when the user mentions netneurotools, netneurolab, structure-function coupling, network neuroscience, brain graph analysis, or needs to fetch neuroimaging atlases and templates.

Add to TypingMind

Tổng quan

Nhà phát hànhNeuroAIHub
Kho mãBrainPilot
Tên kỹ năngnetneurotools-guide
Sao
1.1K
Bản fork
74
Tệp đi kèm
6
Giấy phépAGPL-3.0
Liên kết
  • Hướng dẫn bằng Markdown

    Tệp SKILL.md được mô hình tải khi cần, nên chỉ tốn token khi có yêu cầu thực sự phù hợp.

  • Dùng được với mọi LLM

    Kỹ năng AI dùng hướng dẫn viết bằng Markdown thay vì mã dành riêng cho một nhà cung cấp, nên dùng được với GPT, Claude, Gemini, Grok hoặc mô hình cục bộ.

  • 6 tệp đi kèm

    Các tập lệnh, mẫu và tài liệu tham khảo mà mô hình có thể đọc khi làm việc. Các tệp chỉ cho phép đọc và không bao giờ được thực thi.

  • Mã nguồn mở

    Được NeuroAIHub công bố trên GitHub. Hãy đọc các tệp nguồn trước khi cài đặt.

Cài đặt

Cài đặt kỹ năng AI Netneurotools Guide trong TypingMind để dùng với bất kỳ LLM nào, hoặc thêm vào một tác nhân AI khác có thể đọc SKILL.md.

1

Cài đặt trong TypingMind

TypingMind cài đặt kỹ năng trực tiếp từ thư mục GitHub — đọc SKILL.md, đóng gói các tệp tài nguyên và lưu kết quả trên máy.

  1. Mở ứng dụng và vào Plugin → Kỹ năng.
  2. Chọn "Cài đặt từ GitHub".
  3. Dán URL của thư mục kỹ năng được hiển thị bên dưới rồi xác nhận.
    https://github.com/NeuroAIHub/BrainPilot/tree/main/packages/skills/skills/06_fMRI_Neuroimaging/netneurotools-guide
  4. Bật kỹ năng trong từng cuộc trò chuyện mà bạn muốn sử dụng kỹ năng đó.
Plugin → Kỹ năng → Thêm kỹ năng → Từ URL GitHub, sau đó dán URL thư mục và nhấn Tiếp tục.
2

Cài đặt trong tác nhân AI khác

Bất kỳ tác nhân AI nào đọc được định dạng Agent Skills đều có thể dùng kỹ năng này — hãy sao chép thư mục vào thư mục kỹ năng của tác nhân AI đó.

Claude Code — .claude/skills
git clone --depth 1 https://github.com/NeuroAIHub/BrainPilot.git /tmp/BrainPilot
mkdir -p .claude/skills
cp -r /tmp/BrainPilot/packages/skills/skills/06_fMRI_Neuroimaging/netneurotools-guide .claude/skills/netneurotools-guide
Khởi động lại Claude Code sau khi sao chép để ứng dụng nhận kỹ năng mới.

Sử dụng trong TypingMind

Bật Netneurotools Guide trong bất kỳ cuộc trò chuyện nào trên TypingMind, mô hình sẽ tự xử lý phần còn lại. Tên và mô tả của kỹ năng nằm trong prompt hệ thống. Ngay khi có yêu cầu phù hợp, mô hình tự tải toàn bộ hướng dẫn — bạn không cần gọi thủ công và kỹ năng không tốn token cho đến khi thực sự được dùng.

Mô hình tự nạp Netneurotools Guide ngay khi có yêu cầu phù hợp.

Dùng được với mọi mô hình AI

Kỹ năng AI là các hướng dẫn Markdown thuần túy, không phải mã dành riêng cho một nhà cung cấp, nên bạn có thể dùng Netneurotools Guide với cả những mô hình khác ngoài mô hình ban đầu. Chỉ cần cài đặt một lần trong TypingMind rồi dùng với GPT-5, Claude, Gemini, Grok, DeepSeek, Mistral, Llama hoặc mô hình cục bộ do bạn tự chạy — tất cả đều dùng khóa API của riêng bạn.

  • Chỉ tải khi cần

    Prompt hệ thống chỉ chứa tên và mô tả. Hướng dẫn được tải khi có yêu cầu phù hợp đầu tiên, nên khi kỹ năng chưa được dùng, bạn không tốn token cho phần hướng dẫn.

  • Đổi mô hình ngay trong cuộc trò chuyện

    Vì kỹ năng là hướng dẫn chứ không phải mã, việc đổi mô hình không làm kỹ năng ngừng hoạt động — mô hình tiếp theo vẫn đọc cùng tệp SKILL.md.

Hướng dẫn của kỹ năng

Đây là nội dung SKILL.md mà mô hình tải. Hãy đọc trước khi cài đặt — kỹ năng là những hướng dẫn mà mô hình của bạn sẽ làm theo.

NetNeuroTools Guide

Purpose

This skill encodes the complete API and recommended workflows for netneurotools, a Python toolbox for network neuroscience developed by the Network Neuroscience Lab (netneurolab). It covers dataset fetching, brain connectivity metrics, network randomization and null models, community detection, spatial autocorrelation statistics, parcellation interface utilities, and cortical/subcortical surface visualization.

When to Use This Skill

Activate when the user:

  • Works with brain connectivity matrices (structural or functional)
  • Needs network communication metrics (shortest path, navigation, communicability, search information, diffusion efficiency)
  • Wants to generate null/surrogate networks preserving degree, strength, or distance distributions
  • Performs community detection or consensus clustering on brain networks
  • Computes spatial autocorrelation (Moran's I, Geary's C, Lee's L) on parcellated brain data
  • Fetches standard neuroimaging templates (fsaverage, fsLR, CIVET, Conte69) or atlases (Schaefer, Cammoun, Pauli)
  • Needs to convert between vertex-level and parcel-level brain data
  • Visualizes data on cortical surfaces using PyVista or PySurfer
  • Mentions netneurotools, netneurolab, or any function from this toolbox
  • Performs structure-function coupling, assortativity analysis, or dominance analysis
  • Simulates atrophy spreading on brain networks (SIR model)

Reference Files (Progressive Disclosure)

TopicFileWhen to Read
Datasetsreferences/datasets.mdUser fetches templates, atlases, or project datasets
Network Metricsreferences/metrics.mdUser computes communication, assortativity, spreading, or statistical network metrics
Networksreferences/networks.mdUser builds consensus connectivity, randomizes networks, or thresholds graphs
Statisticsreferences/stats.mdUser runs permutation tests, correlations, residualization, or dominance analysis
Spatial & Modularityreferences/spatial-modularity.mdUser computes spatial autocorrelation or performs community detection
Interface & Plottingreferences/interface-plotting.mdUser converts parcels/vertices, handles CIFTI/GIFTI files, or plots on cortical surfaces

Installation

bash
pip install netneurotools

# For PyVista surface plotting (recommended)
pip install netneurotools[pyvista]

# For PySurfer surface plotting (legacy)
pip install netneurotools[pysurfer]

# For numba acceleration
pip install netneurotools[numba]

Core dependencies: numpy>=1.16, scipy>=1.4.0, scikit-learn, matplotlib, nibabel>=3.0.0, nilearn, bctpy, tqdm, neuromaps

Overview Pipeline

1. Fetch data       --> netneurotools.datasets (templates, atlases, connectomes)
2. Build networks   --> netneurotools.networks (consensus, thresholding)
3. Analyze metrics  --> netneurotools.metrics (communication, assortativity)
4. Null models      --> netneurotools.networks (randomization, surrogates)
5. Statistics       --> netneurotools.stats (permutation tests, dominance)
6. Spatial stats    --> netneurotools.spatial (Moran's I, Geary's C, Lee's L)
7. Modularity       --> netneurotools.modularity (consensus clustering)
8. Visualize        --> netneurotools.plotting (cortical surfaces, heatmaps)

Quick Start

Fetch Atlas and Template

python
from netneurotools.datasets import fetch_schaefer2018, fetch_fsaverage_curated

# Fetch Schaefer 400-parcel atlas in fsaverage space
parc = fetch_schaefer2018('fsaverage')['400Parcels7Networks']
# parc is a SURFACE namedtuple with fields .L and .R

# Fetch curated fsaverage surfaces
surfaces = fetch_fsaverage_curated('fsaverage5')
# surfaces has keys: 'white', 'pial', 'inflated', 'sphere', 'medial', 'sulc', 'vaavg'
# Each value is a SURFACE namedtuple with fields .L and .R

Consensus Functional Connectivity

python
from netneurotools.networks import func_consensus
import numpy as np

# data: (N_nodes, T_timepoints, S_subjects) array
consensus = func_consensus(data, n_boot=1000, ci=95, seed=42)

Community Detection

python
from netneurotools.modularity import consensus_modularity
import numpy as np

# adjacency: (N, N) non-negative connectivity matrix
consensus, Q_all, zrand_all = consensus_modularity(
    adjacency, gamma=1.5, repeats=100, seed=1234
)

Generate Distance-Preserving Surrogates

python
from netneurotools.networks import match_length_degree_distribution

newB, newW, nr = match_length_degree_distribution(
    W, D, nbins=10, nswap=1000, seed=42
)

Permutation Test for Correlation

python
from netneurotools.stats import permtest_pearsonr, make_correlated_xy

x, y = make_correlated_xy(corr=0.3, size=100, seed=42)
r, p = permtest_pearsonr(x, y, n_perm=5000, seed=42)

Spatial Autocorrelation

python
from netneurotools.spatial import morans_i

I = morans_i(annotation_vector, spatial_weight_matrix)

Plot on Cortical Surface (PyVista)

python
from netneurotools.plotting import pv_plot_surface
import numpy as np

data_L = np.random.random((10242,))
data_R = np.random.random((10242,))
pl = pv_plot_surface(
    (data_L, data_R),
    template="fsaverage5",
    surf="inflated",
    cmap="viridis",
    lighting_style="plastic",
    jupyter_backend="static",
)

Plot Parcellated Data (Shortcut)

python
from netneurotools.plotting import pv_plot_parcellated_data
import numpy as np

data = np.random.rand(400)
pl = pv_plot_parcellated_data(data, 'schaefer400x7', template='fsaverage')

Key Data Structures

StructureDescriptionFields
SURFACEnamedtuple for hemisphere file pairs.L, .R (left/right hemisphere paths)
sklearn.utils.BunchDict-like object returned by fetch functionsVaries per function
FREESURFER_IGNORELabels to ignore in FreeSurfer parcellations["unknown", "corpuscallosum", "Background+FreeSurfer_Defined_Medial_Wall"]
PARCIGNORELabels to ignore in parcellation operations["unknown", "corpuscallosum", "Background+FreeSurfer_Defined_Medial_Wall", "???", "Unknown", "Medial_wall", "Medial wall", "medial_wall"]

Core Modules Quick Reference

ModuleKey FunctionsPurpose
datasetsfetch_fsaverage, fetch_schaefer2018, fetch_cammoun2012, fetch_conte69, fetch_famous_gmatFetch templates, atlases, connectomes
metricsdistance_wei_floyd, navigation_wu, communicability_wei, search_information, mean_first_passage_time, assortativity_und, simulate_atrophyNetwork communication and properties
networksfunc_consensus, struct_consensus, match_length_degree_distribution, strength_preserving_rand_saBuild consensus, generate null models
statspermtest_pearsonr, efficient_pearsonr, residualize, get_dominance_statsStatistical testing and regression
spatialmorans_i, gearys_c, lees_l, local_morans_i, local_gearys_c, local_lees_lSpatial autocorrelation
modularityconsensus_modularity, find_consensus, zrand, get_modularityCommunity detection and evaluation
interfacevertices_to_parcels, parcels_to_vertices, load_surf_parc_file, deconstruct_ciftiFormat conversion
plottingpv_plot_surface, pv_plot_parcellated_data, pv_plot_subcortex, plot_mod_heatmapVisualization

Common Pitfalls

  1. SURFACE fields are .L and .R, not .lh and .rh. Use surface.L and surface.R to access hemisphere paths.

  2. Weight-to-distance conversion must be done before calling distance_wei_floyd or search_information. Common transform: D = -np.log(W / (np.max(W) + 1)).

  3. Minimum permutation p-value is 1 / (n_perm + 1). With n_perm=1000, the smallest p-value is ~0.001.

  4. consensus_modularity requires non-negative input. Louvain cannot handle negative weights. Set negatives to zero: A[A < 0] = 0.

  5. struct_consensus hemiid encoding: 0 = right hemisphere, 1 = left hemisphere.

  6. pv_plot_surface data format: When hemi='both', vertex_data can be a tuple (left, right) or a single concatenated array. Data length must match template vertex count.

  7. Data directory: All fetch functions default to ~/nnt-data. Override with data_dir= parameter or set NNT_DATA environment variable.

  8. match_length_degree_distribution recommended nswap: Use nswap = nnodes * 20 for adequate randomization.

  9. strength_preserving_rand_sa frac parameter must be between 0 and 1. It controls temperature decrease per annealing stage.

  10. parcels_to_vertices and vertices_to_parcels support .annot, .gii, and .dlabel.nii parcellation files. For .dlabel.nii, pass a single file path; for .annot or .gii, pass a tuple of (left, right) paths.

  11. Numba acceleration is available for spatial stats, weighted correlation, and some metrics. Install numba for significant speedups on large datasets.

  12. Headless rendering with PyVista: set os.environ["VTK_DEFAULT_OPENGL_WINDOW"] = "vtkOSOpenGLRenderWindow" before importing pyvista.

Tệp đi kèm

Khi kỹ năng đã được tải, mô hình có thể đọc các tệp này nếu cần. Các tệp này chỉ dùng để đọc và không bao giờ được thực thi.

Câu hỏi thường gặp

Kỹ năng AI Netneurotools Guide làm được gì?

Domain-validated guidance for network neuroscience analysis using netneurotools: datasets, brain network metrics, connectivity consensus, modularity, spatial statistics, null models, and cortical surface visualization. Use this skill whenever the user works with brain connectivity matrices, connectomes, graph theory on brain networks, parcellated brain data (Schaefer, Cammoun, Desikan-Killiany), cortical surface templates (fsaverage, fsLR, CIVET, Conte69), network communication metrics, null model generation, spatial autocorrelation on brain maps, community detection in connectomes, or surf...

Vì sao nên dùng Netneurotools Guide trên TypingMind?

Vì bạn chỉ cần cài một lần rồi dùng với bất kỳ mô hình nào. Netneurotools Guide là nội dung Markdown chứ không phải mã dành riêng cho từng nhà cung cấp, nên cùng một kỹ năng có thể chạy trên GPT-5, Claude, Gemini, Grok hoặc mô hình trên thiết bị — và bạn có thể đổi mô hình ngay trong cuộc trò chuyện mà kỹ năng vẫn hoạt động. TypingMind dùng khóa API riêng của bạn, nên bạn thanh toán trực tiếp cho nhà cung cấp thay vì trả phí thuê bao theo suất người dùng, đồng thời kỹ năng và các cuộc trò chuyện vẫn nằm trong bộ lưu trữ của bạn.

Làm thế nào để cài Netneurotools Guide trong TypingMind?

Mở Plugin → Kỹ năng → Cài đặt từ GitHub trong TypingMind rồi dán https://github.com/NeuroAIHub/BrainPilot/tree/main/packages/skills/skills/06_fMRI_Neuroimaging/netneurotools-guide. TypingMind đọc tệp SKILL.md, đóng gói các tệp đi kèm rồi cài đặt cả gói dưới dạng một kỹ năng mà bạn có thể bật cho từng cuộc trò chuyện.

Những mô hình AI nào có thể dùng Netneurotools Guide?

Bất kỳ mô hình nào bạn kết nối trong TypingMind. Kỹ năng AI là các hướng dẫn bằng Markdown chứ không phải mã dành riêng cho từng nhà cung cấp, nên GPT, Claude, Gemini, Grok và các mô hình chạy trên thiết bị đều có thể tải kỹ năng này khi có yêu cầu phù hợp.

Có thể dùng Netneurotools Guide với bao nhiêu mô hình AI?

Bao nhiêu cũng được. Miễn là mô hình hỗ trợ kỹ năng, bạn có thể dùng Netneurotools Guide với mô hình đó — GPT, Claude, Gemini, Grok, DeepSeek, Mistral, Llama và nhiều mô hình khác — tất cả đều trên TypingMind với khóa API riêng của bạn.

Kỹ năng AI Netneurotools Guide có miễn phí không?

Có. Kỹ năng này được NeuroAIHub phát hành trên GitHub theo giấy phép AGPL-3.0. Bạn chỉ trả tiền cho nhà cung cấp AI của mình theo số token đã dùng.

Kỹ năng AI là gì?

Kỹ năng AI là một gói hướng dẫn có thể tái sử dụng, chỉ cho mô hình AI cách thực hiện một tác vụ cụ thể. Kỹ năng tuân theo định dạng mở Agent Skills: một tệp SKILL.md chứa tên và mô tả, cùng các tập lệnh, mẫu hoặc tệp tham khảo mà mô hình có thể cần. Mô hình chỉ đọc hướng dẫn khi yêu cầu của bạn phù hợp với kỹ năng, nên kỹ năng đã cài đặt không phát sinh chi phí cho đến khi được sử dụng.

Kỹ năng AI khác gì với plugin hoặc máy chủ MCP?

Plugin hoặc máy chủ MCP cung cấp các công cụ mới mà mô hình có thể gọi. Khi mô hình gọi một công cụ, mã của công cụ đó chạy ở đâu đó và trả về kết quả. Còn kỹ năng AI cung cấp kiến thức và quy trình: cách tiếp cận tác vụ, các bước cần thực hiện và những tiêu chí mà kết quả cần đáp ứng. Kỹ năng chỉ là nội dung Markdown, nên không cần máy chủ, khóa API hay môi trường thực thi và hoạt động với mọi mô hình.

Xem tất cả

Tạo ngay không gian làm việc AI riêng

Đăng ký bản tin của chúng tôi để nhận thông báo về tính năng mới và các đợt tặng quà sắp tới 👇