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