Loading page...Загружаем страницу...正在加载页面...
AtlasRepo

Working with sequence files in BioseqDB and SeqKit

说明与用途

文章展示了如何使用 BioseqDB 将 UCSC Genome Browser 的序列直接存储并在 PostgreSQL 中分析,避免了中间文件。

问题

Need to perform sequence operations without exporting intermediate files, keeping DNA and metadata together.

结果

Successfully fetched and stored mitochondrial chromosome sequences in BioseqDB, enabling direct SQL analysis without intermediate files.

工作流

  • 1. Build BioseqDB with external API clients enabled via cmake flag BIOSEQ_BUILD_EXTERNAL_API_CLIENTS=ON.
  • 2. Install extension and create schema seqkit_lab.
  • 3. Create table genomes with columns assembly, species, seq using bioseq storage.
  • 4. Insert mitochondrial chromosome records for human, mouse, zebrafish from UCSC using INSERT ... SELECT from bioseq_external.sequences.
  • 5. Verify external_sequences_available is true and grant necessary permissions.
  • 6. Use SQL queries to perform length checks, base counting, motif finding, record selection, and name handling.
  • 7. Compare results with SeqKit 2.14.0 examples and FAQ tasks.

证据

Create a schema for this exercise and a table for the chromosome records: CREATE SCHEMA seqkit_lab; CREATE TABLE seqkit_lab.genomes ( assembly text NOT NULL, species text NOT NULL, seq bioseq.seq('dna5', 64) NOT NULL ) USING bioseq;

来源

INSERT INTO seqkit_lab.genomes (assembly, species, seq) SELECT 'hg38', 'human', sequence::bioseq.seq('dna5', 64) FROM bioseq_external.sequences WHERE provider = 'ucsc' AND assembly_database = 'hg38' AND chromosome = 'chrM' AND start0 = 0 AND end0 = 16569;

来源

Result · 1 row
external_sequences_available / boolean -------------------------------------- t

来源

  • 记录日期: 2026-10-19T18:41:43.223Z