← Về thư mục
📄 / / profiles / r-and-d / raw_evidence / OpenAI4S / skills / bioskills / bio-workflows-fastq-to-variants / references / usage-guide.md

FASTQ to Variants - Usage Guide

Overview

This workflow takes raw DNA sequencing FASTQ files to a filtered, normalized, and benchmarked set of germline variant calls (SNPs and indels). It is a chaining skill: it owns the pipeline-level decisions that only arise between steps -- the pipeline-wide reference-genome commitment, the defensible step order (normalize before annotate; filter site-level then genotype-level), engine and single-sample-vs-cohort selection, filtering strategy by cohort size, and stratified benchmarking -- and hands the mechanism of each step off to the variant-calling and read-alignment component skills.

Prerequisites

# CLI tools
conda install -c bioconda fastp bwa-mem2 samtools bcftools

# For GATK path
conda install -c bioconda gatk4

Quick Start

Tell your AI agent what you want to do: - "Call variants from my whole genome sequencing FASTQ files" - "Run the FASTQ to variants pipeline on my exome data" - "Which reference genome should I commit to before I start calling?" - "Benchmark my callset against GIAB truth"

Example Prompts

Starting from FASTQ

"I have FASTQ files for 5 samples, call variants jointly"

"Process my WGS data from raw reads to a normalized, filtered VCF"

"Use GATK HaplotypeCaller instead of bcftools"

Pipeline-level decisions

"Should I use the GRCh38 analysis set or T2T-CHM13 for this cohort?"

"Do I still need BQSR on NovaSeq data?"

"My cohort is 4 exomes -- should I use VQSR or hard filters?"

"In what order do I normalize, filter, and annotate?"

Benchmarking and QC

"Run hap.py against the HG002 truth set stratified by region"

"My Ti/Tv is 1.8 on an exome -- what is wrong?"

From alignment to variants

"I already have BAM files, just call and normalize variants"

"My BAMs are not duplicate-marked, process and call variants"

Input Requirements

Input Format Description
FASTQ files .fastq.gz Paired-end reads (R1 and R2 per sample)
Reference FASTA Reference genome (indexed for bwa-mem2)
Targets (optional) BED For exome/targeted sequencing
Known sites (GATK) VCF dbSNP for BQSR
Truth set (benchmarking) VCF + BED GIAB truth VCF and confident-region BED, only when the sample is a GIAB genome

What the Agent Will Do

  1. Confirm the pipeline-wide reference-genome commitment (GRCh38 analysis set vs T2T, ALT/decoy handling) before aligning anything
  2. Trim adapters and low-quality bases with fastp
  3. Align reads to the committed reference with bwa-mem2, adding read groups
  4. Sort, mark duplicates, and index BAM files (skipping BQSR where the instrument makes it optional)
  5. Call SNPs and indels per-sample, or per-sample gVCFs joint-genotyped for a cohort, with the engine chosen for the data
  6. Normalize the VCF (left-align, split multiallelics) against the same reference, before any annotation or comparison
  7. Filter site-level then genotype-level, with a strategy chosen by cohort size
  8. Annotate on the normalized representation, then benchmark stratified with hap.py/vcfeval and sanity-check Ti/Tv

Choosing an Engine and Cohort Mode

Engine selection is a pipeline-level decision handed to variant-calling/variant-calling: bcftools for exploratory/non-model/resource-limited work, GATK HaplotypeCaller for auditable open-source cohorts, DeepVariant for best indel/difficult-region accuracy, DRAGEN for maximum throughput. Single-sample vs cohort is a separate chaining decision: for a cohort, emit per-sample gVCFs and joint-genotype them (variant-calling/joint-calling) rather than merging single-sample VCFs.

Tips