fundamentals_skill

This skill helps you debug SAM/BAM, validate AGP coordinates, and troubleshoot sequencing data using common formats and quality metrics.
  • Shell

0

GitHub Stars

3

Bundled Files

2 months ago

Catalog Refreshed

4 months ago

First Indexed

Readme & install

Copy the install command, review bundled files from the catalogue, and read any extended description pulled from the listing source.

Installation

Preview and clipboard use veilstrat where the catalogue uses aiagentskills.

npx veilstrat add skill delphine-l/claude_global --skill fundamentals

  • common-issues.md15.4 KB
  • reference.md26.2 KB
  • SKILL.md46.8 KB

Overview

This skill provides core bioinformatics concepts and practical patterns for working with sequencing data, SAM/BAM files, AGP assembly formats, and common tools like samtools and bamtools. It focuses on preserving pair information, interpreting quality metrics (MAPQ, PHRED), and validating assembly coordinates to speed troubleshooting and pipeline development.

How this skill works

It explains what flags and fields in SAM/BAM represent, how region and flag filters interact, and which tool behaviors can break paired-end data. It outlines sequencing technology characteristics (HiFi, Hi-C, Illumina), typical mapper choices, and stepwise filtering patterns to produce reliable FASTQ/BAM outputs and correct AGP coordinate validation.

When to use it

  • Filtering or debugging paired-end BAM files (Hi-C, Illumina)
  • Extracting matching R1/R2 FASTQ files from BAM
  • Validating AGP assembly coordinates and object/component lengths
  • Interpreting MAPQ and CIGAR for alignment quality checks
  • Troubleshooting empty outputs after region filtering

Best practices

  • Always identify data type (paired vs single-end) before filtering
  • Apply proper-pair filters before region-based filters to avoid breaking pairs
  • Use mapper presets optimized for data: minimap2 map-hifi/map-pb for HiFi, BWA-MEM2 for short reads or Hi-C
  • Choose MAPQ thresholds appropriate to assay (looser for Hi-C, stricter for HiFi)
  • Validate outputs with samtools flagstat and read counts after each filtering step

Example use cases

  • Preserve Hi-C read pairs while extracting reads overlapping a set of scaffolds
  • Produce matched R1/R2 FASTQ from a BAM by requiring proper pairs before fastx extraction
  • Filter a BAM for high-confidence paired alignments for variant calling (MAPQ >= 30, remove secondary/supplementary)
  • Check AGP files to ensure object lengths and component coordinates sum and use 1-based closed coordinates
  • Diagnose low proper-pair rates by inspecting insert size distribution and aligner orientation settings

FAQ

Region filters check reads individually and can break pairs if mates map to distant loci. Apply proper-pair filtering first or use a paired-aware script to retain pairs when both mates are required.

How do I ensure R1 and R2 FASTQ files have identical read counts?

Require proper pairs during extraction (e.g., samtools fastx or samtools view -f 2) and avoid per-read region filtering that removes one mate.

Built by
VeilStrat
AI signals for GTM teams
© 2026 VeilStrat. All rights reserved.All systems operational