变异注释与标识转换:参数与补充说明¶
用法和示例见功能教程。
各功能按作用、API、输入、输出、示例代码和结果说明介绍。运行前按说明准备凭据、本地文件与可选依赖;远程结果随数据库版本与查询时间变化。
各功能按作用、API、输入、输出、示例代码和结果说明介绍。运行前按说明准备凭据、本地文件与可选依赖;远程结果随数据库版本与查询时间变化。
查询 Ensembl 变异后果与完整注释¶
dnakit.databases.ensembl_var_get_variant_consequences(*, variant_id, species=None, verbose=True)
| 参数 | 类型 | 必填 / 默认值 | 说明与约束 |
|---|---|---|---|
variant_id |
string | 必填 | dbSNP rsID of the variant. Examples: 'rs429358' (APOE), 'rs7903146' (TCF7L2), 'rs1042779'. |
species |
string | None | Species name. Default 'human'. Examples: 'human', 'homo_sapiens'. |
verbose |
bool | True | 运行提示开关。 |
使用 HGVS 表达式进行 VEP 变异注释¶
dnakit.databases.ensembl_vep_annotate_hgvs(*, hgvs_notation, species=None, verbose=True)
| 参数 | 类型 | 必填 / 默认值 | 说明与约束 |
|---|---|---|---|
hgvs_notation |
string | 必填 | Variant in HGVS notation. Supports protein (p.), coding DNA (c.), and genomic (g.) notation. Examples: 'BRAF:p.Val600Glu', 'ENST00000366667:c.803C>T', 'NC_000007.14:g.140753336A>T'. |
species |
string | None | Species name. Default: 'human'. Other options: 'mouse', 'rat', 'zebrafish', etc. |
verbose |
bool | True | 运行提示开关。 |
使用 rsID 进行 VEP 变异注释¶
dnakit.databases.ensembl_vep_annotate_rsid(*, variant_id=None, rsid=None, rs_id=None, species=None, verbose=True)
| 参数 | 类型 | 必填 / 默认值 | 说明与约束 |
|---|---|---|---|
variant_id |
string | None | dbSNP rs identifier. Examples: 'rs7903146' (TCF7L2, type 2 diabetes), 'rs429358' (APOE, Alzheimer's), 'rs1801133' (MTHFR C677T). Aliases: rsid, rs_id. |
rsid |
string | None | Alias for variant_id. dbSNP rs identifier (e.g., 'rs7903146'). |
rs_id |
string | None | Alias for variant_id. dbSNP rs identifier (e.g., 'rs7903146'). |
species |
string | None | Species name. Default: 'human'. |
verbose |
bool | True | 运行提示开关。 |
按基因组位置进行 VEP 变异注释¶
dnakit.databases.ensembl_vep_region(*, species, region, allele=None, AncestralAllele=None, Blosum62=None, CADD=None, Conservation=None, DisGeNET=None, GeneSplicer=None, GO=None, LoF=None, MaxEntScan=None, Phenotypes=None, SIFT=None, PolyPhen=None, verbose=True)
| 参数 | 类型 | 必填 / 默认值 | 说明与约束 |
|---|---|---|---|
species |
string | 必填 | Species (e.g., 'human', 'homo_sapiens') |
region |
string | 必填 | Genomic region with variant (e.g., '21:25891796-25891796') |
allele |
string | None | VEP 区域变异的等位基因参数,遵循 Ensembl VEP 格式。 |
AncestralAllele |
integer | None | Include ancestral allele information |
Blosum62 |
integer | None | Include BLOSUM62 protein conservation score |
CADD |
integer | None | Include CADD scores |
Conservation |
integer | None | Include conservation scores |
DisGeNET |
integer | None | Include DisGeNET disease associations |
GeneSplicer |
integer | None | Include GeneSplicer predictions |
GO |
integer | None | Include Gene Ontology terms |
LoF |
integer | None | Include Loss-of-Function predictions |
MaxEntScan |
integer | None | Include MaxEntScan splice predictions |
Phenotypes |
integer | None | Include phenotype annotations |
SIFT |
string | None | SIFT prediction: p=prediction, s=score, b=both |
PolyPhen |
string | None | PolyPhen prediction: p=prediction, s=score, b=both |
verbose |
bool | True | 运行提示开关。 |
转换变异编号与 HGVS 表达形式¶
dnakit.databases.ensembl_vep_variant_recoder(*, variant_id, species=None, verbose=True)
| 参数 | 类型 | 必填 / 默认值 | 说明与约束 |
|---|---|---|---|
variant_id |
string | 必填 | Variant identifier to recode. Accepts: rsID (e.g., 'rs429358'), HGVS notation (e.g., 'AGT:c.803T>C'), SPDI (e.g., 'NC_000019.10:44908683:T:C'). |
species |
string | None | Species name. Default: 'human'. |
verbose |
bool | True | 运行提示开关。 |
获取 GRCh38 变异的综合功能注释¶
dnakit.databases.favor_annotate_variant(*, variant, verbose=True)
| 参数 | 类型 | 必填 / 默认值 | 说明与约束 |
|---|---|---|---|
variant |
string | 必填 | GRCh38 SNV/indel as chr-pos-ref-alt. Accepts '19-44908822-C-T', 'chr19:44908822:C:T', etc. |
verbose |
bool | True | 运行提示开关。 |
按 HGVS 或 rsID 查询综合变异注释¶
dnakit.databases.my_variant_get_variant_annotation(*, variant_id, fields=None, assembly=None, verbose=True)
| 参数 | 类型 | 必填 / 默认值 | 说明与约束 |
|---|---|---|---|
variant_id |
string | 必填 | HGVS variant ID (e.g., 'chr1:g.2186318G>A') or rsID (e.g., 'rs123'). An HGVS id must be expressed in the assembly given by the 'assembly' parameter. |
fields |
string | None | Fields to return. Useful fields: dbsnp, clinvar, cadd, gnomad_genome, gnomad_exome, dbnsfp (functional predictions). |
assembly |
string | None | Reference genome assembly for both the HGVS variant_id and the returned coordinates: 'hg19' (GRCh37, the default) or 'hg38' (GRCh38). |
verbose |
bool | True | 运行提示开关。 |
按基因、位置或临床意义检索变异¶
dnakit.databases.my_variant_query_variants(*, query=None, fields=None, size=None, assembly=None, variant_id=None, verbose=True)
| 参数 | 类型 | 必填 / 默认值 | 说明与约束 |
|---|---|---|---|
query |
string | None | Search query. Examples: 'rs58991260' (rsID), 'chr7:g.55249071G>A' (HGVS), 'clinvar.gene.symbol:BRCA1' (gene in ClinVar), 'cadd.phred:>30' (high CADD score). |
fields |
string | None | Comma-separated fields to return. Common: dbsnp, clinvar, cadd, gnomad_genome, dbnsfp. |
size |
integer | None | Maximum number of results (1-100). |
assembly |
string | None | Reference genome assembly for the coordinates in the query and in the results: 'hg19' (GRCh37, the default) or 'hg38' (GRCh38). |
variant_id |
string | None | DNAKit optional alias for query |
verbose |
bool | True | 运行提示开关。 |
校验并转换 HGVS 变异描述¶
dnakit.databases.variant_validator_validate_variant(*, genome_build, variant_description, select_transcripts, verbose=True)
| 参数 | 类型 | 必填 / 默认值 | 说明与约束 |
|---|---|---|---|
genome_build |
string | 必填 | Reference genome assembly: 'GRCh37' (hg19) or 'GRCh38' (hg38) |
variant_description |
string | 必填 | HGVS variant description (e.g., 'NM_007294.4:c.5266dup' for BRCA1 c.5266dupC, 'NM_000179.3:c.943C>T', 'chr17:g.43092919del') |
select_transcripts |
string | 必填 | Transcript to validate against (e.g., 'NM_007294.4'). Use 'all' to get all transcripts for a genomic variant. |
verbose |
bool | True | 运行提示开关。 |