Logo : Bio Chipseq Allele Specific Binding

Bio Chipseq Allele Specific Binding

Organisation
PKU-YuanGroup
bio-chipseq-allele-specific-binding

Detects allele-specific transcription factor or histone modification binding from heterozygous-variant ChIP-seq using WASP (reference-bias filter; mandatory upstream), RASQUAL (joint QTL + bias-corrected testing), BaalChIP (Bayesian beta-binomial with copy-number-aware overdispersion), and AlleleSeq (personalized diploid genome). Handles imprinted-locus awareness, X-inactivation artifacts, cancer copy-number imbalance, and integration with downstream caQTL / bQTL mapping. Use when identifying variants with allelic effects on TF binding, fine-mapping causal regulatory variants, validating deep-learning variant predictions, or characterizing cis-acting regulatory effects.

Présentation

ÉditeurPKU-YuanGroup
DépôtOpenAI4S
Nom de la compétencebio-chipseq-allele-specific-binding
Étoiles
622
Forks
72
Fichiers inclus
2
LicenceMIT
Liens
  • Instructions en Markdown

    Un fichier SKILL.md que le modèle charge à la demande : il ne consomme donc des tokens que lorsqu’une demande correspond réellement à la compétence.

  • Compatible avec tous les LLM

    Les compétences IA sont rédigées en Markdown et non sous forme de code propre à un fournisseur. Elles fonctionnent donc avec GPT, Claude, Gemini, Grok ou un modèle local.

  • Fichiers inclus : 2

    Des scripts, des gabarits et des références que le modèle peut consulter pendant son travail. Les fichiers sont en lecture seule et ne sont jamais exécutés.

  • Open source

    Publiée par PKU-YuanGroup sur GitHub. Consultez les sources avant de l’installer.

Installation

Installez la compétence IA Bio Chipseq Allele Specific Binding dans TypingMind pour l’utiliser avec n’importe quel LLM, ou ajoutez-la à un autre agent capable de lire SKILL.md.

1

Installer dans TypingMind

TypingMind installe une compétence directement depuis son dossier GitHub : l’application lit SKILL.md, regroupe les fichiers de ressources et enregistre le tout localement.

  1. Ouvrez l’application et accédez à Plugins → Compétences.
  2. Choisissez « Installer depuis GitHub ».
  3. Copiez l’URL ci-dessous, qui pointe vers le dossier de la compétence, puis collez-la et confirmez.
    https://github.com/PKU-YuanGroup/OpenAI4S/tree/main/skills/bioskills/bio-chip-seq-allele-specific-binding
  4. Activez la compétence dans chaque discussion où vous souhaitez pouvoir l’utiliser.
Plugins → Compétences → Ajouter une compétence → Via une URL GitHub, puis collez l’URL du dossier et appuyez sur Continuer.
2

Installer dans un autre agent

Tout agent capable de lire le format Agent Skills peut utiliser cette compétence : copiez le dossier dans le répertoire des compétences de cet agent.

Claude Code — .claude/skills
git clone --depth 1 https://github.com/PKU-YuanGroup/OpenAI4S.git /tmp/OpenAI4S
mkdir -p .claude/skills
cp -r /tmp/OpenAI4S/skills/bioskills/bio-chip-seq-allele-specific-binding .claude/skills/bio-chipseq-allele-specific-binding
Redémarrez Claude Code après la copie pour que la nouvelle compétence soit prise en compte.

Utilisez cette compétence dans TypingMind

Activez Bio Chipseq Allele Specific Binding dans n’importe quelle discussion TypingMind et le modèle s’occupe du reste. Le nom et la description de la compétence figurent dans le prompt système. Dès qu’une demande correspond, le modèle charge lui-même l’intégralité des instructions : vous n’avez jamais à l’invoquer manuellement, et elle ne consomme aucun token tant qu’elle n’est pas utilisée.

Le modèle charge automatiquement Bio Chipseq Allele Specific Binding dès qu’une demande correspond à cette compétence.

Compatible avec tous les modèles IA

Les compétences IA sont de simples instructions Markdown, et non du code propre à un fournisseur. Ainsi, la compétence Bio Chipseq Allele Specific Binding n’est pas liée au modèle pour lequel elle a été conçue. Installez-la une seule fois dans TypingMind et utilisez-la avec GPT-5, Claude, Gemini, Grok, DeepSeek, Mistral, Llama ou un modèle local que vous exécutez vous-même, le tout avec vos propres clés API.

  • Chargée uniquement en cas de besoin

    Le prompt système ne contient que le nom et la description. Les instructions sont récupérées à la première demande correspondante : une compétence inutilisée ne coûte donc rien.

  • Changez de modèle en cours de discussion

    La compétence étant constituée d’instructions et non de code, elle reste fonctionnelle lorsque vous changez de modèle : le nouveau modèle lit le même fichier SKILL.md.

Instructions de la compétence

Voici le contenu de SKILL.md que le modèle charge. Lisez-le avant l’installation : une compétence contient des instructions que votre modèle suivra.

Version Compatibility

Reference examples tested with: WASP 0.3.4+, RASQUAL 1.1+, BaalChIP 1.30+ (Bioconductor), AlleleSeq 2.0+, samtools 1.19+, bcftools 1.19+, GATK 4.5+, pysam 0.22+.

Allele-Specific Binding (ASB)

"Identify variants that affect transcription factor or histone modification binding in cis" -> Compare ChIP-seq read counts at the reference and alternate alleles of heterozygous variants in a single sample. Differential read counts (ALT vs REF at hetSNPs in peaks) reveal allele-specific binding.

  • CLI (mandatory bias filter): WASP mapping pipeline to remove reference-allele mapping bias
  • CLI (joint association): RASQUAL for cis-QTL + ASB (genotype VCF piped in via tabix)
  • R (Bayesian beta-binomial): BaalChIP with copy-number-aware overdispersion
  • CLI (personalized genome): AlleleSeq with phased diploid genome
  • Statistical test: beta-binomial likelihood ratio or chi-squared on count tables

ASB analysis has three universal pitfalls: reference-allele mapping bias (universal across short-read aligners), imprinted loci (constitutively allele-skewed by biology), and copy-number variation (changes effective allele dose). All three must be addressed or results are unreliable.

Method Taxonomy

MethodYearApproachStrengthFails when
WASP (van de Geijn 2015)2015Map reads, swap alleles, re-map, drop discordantUniversal first step; aligner-agnostic; mandatory preprocessingDrops 22-31% of reads; reduces power; not an analysis method itself
RASQUAL (Kumasaka 2016)2016Joint genotype-phenotype association with per-feature phi bias parameterImproves QTL mapping; integrates bias correction; works for ChIP/ATAC/RNA-seqComputationally intensive; assumes binomial bias structure
BaalChIP (de Santiago 2017)2017Bayesian beta-binomial; copy-number-aware overdispersionCancer genomes (copy-number imbalance); rigorous inferenceSlower; assumes copy-number known
AlleleSeq (Rozowsky 2011)2011Personalized diploid genome alignmentAvoids reference bias completely; conceptually cleanestRequires phased genotype + diploid genome construction; computational cost
MBASED (Mayba 2014)2014Meta-analysis-based ASE; gene-levelRNA-seq oriented; adapted for ChIP gene-body binningGene-level not peak-level; less precise for narrow TF peaks
AllelicImbalance (R package)—Bioconductor multi-methodEasy R workflowRequires variants and BAM; less rigorous than BaalChIP
deepSEA / chromBPNet variant effects2015 / 2024Deep-learning predictionsSequence-only; no chromatin sample neededPredictive not measurement; see chip-deep-learning

Universal First Step: WASP Reference-Bias Filter

Goal: Remove reads that show reference-allele mapping bias before any ASB testing.

Approach: Align reads, identify those overlapping heterozygous SNPs, swap alleles and re-align; reads that don't map consistently to the same position with both alleles are discarded. The output is a bias-corrected BAM at the cost of 22-31% read loss.

Reference-allele mapping bias is systematic: reads with the reference allele align more readily because the reference is the alignment target. This inflates REF allele frequency by 1-5% genome-wide. WASP fixes this:

bash
# WASP mapping pipeline
# 1. Initial alignment
bowtie2 -x hg38 -1 R1.fq -2 R2.fq -S step1.sam
samtools view -bS step1.sam | samtools sort -o step1.bam
samtools index step1.bam

# 2. Identify reads overlapping hetSNPs; swap alleles; re-map
python /path/to/WASP/mapping/find_intersecting_snps.py \
    --is_paired_end \
    --is_sorted \
    --output_dir wasp_out/ \
    --snp_tab snps_tab.h5 \
    --snp_index snps_index.h5 \
    --haplotype haplotypes.h5 \
    --samples sample_list.txt \
    step1.bam

# 3. Re-map swapped reads
bowtie2 -x hg38 -1 wasp_out/step1.remap.fq.gz -S step2.sam
# (process step2.sam similarly)

# 4. Filter reads that don't map back consistently
python /path/to/WASP/mapping/filter_remapped_reads.py \
    step1.to.remap.bam step2.bam step1.keep.bam

# 5. Final WASP-filtered BAM (use this for all downstream ASB analysis)
samtools sort -o step1.wasp.bam step1.keep.bam
samtools index step1.wasp.bam

WASP always drops 22-31% of reads. This is the cost of bias correction; downstream power is reduced but ASB calls are trustworthy.

Alternative to WASP filter: RASQUAL's phi parameter models bias within the test rather than filtering reads. More sophisticated but assumes binomial bias structure.

Workflow: BaalChIP (Recommended for Cancer / Copy-Number-Imbalanced Samples)

r
library(BaalChIP)
library(BSgenome.Hsapiens.UCSC.hg38)

# Sample metadata
samples <- data.frame(
    SampleID = c('HCC1395_FOXA1_rep1', 'HCC1395_FOXA1_rep2'),
    Tissue = 'TNBC',
    Target = 'FOXA1',
    BAM = c('rep1.wasp.bam', 'rep2.wasp.bam'),
    Peaks = c('rep1_peaks.bed', 'rep2_peaks.bed'),
    Group = 'HCC1395'
)

# hetSNP file: VCF or BED with chrom, pos, ref, alt, allele frequencies
hetSNPs <- 'het_snps.bed'

# CNV file for copy-number-aware overdispersion (critical for cancer)
cnvs <- 'cnvs.bed'

# Initialize BaalChIP object
res <- BaalChIP(samplesheet = samples, hets = hetSNPs)

# Run filters and Bayesian test
res <- alleleCounts(res, min_base_quality = 10, min_mapq = 15)
res <- QCfilter(res, RegionsToFilter = list(blacklist = rtracklayer::import('blacklist_v2.bed')))
res <- mergePerGroup(res)
res <- filter1allele(res)
res <- getASB(res, Iter = 5000, conf_level = 0.95)
# Verify parameter names against the installed BaalChIP version (`?getASB`); some releases
# use `nIter` instead of `Iter`.

# Results
asb_table <- BaalChIP.report(res)
head(asb_table)

BaalChIP outputs per-hetSNP: allelic ratio (AR), bias-corrected ratio (Corrected.AR), a Bayesian credible interval (Bayes_lower/Bayes_upper), and the ASB call (isASB).

Workflow: RASQUAL (Joint cis-QTL + ASB)

bash
# Prepare input
# - BAM filtered by WASP
# - Genotype VCF (phased)
# - Peak BED

# Run RASQUAL. The genotype VCF is piped in from tabix (there is NO --vcf flag);
# options are single-dash. Inputs -y/-k/-x are BINARY files built by RASQUAL's
# txt2bin utilities (not .txt). One run per feature: -j selects the feature row,
# -l = number of test (cis) SNPs, -m = number of feature SNPs in the window.
tabix genotypes.vcf.gz chr:start-end | \
  rasqual -y Y.bin -k K.bin -x X.bin \
    -n N_samples -j FEATURE_INDEX -l N_TEST_SNPS -m N_FEATURE_SNPS \
    -s EXON_STARTS -e EXON_ENDS -f PEAK_ID \
    > rasqual_results.txt

# Output columns: chrom, peak_id, n_RSNPs, n_FSNPs, n_imputed, summarized_phi,
#                 summarized_overdispersion, summarized_pi, beta, log10_BF, ...

RASQUAL's phi parameter is the per-feature bias estimate; pi is the allelic ratio.

Workflow: AlleleSeq (Personalized Diploid Genome)

bash
# Build personalized diploid genome from phased VCF
java -jar vcf2diploid.jar -id SAMPLE -chr hg38.fa -vcf SAMPLE.phased.vcf   # per-haplotype FASTAs written to CWD (no -outDir option)

# Align reads to both maternal and paternal copies
bowtie2-build personalized/maternal.fa maternal_index
bowtie2-build personalized/paternal.fa paternal_index
bowtie2 -x maternal_index -1 R1.fq -2 R2.fq -S maternal.sam
bowtie2 -x paternal_index -1 R1.fq -2 R2.fq -S paternal.sam

# AlleleSeq2 pipeline (Makefile-based; there is no AlleleSeq2.pl entry point)
make -f PIPELINE.mk PGENOME_DIR=personalized/ REFGENOME_VERSION=GRCh38 ALIGNMENT_MODE=ASB NTHR=8

# Output: per-hetSNP allelic counts and binomial test

Personalized genome avoids reference bias by construction. Cost: per-sample diploid genome generation and indexing.

Three Universal Pitfalls

Pitfall 1: Imprinted Loci Are Constitutively Skewed

Imprinted loci (H19, IGF2, MEG3, MEG8, KCNQ1OT1, etc.) show extreme allele bias by biology, not from differential binding.

bash
# Filter imprinted loci before ASB analysis
# Imprinted-gene coordinates are derived from a catalog (geneimprint.com or the
# Otago Imprinted Gene Catalogue, igc.otago.ac.nz) mapped to hg38; there is no
# canonical hosted hg38 BED. Given imprinted_loci_hg38.bed:
bedtools intersect -v -a hetSNPs.bed -b imprinted_loci_hg38.bed > hetSNPs.non_imprinted.bed

Pitfall 2: X-Inactivation in Females

In female samples, X-linked genes show extreme allele skew because each cell silences one X chromosome. This appears as ASB at every X-linked hetSNP.

bash
# Filter chrX in female samples
awk '$1 != "chrX"' hetSNPs.bed > hetSNPs.autosomal.bed
# Or analyze chrX separately with imprinting-aware methods

Pitfall 3: Copy-Number Imbalance (Cancer Genomes)

In cancer cells, copy-number gain of one allele alters effective allele dose; raw allelic ratios mix dose and binding effects. BaalChIP's copy-number-aware overdispersion handles this; other methods require pre-filtering CN-altered regions.

bash
# Use ASCAT / Sequenza / FACETS to call allele-specific CNVs
# Exclude CN-altered regions from ASB analysis OR use BaalChIP

Per-Tool Failure Modes

WASP -- Reference panel mismatch

Trigger: Using a WASP SNP file from a different population than the sample.

Mechanism: WASP swaps alleles at known hetSNPs; if the variant isn't in the SNP file, no swap happens; reads retain reference bias.

Symptom: Sample-specific hetSNPs (not in 1KG) still show reference bias after WASP.

Fix: Build WASP SNP file from the sample's own genotype VCF, not a population panel; OR use RASQUAL which handles novel hetSNPs.

WASP -- Excessive read loss

Trigger: WASP filter removes >40% of reads.

Mechanism: Many reads span multiple hetSNPs; each must re-map consistently after every allele swap; combinatorial loss.

Fix: Accept the loss (genuine bias correction) OR switch to AlleleSeq (personalized genome avoids the swap-and-remap step) OR RASQUAL (no read filtering).

RASQUAL -- Convergence failure

Trigger: Sparse data (few hetSNPs per peak); strong copy-number imbalance.

Mechanism: EM convergence requires enough hetSNPs per feature; sparse data underspecifies the model.

Fix: Require well-imputed SNPs (--imputation-quality-fsnp); combine replicates; or switch to BaalChIP for sparse-data robustness.

BaalChIP -- CN file mismatch

Trigger: CN BED uses different naming convention (chrX vs X) than BAMs.

Mechanism: BaalChIP silently doesn't apply CN-aware overdispersion if CN positions don't match BAM chromosomes.

Symptom: ASB calls at CN-altered regions look bimodal (one allele appears 100% bound).

Fix: Verify chromosome naming matches across CN file, BAM, hetSNP VCF.

AlleleSeq -- Insufficient phasing

Trigger: Using unphased VCF for diploid genome construction.

Mechanism: AlleleSeq requires phased genotypes; without phasing, maternal and paternal genomes are randomly assigned.

Fix: Use trio or read-based phasing (HapCUT2, WhatsHap) before AlleleSeq.

Imprinted loci not filtered

Trigger: Reporting ASB at H19 or IGF2.

Mechanism: These loci are biologically allele-skewed; the "ASB" call is correct but uninformative.

Fix: Always filter imprinted loci before reporting / interpreting ASB.

Female chrX ASB artifacts

Trigger: Reporting ASB at chrX in female samples without X-inactivation correction.

Mechanism: Random X-inactivation silences one X per cell; population of cells shows extreme allele bias at any X-linked variant.

Fix: Filter chrX in female samples OR use methods that model X-inactivation (rare in standard ASB pipelines).

Reference allele bias not corrected

Trigger: Running BaalChIP / chi-squared test directly without WASP or RASQUAL bias handling.

Mechanism: 1-5% genome-wide REF allele over-representation produces false-positive REF-favoring ASB calls.

Symptom: ASB calls skewed toward REF allele.

Fix: Always apply WASP (or RASQUAL's phi parameter) before testing.

Reconciliation

PatternLikely causeAction
WASP filter applied; still REF-biasedSample-specific hetSNPs not in WASP SNP fileUse sample's own genotype VCF for WASP
BaalChIP and RASQUAL disagree at sparse hetSNPsDifferent sparse-data behaviorBaalChIP Bayesian more conservative for sparse; check posterior
ASB call at imprinted locusBiology, not differential bindingFilter imprinted loci
ASB at chrX in femaleX-inactivationFilter chrX
ASB call where copy-number alteredCancer dose effectUse BaalChIP with CN file OR exclude CN-altered regions
chromBPNet predicts strong variant effect; ASB doesn'tSample has low coverage at variant; chromBPNet predicts in counterfactualIncrease depth; ASB requires actual chromatin sample

Common Errors

Error / symptomCauseSolution
WASP find_intersecting_snps.py failsh5 SNP table format wrongBuild SNP tables from VCF via snp2h5 (HDF5) or extract_vcf_snps.sh (text SNP dir)
BaalChIP "no overlap with peaks"hetSNP and peak chrom naming mismatchStandardize chrom prefixes
RASQUAL OOMcis-window too large; too many featuresNarrow the cis-window (tabix region and -l/-m); chunk feature list
AlleleSeq "diploid genome too large"Many SVs in genomeUse small-variant only VCF; exclude SV-rich regions
ASB calls cluster at REF alleleWASP not applied OR insufficientRe-run WASP with sample-specific SNP file
Many ASB at chrX in femaleX-inactivationFilter chrX
All "ASB" calls are at imprinted lociImprinting not filteredApply imprinted-loci BED

References

  • Rozowsky J et al 2011 Mol Syst Biol 7:522 (AlleleSeq)
  • van de Geijn B et al 2015 Nat Methods 12:1061 (WASP)
  • Kumasaka N et al 2016 Nat Genet 48:206 (RASQUAL)
  • de Santiago I et al 2017 Genome Biol 18:39 (BaalChIP)
  • Mayba O et al 2014 Genome Biol 15:405 (MBASED)
  • Chen J et al 2016 Nat Commun 7:11101 (1000 Genomes ASB / ASE survey)

Related Skills

  • chip-seq/peak-calling - Peak calling upstream
  • chip-seq/chipseq-qc - QC before ASB analysis
  • chip-seq/chip-deep-learning - Validate DL variant predictions against ASB
  • chip-seq/peak-annotation - Annotate ASB variants to genes / cCREs
  • atac-seq/allele-specific-accessibility - Parallel ATAC ASB workflow
  • causal-genomics/fine-mapping - ASB as fine-mapping orthogonal evidence
  • variant-calling/variant-annotation - Annotate hetSNPs before ASB
  • phasing-imputation/haplotype-phasing - Required for AlleleSeq

Fichiers inclus

Le modèle lit ces fichiers à la demande lorsque la compétence est chargée. Ils sont accessibles en lecture et ne sont jamais exécutés.

Foire aux questions

À quoi sert la compétence IA Bio Chipseq Allele Specific Binding ?

Detects allele-specific transcription factor or histone modification binding from heterozygous-variant ChIP-seq using WASP (reference-bias filter; mandatory upstream), RASQUAL (joint QTL + bias-corrected testing), BaalChIP (Bayesian beta-binomial with copy-number-aware overdispersion), and AlleleSeq (personalized diploid genome). Handles imprinted-locus awareness, X-inactivation artifacts, cancer copy-number imbalance, and integration with downstream caQTL / bQTL mapping. Use when identifying variants with allelic effects on TF binding, fine-mapping causal regulatory variants, validating de...

Pourquoi utiliser Bio Chipseq Allele Specific Binding sur TypingMind ?

Parce que vous l’installez une seule fois pour l’utiliser avec n’importe quel modèle. Bio Chipseq Allele Specific Binding se compose de simples instructions en Markdown plutôt que de code propre à un fournisseur. La même compétence fonctionne donc avec GPT-5, Claude, Gemini, Grok ou un modèle local, et vous pouvez changer de modèle en cours de discussion sans perturber son fonctionnement. TypingMind utilise vos propres clés API : vous payez donc directement les fournisseurs plutôt qu’un abonnement par siège, et vos compétences et discussions restent dans votre propre espace de stockage.

Comment installer Bio Chipseq Allele Specific Binding dans TypingMind ?

Dans TypingMind, ouvrez Plugins → Compétences → Installer depuis GitHub et collez https://github.com/PKU-YuanGroup/OpenAI4S/tree/main/skills/bioskills/bio-chip-seq-allele-specific-binding. TypingMind lit le fichier SKILL.md, regroupe les fichiers associés et installe le tout sous forme de compétence que vous pouvez activer pour chaque discussion.

Quels modèles d’IA peuvent utiliser Bio Chipseq Allele Specific Binding ?

N’importe quel modèle que vous connectez dans TypingMind. Les compétences IA sont de simples instructions en Markdown, et non du code propre à un fournisseur. GPT, Claude, Gemini, Grok et les modèles locaux peuvent donc tous charger cette compétence lorsqu’une demande lui correspond.

Combien de modèles d’IA puis-je utiliser avec Bio Chipseq Allele Specific Binding ?

Autant que vous le souhaitez. Vous pouvez utiliser Bio Chipseq Allele Specific Binding avec tout modèle qui prend en charge les compétences : GPT, Claude, Gemini, Grok, DeepSeek, Mistral, Llama et bien d’autres, le tout dans TypingMind avec vos propres clés API.

La compétence IA Bio Chipseq Allele Specific Binding est-elle gratuite ?

Oui. Cette compétence est publiée sur GitHub par PKU-YuanGroup sous licence MIT. Vous ne payez que votre propre fournisseur d’IA pour les tokens utilisés.

Que sont les compétences IA ?

Une compétence IA est un ensemble d’instructions réutilisables qui apprend à un modèle d’IA à accomplir une tâche précise. Elle suit le format ouvert Agent Skills : un fichier SKILL.md contenant un nom et une description, ainsi que les éventuels scripts, gabarits ou fichiers de référence dont le modèle peut avoir besoin. Le modèle ne lit les instructions que lorsque votre demande correspond à la compétence. Une compétence installée ne coûte donc rien tant qu’elle n’est pas utilisée.

En quoi les compétences IA diffèrent-elles des plugins ou des serveurs MCP ?

Un plugin ou un serveur MCP fournit au modèle de nouveaux outils à appeler : du code qui s’exécute quelque part et renvoie un résultat. Une compétence IA lui apporte plutôt des connaissances et une méthode : comment aborder une tâche, quelles étapes suivre et à quoi ressemble un bon résultat. Les compétences sont de simples instructions en Markdown. Elles ne nécessitent donc ni serveur, ni clé API, ni environnement d’exécution, et fonctionnent avec n’importe quel modèle.

Tout voir

Créez votre propre espace de travail IA dès maintenant

Abonnez-vous à notre newsletter pour être informé des nouvelles fonctionnalités et des prochains cadeaux à gagner 👇