ENCODE 实验与文件查询:参数与补充说明¶
用法和示例见功能教程。
各功能按作用、API、输入、输出、示例代码和结果说明介绍。运行前按说明准备凭据、本地文件与可选依赖;远程结果随数据库版本与查询时间变化。
ENCODE 接口返回文本:多数是 JSON,get_citations 可返回 BibTeX/RIS,export_data 可返回 CSV/TSV。仅 JSON 文本使用 json.loads()。追踪与凭据保存在 ~/.dnakit-encode/;持久化凭据功能需要 dnakit[encode-credentials]。
按编号查询 ENCODE 实验详情¶
dnakit.encode.get_experiment(accession, *, verbose=True)
| 参数 | 类型 | 必填 / 默认值 | 说明与约束 |
|---|---|---|---|
accession |
str | 必填 | ENCODE experiment accession (e.g., "ENCSR133RZO", "ENCSR000AKS") |
verbose |
bool | True | 是否显示 DNAKit 运行提示;不会改变返回值。 |
查询 ENCODE 筛选条件的实时记录数¶
dnakit.encode.get_facets(search_type='Experiment', assay_title=None, organism=None, organ=None, biosample_type=None, *, verbose=True)
| 参数 | 类型 | 必填 / 默认值 | 说明与约束 |
|---|---|---|---|
search_type |
str | 'Experiment' | Object type ("Experiment" or "File") |
assay_title |
str | None | None | Pre-filter by assay type |
organism |
str | None | None | Pre-filter by organism |
organ |
str | None | None | Pre-filter by organ |
biosample_type |
str | None | None | Pre-filter by biosample type |
verbose |
bool | True | 是否显示 DNAKit 运行提示;不会改变返回值。 |
查询 ENCODE 文件详情¶
dnakit.encode.get_file_info(accession, *, verbose=True)
| 参数 | 类型 | 必填 / 默认值 | 说明与约束 |
|---|---|---|---|
accession |
str | 必填 | File accession ID (e.g., "ENCFF635JIA") |
verbose |
bool | True | 是否显示 DNAKit 运行提示;不会改变返回值。 |
获取 ENCODE 检索可用的筛选值¶
dnakit.encode.get_metadata(metadata_type, *, verbose=True)
| 参数 | 类型 | 必填 / 默认值 | 说明与约束 |
|---|---|---|---|
metadata_type |
Literal['assays', 'organisms', 'organs', 'biosample_types', 'file_formats', 'output_types', 'output_categories', 'assemblies', 'life_stages', 'replication_types', 'statuses', 'file_statuses'] | 必填 | Type of metadata to retrieve. Options: - "assays": Available assay types (Histone ChIP-seq, ATAC-seq, total RNA-seq, etc.) - "organisms": Available organisms (Homo sapiens, Mus musculus, etc.) - "organs": Available organ/tissue systems (pancreas, brain, liver, etc.) - "biosample_types": Biosample classifications (tissue, cell line, primary cell, etc.) - "file_formats": File format types (fastq, bam, bed, bigWig, etc.) - "output_types": Output data types (reads, peaks, signal, etc.) - "output_categories": Output categories (raw data, alignment, signal, etc.) - "assemblies": Genome assemblies (GRCh38, hg19, mm10, etc.) - "life_stages": Life stages (embryonic, adult, child, etc.) - "replication_types": Replication types (isogenic, anisogenic, unreplicated) - "statuses": Experiment statuses (released, archived, etc.) - "file_statuses": File statuses (released, archived, in progress, etc.) |
verbose |
bool | True | 是否显示 DNAKit 运行提示;不会改变返回值。 |
列出指定 ENCODE 实验的文件¶
dnakit.encode.list_files(experiment_accession, file_format=None, file_type=None, output_type=None, output_category=None, assembly=None, status=None, preferred_default=None, limit=200, *, verbose=True)
| 参数 | 类型 | 必填 / 默认值 | 说明与约束 |
|---|---|---|---|
experiment_accession |
str | 必填 | ENCODE experiment accession (e.g., "ENCSR133RZO") |
file_format |
str | None | None | Filter by format ("fastq", "bam", "bed", "bigWig", "bigBed", etc.) |
file_type |
str | None | None | Filter by specific type ("bed narrowPeak", "bed broadPeak", etc.) |
output_type |
str | None | None | Filter by output type ("reads", "peaks", "signal", etc.) |
output_category |
str | None | None | Filter by category ("raw data", "alignment", "signal", "annotation") |
assembly |
str | None | None | Filter by genome assembly ("GRCh38", "hg19", "mm10") |
status |
str | None | None | Filter by status ("released", "archived", "in progress") |
preferred_default |
bool | None | None | If True, return only default/recommended files |
limit |
int | 200 | Max files to return (default 200) |
verbose |
bool | True | 是否显示 DNAKit 运行提示;不会改变返回值。 |
按实验条件检索 ENCODE 数据¶
dnakit.encode.search_experiments(assay_title=None, organism='Homo sapiens', organ=None, biosample_type=None, biosample_term_name=None, target=None, status='released', lab=None, award=None, assembly=None, replication_type=None, life_stage=None, sex=None, treatment=None, genetic_modification=None, perturbed=None, search_term=None, date_released_from=None, date_released_to=None, limit=25, offset=0, *, verbose=True)
| 参数 | 类型 | 必填 / 默认值 | 说明与约束 |
|---|---|---|---|
assay_title |
str | None | None | Assay type (e.g., "Histone ChIP-seq", "ATAC-seq", "total RNA-seq") |
organism |
str | 'Homo sapiens' | Species (default: "Homo sapiens"). Also: "Mus musculus" |
organ |
str | None | None | Organ/tissue system (e.g., "pancreas", "brain", "liver") |
biosample_type |
str | None | None | Sample classification ("tissue", "cell line", "primary cell", "organoid") |
biosample_term_name |
str | None | None | Specific cell/tissue name (e.g., "GM12878", "HepG2", "pancreas") |
target |
str | None | None | ChIP/CUT&RUN target (e.g., "H3K27me3", "CTCF", "p300") |
status |
str | 'released' | Data status (default: "released"). Also: "archived", "revoked" |
lab |
str | None | None | Submitting lab name |
award |
str | None | None | Funding project |
assembly |
str | None | None | Genome assembly (e.g., "GRCh38", "mm10") |
replication_type |
str | None | None | "isogenic", "anisogenic", or "unreplicated" |
life_stage |
str | None | None | "embryonic", "postnatal", "child", "adult" |
sex |
str | None | None | "male", "female", "mixed" |
treatment |
str | None | None | Treatment name if perturbation experiment |
genetic_modification |
str | None | None | Modification type ("CRISPR", "RNAi") |
perturbed |
bool | None | None | True for perturbation experiments only |
search_term |
str | None | None | Free text search across all fields |
date_released_from |
str | None | None | Start date (YYYY-MM-DD) for date range filter |
date_released_to |
str | None | None | End date (YYYY-MM-DD) for date range filter |
limit |
int | 25 | Max results to return (default 25, use larger for comprehensive searches) |
offset |
int | 0 | Skip first N results (for pagination) |
verbose |
bool | True | 是否显示 DNAKit 运行提示;不会改变返回值。 |
联合实验与文件条件检索 ENCODE 文件¶
dnakit.encode.search_files(file_format=None, file_type=None, output_type=None, output_category=None, assembly=None, assay_title=None, organism=None, organ=None, biosample_type=None, target=None, status='released', preferred_default=None, search_term=None, limit=25, offset=0, *, verbose=True)
| 参数 | 类型 | 必填 / 默认值 | 说明与约束 |
|---|---|---|---|
file_format |
str | None | None | File format ("fastq", "bam", "bed", "bigWig", etc.) |
file_type |
str | None | None | Specific file type ("bed narrowPeak", "bed broadPeak", etc.) |
output_type |
str | None | None | Output type ("reads", "peaks", "signal", etc.) |
output_category |
str | None | None | Output category ("raw data", "alignment", "signal", "annotation") |
assembly |
str | None | None | Genome assembly ("GRCh38", "hg19", "mm10") |
assay_title |
str | None | None | Filter by assay type of parent experiment |
organism |
str | None | None | Filter by organism of parent experiment |
organ |
str | None | None | Filter by organ of parent experiment |
biosample_type |
str | None | None | Filter by biosample type ("tissue", "cell line", etc.) |
target |
str | None | None | Filter by ChIP/CUT&RUN target |
status |
str | 'released' | File status (default: "released") |
preferred_default |
bool | None | None | If True, only default/recommended files |
search_term |
str | None | None | Free text search |
limit |
int | 25 | Max results (default 25) |
offset |
int | 0 | Skip first N results (pagination) |
verbose |
bool | True | 是否显示 DNAKit 运行提示;不会改变返回值。 |