mcpField
G
gget

gget

github.com/crazymsn数据与数据库2336 次安装22 周前更新
代码仓库

关于 gget

gget 是用于查询基因组数据库并开展生物信息学分析的命令行工具和 Python 包。它以统一接口提供基因、序列、结构、表达及疾病相关功能。

主要功能

  1. 01查询基因组数据库中的基因数据
  2. 02获取参考基因组和序列
  3. 03执行 BLAST、BLAT 与序列比对
  4. 04访问蛋白质结构及预测
  5. 05查询表达和单细胞数据

适用场景

  1. 01查找基因标识符和元数据
  2. 02获取序列用于后续分析
  3. 03比对序列或定位基因组位置
  4. 04探索组织表达或单细胞数据集

安装

复制下面的命令,在终端中运行。

$npx skills add https://github.com/crazymsn/academic-skills --skill gget

安装后在 Claude Code 中输入/gget确认已加载。

包含的文件

除 SKILL.md 外,安装时一起下载的参考资料和脚本。

references/
database_info.md
module_reference.md
workflows.md
scripts/
batch_sequence_analysis.py
enrichment_pipeline.py
gene_analysis.py

详细介绍

gget

概述

gget 是一个命令行生物信息学工具和 Python 包,可统一访问 20 多个基因组数据库和分析方法。通过一致的接口查询基因信息、序列分析、蛋白质结构、表达数据和疾病关联信息。所有 gget 模块均可作为命令行工具和 Python 函数使用。

重要提示:gget 查询的数据库会持续更新,有时其结构也会发生变化。gget 模块每两周自动测试一次,并在必要时更新以适配新的数据库结构。

安装

在干净的虚拟环境中安装 gget,以避免冲突:

# Using uv (recommended)
uv uv pip install gget

# Or using pip
uv pip install --upgrade gget

# In Python/Jupyter
import gget

快速入门

所有模块的基本用法:

# Command-line
gget <module> [arguments] [options]

# Python
gget.module(arguments, options)

大多数模块返回:

  • 命令行:JSON(默认)或使用 -csv 标志返回 CSV
  • Python:DataFrame 或字典

各模块通用标志:

  • -o/--out:将结果保存到文件
  • -q/--quiet:隐藏进度信息
  • -csv:返回 CSV 格式(仅限命令行)

模块类别

1. 参考基因组与基因信息
gget ref - 参考基因组下载

获取 Ensembl 参考基因组的下载链接和元数据。

参数:

  • species:Genus_species 格式(例如 'homo_sapiens'、'mus_musculus')。快捷名称:'human'、'mouse'
  • -w/--which:指定返回类型(gtf、cdna、dna、cds、cdrna、pep)。默认:全部
  • -r/--release:Ensembl 发布版本号(默认:最新版本)
  • -l/--list_species:列出可用的脊椎动物物种
  • -liv/--list_iv_species:列出可用的无脊椎动物物种
  • -ftp:仅返回 FTP 链接
  • -d/--download:下载文件(需要 curl)

示例:

# List available species
gget ref --list_species

# Get all reference files for human
gget ref homo_sapiens

# Download only GTF annotation for mouse
gget ref -w gtf -d mouse
# Python
gget.ref("homo_sapiens")
gget.ref("mus_musculus", which="gtf", download=True)
gget search - 基因搜索

按名称或描述跨物种查找基因。

参数:

  • searchwords:一个或多个搜索词(不区分大小写)
  • -s/--species:目标物种(例如 'homo_sapiens'、'mouse')
  • -r/--release:Ensembl 发布版本号
  • -t/--id_type:返回 'gene'(默认)或 'transcript'
  • -ao/--andor:'or'(默认)查找任意搜索词;'and' 要求匹配所有搜索词
  • -l/--limit:返回结果的最大数量

返回:ensembl_id、gene_name、ensembl_description、ext_ref_description、biotype、URL

示例:

# Search for GABA-related genes in human
gget search -s human gaba gamma-aminobutyric

# Find specific gene, require all terms
gget search -s mouse -ao and pax7 transcription
# Python
gget.search(["gaba", "gamma-aminobutyric"], species="homo_sapiens")
gget info - 基因/转录本信息

从 Ensembl、UniProt 和 NCBI 获取全面的基因和转录本元数据。

参数:

  • ens_ids:一个或多个 Ensembl ID(也支持 WormBase、Flybase ID)。限制:约 1000 个 ID
  • -n/--ncbi:禁用 NCBI 数据检索
  • -u/--uniprot:禁用 UniProt 数据检索
  • -pdb:包含 PDB 标识符(会增加运行时间)

返回:UniProt ID、NCBI 基因 ID、主要基因名称、同义词、蛋白质名称、描述、biotype、典范转录本

示例:

# Get info for multiple genes
gget info ENSG00000034713 ENSG00000104853 ENSG00000170296

# Include PDB IDs
gget info ENSG00000034713 -pdb
# Python
gget.info(["ENSG00000034713", "ENSG00000104853"], pdb=True)
gget seq - 序列检索

获取基因和转录本的核苷酸或氨基酸序列。

参数:

  • ens_ids:一个或多个 Ensembl 标识符
  • -t/--translate:获取氨基酸序列,而非核苷酸序列
  • -iso/--isoforms:返回所有转录本变体(仅限基因 ID)

返回:FASTA 格式序列

示例:

# Get nucleotide sequences
gget seq ENSG00000034713 ENSG00000104853

# Get all protein isoforms
gget seq -t -iso ENSG00000034713
# Python
gget.seq(["ENSG00000034713"], translate=True, isoforms=True)
2. 序列分析与比对
gget blast - BLAST 搜索

将核苷酸或氨基酸序列与标准数据库进行 BLAST 比对。

参数:

  • sequence:序列字符串或 FASTA/.txt 文件路径
  • -p/--program:blastn、blastp、blastx、tblastn、tblastx(自动检测)
  • -db/--database:
    • 核苷酸:nt、refseq_rna、pdbnt
    • 蛋白质:nr、swissprot、pdbaa、refseq_protein
  • -l/--limit:最大命中数(默认:50)
  • -e/--expect:E-value 截止值(默认:10.0)
  • -lcf/--low_comp_filt:启用低复杂度过滤
  • -mbo/--megablast_off:禁用 MegaBLAST(仅限 blastn)

示例:

# BLAST protein sequence
gget blast MKWMFKEDHSLEHRCVESAKIRAKYPDRVPVIVEKVSGSQIVDIDKRKYLVPSDITVAQFMWIIRKRIQLPSEKAIFLFVDKTVPQSR

# BLAST from file with specific database
gget blast sequence.fasta -db swissprot -l 10
# Python
gget.blast("MKWMFK...", database="swissprot", limit=10)
gget blat - BLAT 搜索

使用 UCSC BLAT 定位序列的基因组位置。

参数:

  • sequence:序列字符串或 FASTA/.txt 文件路径
  • -st/--seqtype:'DNA'、'protein'、'translated%20RNA'、'translated%20DNA'(自动检测)
  • -a/--assembly:目标组装版本(默认:'human'/hg38;可选:'mouse'/mm39、'zebrafinch'/taeGut2 等)

返回:基因组、查询序列长度、比对位置、匹配数、不匹配数、比对百分比

示例:

# Find genomic location in human
gget blat ATCGATCGATCGATCG

# Search in different assembly
gget blat -a mm39 ATCGATCGATCGATCG
# Python
gget.blat("ATCGATCGATCGATCG", assembly="mouse")
gget muscle - 多序列比对

使用 Muscle5 比对多个核苷酸或氨基酸序列。

参数:

  • fasta:序列或 FASTA/.txt 文件路径
  • -s5/--super5:使用 Super5 算法加快处理(适用于大型数据集)

返回:ClustalW 格式的比对序列或比对后的 FASTA(.afa)

示例:

# Align sequences from file
gget muscle sequences.fasta -o aligned.afa

# Use Super5 for large dataset
gget muscle large_dataset.fasta -s5
# Python
gget.muscle("sequences.fasta", save=True)
gget diamond - 局部序列比对

使用 DIAMOND 快速进行局部蛋白质或翻译 DNA 比对。

参数:

  • 查询:序列(字符串/列表)或 FASTA 文件路径
  • --reference:参考序列(字符串/列表)或 FASTA 文件路径(必填)
  • --sensitivity:fast、mid-sensitive、sensitive、more-sensitive、very-sensitive(默认)、ultra-sensitive
  • --threads:CPU 线程数(默认:1)
  • --diamond_db:保存数据库以便重复使用
  • --translated:启用核苷酸到氨基酸的比对

返回:一致性百分比、序列长度、匹配位置、缺口开启数、E 值、位分数

示例:

# Align against reference
gget diamond GGETISAWESQME -ref reference.fasta --threads 4

# Save database for reuse
gget diamond query.fasta -ref ref.fasta --diamond_db my_db.dmnd
# Python
gget.diamond("GGETISAWESQME", reference="reference.fasta", threads=4)
3. 结构与蛋白质分析
gget pdb - 蛋白质结构

查询 RCSB 蛋白质数据库以获取结构和元数据。

参数:

  • pdb_id:PDB 标识符(例如,'7S7U')
  • -r/--resource:数据类型(pdb、entry、pubmed、assembly、entity types)
  • -i/--identifier:组装、实体或链 ID

返回:PDB 格式(结构)或 JSON(元数据)

示例:

# Download PDB structure
gget pdb 7S7U -o 7S7U.pdb

# Get metadata
gget pdb 7S7U -r entry
# Python
gget.pdb("7S7U", save=True)
gget alphafold - 蛋白质结构预测

使用简化版 AlphaFold2 预测蛋白质的 3D 结构。

需要设置:

# Install OpenMM first
uv pip install openmm

# Then setup AlphaFold
gget setup alphafold

参数:

  • sequence:氨基酸序列(字符串)、多个序列(列表)或 FASTA 文件。多个序列会触发多聚体建模
  • -mr/--multimer_recycles:循环迭代次数(默认:3;建议设为 20 以提高准确性)
  • -mfm/--multimer_for_monomer:将多聚体模型应用于单体蛋白质
  • -r/--relax:对排名最高的模型进行 AMBER 弛豫
  • plot:仅限 Python;生成交互式 3D 可视化(默认:True)
  • show_sidechains:仅限 Python;包含侧链(默认:True)

返回:PDB 结构文件、JSON 比对误差数据、可选的 3D 可视化

示例:

# Predict single protein structure
gget alphafold MKWMFKEDHSLEHRCVESAKIRAKYPDRVPVIVEKVSGSQIVDIDKRKYLVPSDITVAQFMWIIRKRIQLPSEKAIFLFVDKTVPQSR

# Predict multimer with higher accuracy
gget alphafold sequence1.fasta -mr 20 -r
# Python with visualization
gget.alphafold("MKWMFK...", plot=True, show_sidechains=True)

# Multimer prediction
gget.alphafold(["sequence1", "sequence2"], multimer_recycles=20)
gget elm - 真核线性基序

预测蛋白质序列中的真核线性基序。

需要设置:

gget setup elm

参数:

  • sequence:氨基酸序列或 UniProt Acc
  • -u/--uniprot:表示序列为 UniProt Acc
  • -e/--expand:包含蛋白质名称、物种和参考文献
  • -s/--sensitivity:DIAMOND 比对灵敏度(默认:"very-sensitive")
  • -t/--threads:线程数(默认:1)

返回:两个输出:

  1. ortholog_df:来自直系同源蛋白质的线性基序
  2. regex_df:与输入序列直接匹配的基序

示例:

# Predict motifs from sequence
gget elm LIAQSIGQASFV -o results

# Use UniProt accession with expanded info
gget elm --uniprot Q02410 -e
# Python
ortholog_df, regex_df = gget.elm("LIAQSIGQASFV")
4. 表达与疾病数据
gget archs4 - 基因相关性与组织表达

查询 ARCHS4 数据库以获取相关基因或组织表达数据。

参数:

  • gene:基因符号或 Ensembl ID(使用 --ensembl 标志)
  • -w/--which:'correlation'(默认,返回相关性最高的 100 个基因)或 'tissue'(表达图谱)
  • -s/--species:'human'(默认)或 'mouse'(仅限组织数据)
  • -e/--ensembl:输入为 Ensembl ID

返回:

  • 相关性模式:基因符号、Pearson 相关系数
  • 组织模式:组织标识符、表达值的最小值/Q1/中位数/Q3/最大值

示例:

# Get correlated genes
gget archs4 ACE2

# Get tissue expression
gget archs4 -w tissue ACE2
# Python
gget.archs4("ACE2", which="tissue")
gget cellxgene - 单细胞 RNA-seq 数据

查询 CZ CELLxGENE Discover Census 的单细胞数据。

所需设置:

gget setup cellxgene

参数:

  • --gene (-g):基因名称或 Ensembl ID(区分大小写!人类使用 'PAX7',小鼠使用 'Pax7')
  • --tissue:组织类型
  • --cell_type:特定细胞类型
  • --species (-s):'homo_sapiens'(默认)或 'mus_musculus'
  • --census_version (-cv):版本("stable"、"latest" 或日期)
  • --ensembl (-e):使用 Ensembl ID
  • --meta_only (-mo):仅返回元数据
  • 其他筛选条件:disease、development_stage、sex、assay、dataset_id、donor_id、ethnicity、suspension_type

返回值:包含计数矩阵和元数据的 AnnData 对象(或仅含元数据的数据框)

示例:

# Get single-cell data for specific genes and cell types
gget cellxgene --gene ACE2 ABCA1 --tissue lung --cell_type "mucus secreting cell" -o lung_data.h5ad

# Metadata only
gget cellxgene --gene PAX7 --tissue muscle --meta_only -o metadata.csv
# Python
adata = gget.cellxgene(gene=["ACE2", "ABCA1"], tissue="lung", cell_type="mucus secreting cell")
gget enrichr - 富集分析

使用 Enrichr 对基因列表执行本体富集分析。

参数:

  • genes:基因符号或 Ensembl ID
  • -db/--database:参考数据库(支持快捷选项:'pathway'、'transcription'、'ontology'、'diseases_drugs'、'celltypes')
  • -s/--species:human(默认)、mouse、fly、yeast、worm、fish
  • -bkg_l/--background_list:用于比较的背景基因
  • -ko/--kegg_out:保存带有高亮基因的 KEGG 通路图像
  • plot:仅限 Python;生成图形结果

数据库快捷选项:

  • 'pathway' → KEGG_2021_Human
  • 'transcription' → ChEA_2016
  • 'ontology' → GO_Biological_Process_2021
  • 'diseases_drugs' → GWAS_Catalog_2019
  • 'celltypes' → PanglaoDB_Augmented_2021

示例:

# Enrichment analysis for ontology
gget enrichr -db ontology ACE2 AGT AGTR1

# Save KEGG pathways
gget enrichr -db pathway ACE2 AGT AGTR1 -ko ./kegg_images/
# Python with plot
gget.enrichr(["ACE2", "AGT", "AGTR1"], database="ontology", plot=True)
gget bgee - 直系同源关系与表达

从 Bgee 数据库获取直系同源关系和基因表达数据。

参数:

  • ens_id:Ensembl 基因 ID 或 NCBI 基因 ID(适用于非 Ensembl 物种)。当 type=expression 时支持多个 ID
  • -t/--type:'orthologs'(默认)或 'expression'

返回值:

  • Orthologs 模式:跨物种匹配的基因及其 ID、名称和分类信息
  • Expression 模式:解剖实体、置信度分数和表达状态

示例:

# Get orthologs
gget bgee ENSG00000169194

# Get expression data
gget bgee ENSG00000169194 -t expression

# Multiple genes
gget bgee ENSBTAG00000047356 ENSBTAG00000018317 -t expression
# Python
gget.bgee("ENSG00000169194", type="orthologs")
gget opentargets - 疾病与药物关联

从 OpenTargets 获取疾病和药物关联信息。

参数:

  • Ensembl 基因 ID(必填)
  • -r/--resource:diseases(默认)、drugs、tractability、pharmacogenetics、expression、depmap、interactions
  • -l/--limit:限制结果数量
  • 筛选参数(因资源而异):
    • drugs:--filter_disease
    • pharmacogenetics:--filter_drug
    • expression/depmap:--filter_tissue、--filter_anat_sys、--filter_organ
    • interactions:--filter_protein_a、--filter_protein_b、--filter_gene_b

示例:

# Get associated diseases
gget opentargets ENSG00000169194 -r diseases -l 5

# Get associated drugs
gget opentargets ENSG00000169194 -r drugs -l 10

# Get tissue expression
gget opentargets ENSG00000169194 -r expression --filter_tissue brain
# Python
gget.opentargets("ENSG00000169194", resource="diseases", limit=5)
gget cbio - cBioPortal 癌症基因组学

使用 cBioPortal 数据绘制癌症基因组学热图。

两个子命令:

search - 查找研究 ID:

gget cbio search breast lung

plot - 生成热图:

参数:

  • -s/--study_ids:以空格分隔的 cBioPortal 研究 ID(必填)
  • -g/--genes:以空格分隔的基因名称或 Ensembl ID(必填)
  • -st/--stratification:用于组织数据的列(tissue、cancer_type、cancer_type_detailed、study_id、sample)
  • -vt/--variation_type:数据类型(mutation_occurrences、cna_nonbinary、sv_occurrences、cna_occurrences、Consequence)
  • -f/--filter:按列值筛选(例如,'study_id:msk_impact_2017')
  • -dd/--data_dir:缓存目录(默认:./gget_cbio_cache)
  • -fd/--figure_dir:输出目录(默认:./gget_cbio_figures)
  • -dpi:分辨率(默认:100)
  • -sh/--show:在窗口中显示图表
  • -nc/--no_confirm:跳过下载确认

示例:

# Search for studies
gget cbio search esophag ovary

# Create heatmap
gget cbio plot -s msk_impact_2017 -g AKT1 ALK BRAF -st tissue -vt mutation_occurrences
# Python
gget.cbio_search(["esophag", "ovary"])
gget.cbio_plot(["msk_impact_2017"], ["AKT1", "ALK"], stratification="tissue")
gget cosmic - COSMIC 数据库

搜索 COSMIC(Catalogue Of Somatic Mutations In Cancer)数据库。

重要:商业用途需支付许可费。需要 COSMIC 账户凭据。

参数:

  • searchterm:基因名称、Ensembl ID、突变表示法或样本 ID
  • -ctp/--cosmic_tsv_path:已下载的 COSMIC TSV 文件路径(查询时必需)
  • -l/--limit:最大结果数(默认:100)

数据库下载标志:

  • -d/--download_cosmic:启用下载模式
  • -gm/--gget_mutate:创建供 gget mutate 使用的版本
  • -cp/--cosmic_project:数据库类型(cancer、census、cell_line、resistance、genome_screen、targeted_screen)
  • -cv/--cosmic_version:COSMIC 版本
  • -gv/--grch_version:人类参考基因组(37 或 38)
  • --email、--password:COSMIC 凭据

示例:

# First download database
gget cosmic -d --email [email protected] --password xxx -cp cancer

# Then query
gget cosmic EGFR -ctp cosmic_data.tsv -l 10
# Python
gget.cosmic("EGFR", cosmic_tsv_path="cosmic_data.tsv", limit=10)
5. 其他工具
gget mutate - 生成突变序列

根据突变注释生成突变核苷酸序列。

参数:

  • sequences:FASTA 文件路径或直接输入的序列(字符串/列表)
  • -m/--mutations:包含突变数据的 CSV/TSV 文件或 DataFrame(必需)
  • -mc/--mut_column:突变列名称(默认:'mutation')
  • -sic/--seq_id_column:序列 ID 列名称(默认:'seq_ID')
  • -mic/--mut_id_column:突变 ID 列名称
  • -k/--k:侧翼序列长度(默认:30 个核苷酸)

返回:FASTA 格式的突变序列

示例:

# Single mutation
gget mutate ATCGCTAAGCT -m "c.4G>T"

# Multiple sequences with mutations from file
gget mutate sequences.fasta -m mutations.csv -o mutated.fasta
# Python
import pandas as pd
mutations_df = pd.DataFrame({"seq_ID": ["seq1"], "mutation": ["c.4G>T"]})
gget.mutate(["ATCGCTAAGCT"], mutations=mutations_df)
gget gpt - OpenAI 文本生成

使用 OpenAI API 生成自然语言文本。

需要进行设置:

gget setup gpt

重要:免费套餐仅在创建账户后的 3 个月内有效。请设置每月账单限额。

参数:

  • prompt:用于生成文本的输入(必需)
  • api_key:OpenAI 身份验证(必需)
  • 模型配置:temperature、top_p、max_tokens、frequency_penalty、presence_penalty
  • 默认模型:gpt-3.5-turbo(可配置)

示例:

gget gpt "Explain CRISPR" --api_key your_key_here
# Python
gget.gpt("Explain CRISPR", api_key="your_key_here")
gget setup - 安装依赖项

为特定模块安装/下载第三方依赖项。

参数:

  • module:需要安装依赖项的模块名称
  • -o/--out:输出文件夹路径(仅适用于 elm 模块)

需要设置的模块:

  • alphafold - 下载约 4GB 的模型参数
  • cellxgene - 安装 cellxgene-census(可能不支持最新的 Python)
  • elm - 下载本地 ELM 数据库
  • gpt - 配置 OpenAI 集成

示例:

# Setup AlphaFold
gget setup alphafold

# Setup ELM with custom directory
gget setup elm -o /path/to/elm_data
# Python
gget.setup("alphafold")

常见工作流

工作流 1:从基因发现到序列分析

查找并分析感兴趣的基因:

# 1. Search for genes
results = gget.search(["GABA", "receptor"], species="homo_sapiens")

# 2. Get detailed information
gene_ids = results["ensembl_id"].tolist()
info = gget.info(gene_ids[:5])

# 3. Retrieve sequences
sequences = gget.seq(gene_ids[:5], translate=True)
工作流 2:序列比对和结构分析

比对序列并预测结构:

# 1. Align multiple sequences
alignment = gget.muscle("sequences.fasta")

# 2. Find similar sequences
blast_results = gget.blast(my_sequence, database="swissprot", limit=10)

# 3. Predict structure
structure = gget.alphafold(my_sequence, plot=True)

# 4. Find linear motifs
ortholog_df, regex_df = gget.elm(my_sequence)
工作流 3:基因表达和富集分析

分析表达模式和功能富集:

# 1. Get tissue expression
tissue_expr = gget.archs4("ACE2", which="tissue")

# 2. Find correlated genes
correlated = gget.archs4("ACE2", which="correlation")

# 3. Get single-cell data
adata = gget.cellxgene(gene=["ACE2"], tissue="lung", cell_type="epithelial cell")

# 4. Perform enrichment analysis
gene_list = correlated["gene_symbol"].tolist()[:50]
enrichment = gget.enrichr(gene_list, database="ontology", plot=True)
工作流 4:疾病和药物分析

调查疾病关联和治疗靶点:

# 1. Search for genes
genes = gget.search(["breast cancer"], species="homo_sapiens")

# 2. Get disease associations
diseases = gget.opentargets("ENSG00000169194", resource="diseases")

# 3. Get drug associations
drugs = gget.opentargets("ENSG00000169194", resource="drugs")

# 4. Query cancer genomics data
study_ids = gget.cbio_search(["breast"])
gget.cbio_plot(study_ids[:2], ["BRCA1", "BRCA2"], stratification="cancer_type")

# 5. Search COSMIC for mutations
cosmic_results = gget.cosmic("BRCA1", cosmic_tsv_path="cosmic.tsv")
工作流 5:比较基因组学

比较不同物种中的蛋白质:

# 1. Get orthologs
orthologs = gget.bgee("ENSG00000169194", type="orthologs")

# 2. Get sequences for comparison
human_seq = gget.seq("ENSG00000169194", translate=True)
mouse_seq = gget.seq("ENSMUSG00000026091", translate=True)

# 3. Align sequences
alignment = gget.muscle([human_seq, mouse_seq])

# 4. Compare structures
human_structure = gget.pdb("7S7U")
mouse_structure = gget.alphafold(mouse_seq)
工作流 6:构建参考索引

为下游分析准备参考数据(例如 kallisto|bustools):

# 1. List available species
gget ref --list_species

# 2. Download reference files
gget ref -w gtf -w cdna -d homo_sapiens

# 3. Build kallisto index
kallisto index -i transcriptome.idx transcriptome.fasta

# 4. Download genome for alignment
gget ref -w dna -d homo_sapiens

最佳实践

数据检索
  • 使用 --limit 控制大型查询的结果数量
  • 使用 -o/--out 保存结果,以便复现
  • 检查数据库版本/发行版,确保不同分析之间保持一致
  • 在生产脚本中使用 --quiet 以减少输出
序列分析
  • 使用 BLAST/BLAT 时,先采用默认参数,再调整灵敏度
  • 使用 gget diamond 搭配 --threads,加快本地比对
  • 使用 --diamond_db 保存 DIAMOND 数据库,以便重复查询
  • 进行多序列比对时,大型数据集请使用 -s5/--super5
表达和疾病数据
  • 在 cellxgene 中,基因符号区分大小写(例如,'PAX7' 与 'Pax7')
  • 首次使用 alphafold、cellxgene、elm、gpt 前,先运行 gget setup
  • 进行富集分析时,使用数据库快捷方式以提高便利性
  • 使用 -dd 缓存 cBioPortal 数据,避免重复下载
结构预测
  • AlphaFold 多聚体预测:使用 -mr 20 以提高准确性
  • 使用 -r 标志对最终结构进行 AMBER 松弛
  • 在 Python 中通过 plot=True 可视化结果
  • 运行 AlphaFold 预测前,先检查 PDB 数据库
错误处理
  • 数据库结构会发生变化;定期更新 gget:uv pip install --upgrade gget
  • 使用 gget info 时,每次最多处理约 1000 个 Ensembl ID
  • 对于大规模分析,为 API 查询实现速率限制
  • 使用虚拟环境以避免依赖冲突

输出格式

命令行
  • 默认:JSON
  • CSV:添加 -csv 标志
  • FASTA:gget seq、gget mutate
  • PDB:gget pdb、gget alphafold
  • PNG:gget cbio plot
Python
  • 默认:DataFrame 或字典
  • JSON:添加 json=True 参数
  • 保存到文件:添加 save=True 或指定 out="filename"
  • AnnData:gget cellxgene

资源

此技能包含参考文档,提供详细的模块信息:

references/
  • module_reference.md - 所有模块的完整参数参考
  • database_info.md - 有关所查询数据库及其更新频率的信息
  • workflows.md - 扩展工作流示例和用例

如需更多帮助:

评论

支持 Markdown