This repository provides a comprehensive bioinformatics pipeline to analyze genomic variants from GSE211627. The study investigates circulating monocytes associated with anti-PD-1 resistance in human biliary tract cancer (BTC).
This pipeline performs variant preprocessing, statistical association testing using linear models (limma), genomic annotation via GENCODE v49, and high-resolution visualization.
- Data Acquisition: Retrieval of VCF and GTF files.
- Preprocessing: Conversion of VCF genotypes to numeric dosage (0, 1, 2).
- Statistical Analysis: Differential association testing using Empirical Bayes moderated t-tests.
- Genomic Annotation: Coordinate-based mapping of variants to GENCODE v49 gene symbols.
- Visualization: Generation of Volcano plots to identify significant biological hits.
- Python: 3.10+ (with
pandas,numpy,matplotlib,seaborn) - R: 4.2+ (with
limma,BiocManager)
- Variant Data: Download
GSE211627_merged_BTC_HD.vcf.gzfrom GEO Accession GSE211627. - Annotation Reference: Download the Human GENCODE v49 GTF (GRCh38).
Extract the compressed files to your working directory:
# Decompress genomic data
bgzip -d GSE211627_merged_BTC_HD.vcf.gz
gunzip gencode.v49.annotation.gtf.gzConvert the raw Variant Call Format (VCF) into a numeric dosage matrix. This script extracts the GT (Genotype) field and maps it: 0/0 0/1 1/1
Run: python preprocess.py
Using the limma package in R, we fit a linear model to each SNP. We apply Empirical Bayes moderation to provide stable results even with small sample sizes (9 BTC vs 8 Healthy Donors).
Run: Rscript limma.r
SNPs are mapped to the human genome (GRCh38) using a spatial join. Variants are assigned to gene symbols if they fall within the genomic coordinates defined in GENCODE v49.
Run: python map_gene_symbol.py
To facilitate downstream functional analysis, the results are split into variants with valid gene symbols and intergenic variants.
Run: python split-symbol.py
Generate a Volcano Plot to visualize the relationship between the magnitude of change (Log Fold Change) and statistical significance.
Run: python volcano_plot.py
The association analysis identifies genetic variants that are significantly skewed in frequency between Biliary Tract Cancer patients and Healthy Donors.
| rsID | Chromosome | Position | Gene Symbol | Adjusted P-Value |
|---|---|---|---|---|
| rs1578391 | 1 | 629906 | MTND2P28 | 1.49e-10 |
| rs1130663 | 11 | 837582 | POLR2L | 2.90e-02 |
| rs11650732 | 17 | 43355452 | LINC00910 | 1.53e-02 |
preprocess.py: VCF parser and genotype-to-dosage converter.limma.r: R script for differential frequency testing.map_gene_symbol.py: Coordinate-based annotation script (GENCODE v49).volcano_plot.py: Visualization script using Seaborn.split-symbol.py: Data management script for mapped results.
If using this pipeline or the GSE211627 dataset, please cite the original study:
Keenan BP, et al. Circulating monocytes associated with anti-PD-1 resistance in human biliary cancer induce T cell paralysis. Cell Rep. 2022 Sep 20;40(12):111384. doi: 10.1016/j.celrep.2022.111384. PMID: 36130508.
