bio-read-qc-umi-processing
БесплатноЗапускает вложенные скриптыНе проверенExtract, process, and deduplicate reads using Unique Molecular Identifiers (UMIs) with umi_tools. Use when library prep includes UMIs and accurate molecule…
от FridrichMethod★ 17 звёзд на GitHubОб этом скилле
Version Compatibility
Reference examples tested with: pandas 2.2+, samtools 1.19+
Before using code patterns, verify installed versions match. If versions differ:
- Python:
pip show <package>thenhelp(module.function)to check signatures - CLI:
<tool> --versionthen<tool> --helpto confirm flags
If code throws ImportError, AttributeError, or TypeError, introspect the installed package and adapt the example to match the actual API rather than retrying.
UMI Processing
"Deduplicate reads using UMIs" → Extract UMI barcodes, group reads by UMI+position, and collapse PCR duplicates to count unique molecules.
- CLI:
umi_tools extract+umi_tools dedup(UMI-tools) - CLI:
fgbio GroupReadsByUmi+fgbio CallMolecularConsensusReads
UMIs (Unique Molecular Identifiers) are short random sequences added during library preparation to tag individual molecules before PCR amplification. This enables accurate PCR duplicate removal and molecule counting.
UMI Workflow Overview
Raw FASTQ with UMIs
|
v
[umi_tools extract] --> Move UMI to read header
|
v
[Alignment] --> bwa/STAR/bowtie2
|
v
[umi_tools dedup] --> Remove PCR duplicates based on UMI + position
|
v
Deduplicated BAM
Extract UMIs from Reads
UMI in Read Sequence
# UMI at start of R1 (8bp UMI)
umi_tools extract \
--stdin=R1.fastq.gz \
--read2-in=R2.fastq.gz \
--stdout=R1_extracted.fastq.gz \
--read2-out=R2_extracted.fastq.gz \
--bc-pattern=NNNNNNNN
# UMI at start of R2
umi_tools extract \
--stdin=R1.fastq.gz \
--read2-in=R2.fastq.gz \
--stdout=R1_extracted.fastq.gz \
--read2-out=R2_extracted.fastq.gz \
--bc-pattern2=NNNNNNNN
# UMI in both reads
umi_tools extract \
--stdin=R1.fastq.gz \
--read2-in=R2.fastq.gz \
--stdout=R1_extracted.fastq.gz \
--read2-out=R2_extracted.fastq.gz \
--bc-pattern=NNNNNNNN \
--bc-pattern2=NNNNNNNN
UMI Pattern Syntax
| Pattern | Meaning |
|---|---|
N |
UMI base (extracted) |
C |
Cell barcode (extracted, kept separate) |
X |
Discard base |
NNNNNNNN |
8bp UMI |
CCCCCCCCNNNNNNNN |
8bp cell barcode + 8bp UMI |
NNNXXXNNN |
3bp UMI, skip 3bp, 3bp UMI |
Complex Patterns
# 10X Genomics 3' v3 (16bp cell barcode + 12bp UMI in R1)
umi_tools extract \
--stdin=R1.fastq.gz \
--read2-in=R2.fastq.gz \
--stdout=R1_extracted.fastq.gz \
--read2-out=R2_extracted.fastq.gz \
--bc-pattern=CCCCCCCCCCCCCCCCNNNNNNNNNNNN
# Skip bases between barcode and UMI
umi_tools extract \
--stdin=R1.fastq.gz \
--stdout=R1_extracted.fastq.gz \
--bc-pattern=NNNNNNNNXXXX # 8bp UMI, skip 4bp
# Fixed anchor sequence
umi_tools extract \
--stdin=R1.fastq.gz \
--stdout=R1_extracted.fastq.gz \
--bc-pattern='(?P<umi_1>.{8})ATGC(?P<discard_1>.{4})'
UMI in Separate Index Read
# UMI in I1 index read
umi_tools extract \
--stdin=R1.fastq.gz \
--read2-in=R2.fastq.gz \
--stdout=R1_extracted.fastq.gz \
--read2-out=R2_extracted.fastq.gz \
--bc-pattern=NNNNNNNN \
--extract-method=string \
--umi-separator=":"
Quality Filtering During Extraction
# Filter by UMI quality
umi_tools extract \
--stdin=R1.fastq.gz \
--stdout=R1_extracted.fastq.gz \
--bc-pattern=NNNNNNNN \
--quality-filter-threshold=20 \
--quality-encoding=phred33
# Filter UMIs with N bases
umi_tools extract \
--stdin=R1.fastq.gz \
--stdout=R1_extracted.fastq.gz \
--bc-pattern=NNNNNNNN \
--filter-cell-barcode
Deduplication
Basic Deduplication
# Must be sorted and indexed first
samtools sort -o aligned_sorted.bam aligned.bam
samtools index aligned_sorted.bam
# Deduplicate
umi_tools dedup \
--stdin=aligned_sorted.bam \
--stdout=deduplicated.bam \
--log=dedup.log
Deduplication Methods
# Default: directional (recommended for most cases)
umi_tools dedup -I input.bam -S output.bam --method=directional
# Unique: only exact UMI matches (most stringent)
umi_tools dedup -I input.bam -S output.bam --method=unique
# Cluster: network-based clustering
umi_tools dedup -I input.bam -S output.bam --method=cluster
# Adjacency: cluster with adjacency
umi_tools dedup -I input.bam -S output.bam --method=adjacency
# Percentile: for highly duplicated data
umi_tools dedup -I input.bam -S output.bam --method=percentile
Method Selection Guide
| Method | Use Case | Speed |
|---|---|---|
directional |
Standard RNA-seq, most cases | Fast |
unique |
Very high diversity, PCR-free | Fastest |
cluster |
Low diversity, high errors | Slow |
adjacency |
Balance of accuracy/speed | Medium |
percentile |
Extremely high duplication | Fast |
Paired-End Deduplication
# Paired-end mode
umi_tools dedup \
-I aligned_sorted.bam \
-S deduplicated.bam \
--paired
# Use read2 for grouping (for R2-based libr
Установить bio-read-qc-umi-processing в Claude Code и Claude Desktop
Зарегайся, чтобы установить скилл
Создай бесплатный аккаунт, чтобы открыть команду установки и сохранить скилл в библиотеку.
- Открой команду установки в одну строку
- Сохраняй скиллы в синхронизируемую библиотеку
- Уведомления, когда скиллы обновляются
Разрешённые инструменты
Инструменты, которые скиллу разрешено вызывать.
Без ограничений — скилл может использовать любой инструмент.
Вложенные файлы
FAQ
Что делает скилл bio-read-qc-umi-processing?
Extract, process, and deduplicate reads using Unique Molecular Identifiers (UMIs) with umi_tools. Use when library prep includes UMIs and accurate molecule counting is needed, such as in single-cell RNA-seq, low-input RNA-seq, or targeted sequencing to distinguish PCR from biological duplicates.
Как установить скилл bio-read-qc-umi-processing?
Скопируй папку скилла в ~/.claude/skills (вкладка Claude Code выше делает это одной командой), либо поставь как плагин.
Скилл bio-read-qc-umi-processing запускает скрипты?
Да, скилл несёт исполняемые скрипты. Проверь исходник перед установкой.
Похожие скиллы
theme-factory
Toolkit for styling artifacts with a theme. These artifacts can be slides, docs, reportings, HTML landing pages, etc. There are 10 pre-set themes with…
от Anthropicaccess
Manage Discord channel access — approve pairings, edit allowlists, set DM/group policy. Use when the user asks to pair, approve someone, check who's allowed…
от Anthropicconfigure
Set up the Discord channel — save the bot token and review access policy. Use when the user pastes a Discord bot token, asks to configure Discord, asks "how…
от Anthropicaccess
Manage iMessage channel access — approve pairings, edit allowlists, set DM/group policy. Use when the user asks to pair, approve someone, check who's allowed…
от Anthropic