Logo van Fastq Analysis Pipeline

Fastq Analysis Pipeline

Organisatie
omicverse
fastq-analysis-pipeline

Guide through omicverse's alignment module for SRA downloading, FASTQ quality control, STAR alignment, gene quantification, and single-cell kallisto/bustools pipelines covering both bulk and single-cell RNA-seq workflows.

Overzicht

Uitgeveromicverse
Repositoryomicclaw
Skillnaamfastq-analysis-pipeline
Sterren
33
Forks
5
Meegeleverde bestanden
1
LicentieGPL-3.0
Links
  • Instructies in Markdown

    Het model laadt het bestand SKILL.md alleen als dat nodig is. Dat kost dus alleen tokens als een verzoek daadwerkelijk bij de skill past.

  • Werkt met elk LLM

    AI-skills bestaan uit instructies in gewone Markdown, niet uit aanbiederspecifieke code. Daardoor werken ze met GPT, Claude, Gemini, Grok of een lokaal model.

  • Meegeleverde bestanden: 1

    Scripts, sjablonen en referentiemateriaal die het model tijdens het werken kan lezen. De bestanden kunnen alleen worden gelezen en worden nooit uitgevoerd.

  • Open source

    Gepubliceerd door omicverse op GitHub. Bekijk de bronbestanden voordat je de skill installeert.

Installatie

Installeer de AI-skill Fastq Analysis Pipeline in TypingMind om deze met elk LLM te gebruiken, of voeg de skill toe aan een andere agent die SKILL.md kan lezen.

1

Installeren in TypingMind

TypingMind installeert een skill rechtstreeks vanuit de GitHub-map. De app leest SKILL.md, bundelt de bijbehorende bestanden en slaat het resultaat lokaal op.

  1. Open de app en ga naar Plug-ins → Skills.
  2. Kies "Installeren via GitHub".
  3. Plak de onderstaande URL van de skillmap en bevestig.
    https://github.com/omicverse/omicclaw/tree/main/src/omicverse_skills/skills/fastq-analysis
  4. Schakel de skill in voor elke chat waarin je de skill wilt kunnen gebruiken.
Plug-ins → Skills → Skill toevoegen → Via GitHub-URL. Plak vervolgens de map-URL en druk op Doorgaan.
2

Installeren in een andere agent

Elke agent die het Agent Skills-formaat kan lezen, kan deze skill gebruiken — kopieer de map naar de skillmap van die agent.

Claude Code — .claude/skills
git clone --depth 1 https://github.com/omicverse/omicclaw.git /tmp/omicclaw
mkdir -p .claude/skills
cp -r /tmp/omicclaw/src/omicverse_skills/skills/fastq-analysis .claude/skills/fastq-analysis-pipeline
Start Claude Code na het kopiëren opnieuw op, zodat de nieuwe skill wordt herkend.

Gebruik deze skill in TypingMind

Schakel Fastq Analysis Pipeline in voor een chat naar keuze in TypingMind en het model doet de rest. De naam en beschrijving staan in de systeemprompt. Zodra een verzoek bij de skill past, laadt het model zelf de volledige instructies. Je hoeft de skill nooit handmatig aan te roepen. Pas als het model de skill daadwerkelijk gebruikt, kost dat tokens.

Het model laadt Fastq Analysis Pipeline automatisch zodra een verzoek erbij past.

Werkt met elk AI-model

AI-skills zijn gewone Markdown-instructies in plaats van aanbiederspecifieke code. Daardoor is Fastq Analysis Pipeline niet gebonden aan het model waarvoor de skill is geschreven. Installeer de skill één keer in TypingMind en gebruik deze met GPT-5, Claude, Gemini, Grok, DeepSeek, Mistral, Llama of een lokaal model dat je zelf draait — allemaal met je eigen API-sleutels.

  • Alleen geladen wanneer nodig

    De systeemprompt bevat alleen de naam en beschrijving. De instructies worden bij het eerste bijpassende verzoek opgehaald, dus een ongebruikte skill kost niets.

  • Wissel van model tijdens een chat

    Omdat de skill uit instructies bestaat en niet uit code, blijft deze werken als je van model wisselt — het volgende model leest hetzelfde SKILL.md-bestand.

Skillinstructies

Dit is de inhoud van SKILL.md die het model laadt. Lees deze vóór de installatie — een skill bestaat uit instructies die je model zal volgen.

Overview

OmicVerse provides a complete FASTQ-to-count-matrix pipeline via the ov.alignment module. This skill covers:

  • SRA data acquisition: prefetch and fqdump (fasterq-dump wrapper)
  • Quality control: fastp for adapter trimming and QC reports
  • RNA-seq alignment: STAR aligner with auto-index building
  • Gene quantification: featureCount (subread featureCounts wrapper)
  • Single-cell path: ref and count via kb-python (kallisto/bustools)
  • Parallel SRA download: parallel_fastq_dump

All functions share a common CLI infrastructure (_cli_utils.py) that handles tool resolution, auto-installation via conda/mamba, parallel execution, and streaming output.

Instructions

  1. Environment setup

    • Bioinformatics tools are resolved automatically from PATH or the active conda environment.
    • If auto_install=True (default), missing tools are installed via mamba/conda on demand.
    • Supported tools: prefetch, vdb-validate, fasterq-dump, fastp, STAR, samtools, featureCounts, pigz, gzip.
    • For the single-cell path, ensure kb-python is installed: pip install kb-python.
  2. SRA data download (ov.alignment.prefetch + ov.alignment.fqdump)

    • Use prefetch first for reliable downloads with integrity validation (vdb-validate).
    • Then convert to FASTQ with fqdump. It auto-detects single-end vs paired-end.
    • fqdump can also work directly from SRR accessions without prefetch.
    • Both support retry with exponential backoff for network errors.
    python
    import omicverse as ov
    
    # Step 1: Prefetch SRA files (optional but recommended)
    pre = ov.alignment.prefetch(['SRR1234567', 'SRR1234568'], output_dir='prefetch', jobs=4)
    
    # Step 2: Convert to FASTQ
    fq = ov.alignment.fqdump(['SRR1234567', 'SRR1234568'],
                              output_dir='fastq', sra_dir='prefetch',
                              gzip=True, threads=8, jobs=4)
  3. FASTQ quality control (ov.alignment.fastp)

    • Runs fastp for adapter trimming, quality filtering, and QC reporting.
    • Supports single-end and paired-end reads.
    • Produces per-sample JSON and HTML QC reports.
    • Sample format: tuple of (sample_name, fq1_path, fq2_path_or_None).
    python
    samples = [
        ('S1', 'fastq/SRR1234567/SRR1234567_1.fastq.gz', 'fastq/SRR1234567/SRR1234567_2.fastq.gz'),
        ('S2', 'fastq/SRR1234568/SRR1234568_1.fastq.gz', 'fastq/SRR1234568/SRR1234568_2.fastq.gz'),
    ]
    clean = ov.alignment.fastp(samples, output_dir='fastp', threads=8, jobs=2)
  4. STAR alignment (ov.alignment.STAR)

    • Aligns FASTQ reads using the STAR aligner.
    • Auto-index building: set auto_index=True (default) with genome_fasta_files and gtf to build index automatically if missing.
    • Produces coordinate-sorted BAM files.
    • Handles gzip-compressed FASTQs automatically (uses pigz/gzip/zcat).
    • Use strict=False (default) for graceful error handling per sample.
    python
    # Prepare samples from fastp output
    star_samples = [
        ('S1', 'fastp/S1/S1_clean_1.fastq.gz', 'fastp/S1/S1_clean_2.fastq.gz'),
        ('S2', 'fastp/S2/S2_clean_1.fastq.gz', 'fastp/S2/S2_clean_2.fastq.gz'),
    ]
    bams = ov.alignment.STAR(
        star_samples,
        genome_dir='star_index',
        output_dir='star_out',
        gtf='genes.gtf',
        genome_fasta_files=['genome.fa'],
        threads=8,
        memory='50G',
    )
  5. Gene quantification (ov.alignment.featureCount)

    • Counts aligned reads per gene using featureCounts (subread).
    • Auto-detects paired-end from BAM headers (via pysam or samtools).
    • auto_fix=True (default) retries with corrected paired-end flag on error.
    • gene_mapping=True maps gene_id to gene_name from the GTF.
    • merge_matrix=True produces a combined count matrix across all samples.
    python
    bam_items = [
        ('S1', 'star_out/S1/Aligned.sortedByCoord.out.bam'),
        ('S2', 'star_out/S2/Aligned.sortedByCoord.out.bam'),
    ]
    counts = ov.alignment.featureCount(
        bam_items,
        gtf='genes.gtf',
        output_dir='counts',
        gene_mapping=True,
        merge_matrix=True,
        threads=8,
    )
    # counts is a pandas DataFrame (gene_id x samples)
  6. Single-cell path (ov.alignment.ref + ov.alignment.count)

    • Uses kb-python (kallisto + bustools) for single-cell RNA-seq quantification.
    • ref() builds a kallisto index and transcript-to-gene mapping.
    • count() quantifies single-cell data with barcode/UMI handling.
    • Supports technologies: 10XV2, 10XV3, BULK, and custom.
    • Output formats: h5ad, loom, cellranger MTX.
    python
    # Build reference index
    ref_result = ov.alignment.ref(
        index_path='kb_ref/index.idx',
        t2g_path='kb_ref/t2g.txt',
        fasta_paths=['genome.fa'],
        gtf_paths=['genes.gtf'],
        threads=8,
    )
    
    # Quantify 10x v3 data
    count_result = ov.alignment.count(
        index_path='kb_ref/index.idx',
        t2g_path='kb_ref/t2g.txt',
        technology='10XV3',
        fastq_paths=['sample_R1.fastq.gz', 'sample_R2.fastq.gz'],
        output_path='kb_out',
        h5ad=True,
        filter_barcodes=True,
        threads=8,
    )
  7. Wiring fastp output into STAR input

    • fastp output is a list of dicts with keys: sample, clean1, clean2, json, html.
    • Convert to STAR sample tuples:
    python
    star_samples = [
        (r['sample'], r['clean1'], r['clean2'] if r['clean2'] else None)
        for r in (clean if isinstance(clean, list) else [clean])
    ]
  8. Wiring STAR output into featureCount input

    • STAR output is a list of dicts with keys: sample, bam (or error).
    • Convert to featureCount items:
    python
    bam_items = [
        (r['sample'], r['bam'])
        for r in (bams if isinstance(bams, list) else [bams])
        if 'bam' in r
    ]
  9. Skipping completed steps

    • All functions check for existing outputs and skip if overwrite=False (default).
    • Set overwrite=True to force re-execution.
  10. Troubleshooting

    • If a tool is not found, check auto_install=True and that conda/mamba is accessible.
    • For STAR index errors, ensure genome_fasta_files points to uncompressed or gzip FASTA files.
    • For featureCounts paired-end detection errors, auto_fix=True handles most cases automatically.
    • GTF files can be gzip-compressed; they are auto-decompressed as needed.

Critical API Reference

Sample Format Convention

All alignment functions use a consistent sample tuple format:

  • FASTQ samples: (sample_name, fq1_path, fq2_path_or_None)
  • BAM items: (sample_name, bam_path) or (sample_name, bam_path, is_paired_bool)
  • Single samples can be passed as a single tuple; multiple as a list of tuples.
  • When a single tuple is passed, the return value is a single dict; for a list, a list of dicts.

Auto-installation

python
# All functions support these parameters:
auto_install=True   # Auto-install missing tools via conda/mamba
overwrite=False     # Skip if outputs already exist
threads=8           # Per-tool thread count
jobs=None           # Concurrent job count (auto-detected from CPU count)

Examples

  • Bulk RNA-seq from SRA: prefetch -> fqdump -> fastp -> STAR -> featureCount -> pandas DataFrame
  • Single-cell 10x v3: ref -> count with technology='10XV3' -> h5ad AnnData
  • Local FASTQ files: Skip download steps, start directly with fastp -> STAR -> featureCount

References

Meegeleverde bestanden

Zolang de skill geladen is, leest het model deze bestanden als dat nodig is. Het model kan ze alleen lezen; ze worden nooit uitgevoerd.

Veelgestelde vragen

Wat doet de AI-skill Fastq Analysis Pipeline?

Guide through omicverse's alignment module for SRA downloading, FASTQ quality control, STAR alignment, gene quantification, and single-cell kallisto/bustools pipelines covering both bulk and single-cell RNA-seq workflows.

Waarom Fastq Analysis Pipeline gebruiken in TypingMind?

Omdat je deze skill één keer installeert en met elk model kunt gebruiken. Fastq Analysis Pipeline bestaat uit gewone Markdown in plaats van aanbiederspecifieke code. Dezelfde skill werkt dus met GPT-5, Claude, Gemini, Grok of een lokaal model. Ook als je midden in een chat van model wisselt, blijft de skill werken. TypingMind werkt met je eigen API-sleutels, dus je betaalt aanbieders rechtstreeks in plaats van een abonnement per gebruikersplek af te sluiten. Je skills en chats blijven in je eigen opslag.

Hoe installeer ik Fastq Analysis Pipeline in TypingMind?

Open Plug-ins → Skills → Installeren vanaf GitHub in TypingMind en plak https://github.com/omicverse/omicclaw/tree/main/src/omicverse_skills/skills/fastq-analysis. TypingMind leest het bestand SKILL.md, bundelt de bijbehorende bestanden en installeert het geheel als een skill die je per chat kunt inschakelen.

Welke AI-modellen kunnen Fastq Analysis Pipeline gebruiken?

Elk model dat je in TypingMind koppelt. AI-skills bestaan uit gewone Markdown-instructies in plaats van aanbiederspecifieke code. GPT, Claude, Gemini, Grok en lokale modellen kunnen deze skill dus allemaal laden wanneer een verzoek erbij past.

Hoeveel AI-modellen kan ik met Fastq Analysis Pipeline gebruiken?

Zoveel als je wilt. Je kunt Fastq Analysis Pipeline gebruiken met elk model dat skills ondersteunt, zoals GPT, Claude, Gemini, Grok, DeepSeek, Mistral of Llama. Allemaal in TypingMind met je eigen API-sleutels.

Is de AI-skill Fastq Analysis Pipeline gratis?

Ja. Deze skill is door omicverse op GitHub gepubliceerd onder de licentie GPL-3.0. Je betaalt alleen je eigen AI-aanbieder voor de tokens die je gebruikt.

Wat zijn AI-skills?

Een AI-skill is een herbruikbare bundel instructies die een AI-model leert hoe het één specifieke taak moet uitvoeren. De skill volgt het open Agent Skills-formaat: het bestand SKILL.md bevat de naam en beschrijving van de skill. Daarnaast kan de skill scripts, sjablonen of referentiebestanden bevatten die het model nodig heeft. Het model leest de instructies alleen als je verzoek bij de skill past. Een geïnstalleerde skill kost dus niets zolang deze niet wordt gebruikt.

Waarin verschillen AI-skills van plug-ins of MCP-servers?

Een plug-in of MCP-server geeft een model nieuwe tools om aan te roepen: code die ergens wordt uitgevoerd en een resultaat teruggeeft. Een AI-skill geeft het model juist kennis en een werkwijze: hoe het een taak moet aanpakken, welke stappen het moet volgen en hoe goede uitvoer eruitziet. Skills bestaan uit gewone Markdown en hebben dus geen server, API-sleutel of runtime nodig. Ze werken met elk model.

Bekijk alles

Maak nu je eigen AI-werkruimte

Schrijf je in voor onze nieuwsbrief en blijf op de hoogte van nieuwe functies en toekomstige weggeefacties 👇