QTLtools-fenrich(1)
โจ NAME โจ
Okay bestie, this page is for QTLtools-fenrich(1) ๐งฌ (filed under Bioinformatics tools). It covers QTLtools fenrich, which is all about functional enrichment of molecular QTLs ๐
๐ซถ SYNOPSIS ๐ซถ
QTLtools fenrich --qtl significanty_genes.bed --tss gene_tss.bed --bed TFs.encode.bed.gz --out output.txt [OPTIONS]
๐ฎ DESCRIPTION ๐ฎ
Okay so this mode checks whether a set of QTLs lands inside functional annotations more often than chance would predict ๐ The full method is explained in <https://www.nature.com/articles/ncomms15452> ๐
Here, "chance" doesn't mean a coin flip ๐ช. It means what you'd expect given how unevenly molQTLs and functional annotations are spread around the genomic positions of the molecular phenotypes. That's the fairness check, bestie ๐
Here's the play. First, we list every functional annotation sitting nearby each molecular phenotype. So if X phenotypes were quantified, that's X lists of annotations ๐. Then, for the subset Y of phenotypes that have a significant molQTL, we count how often those Y molQTLs overlap the annotations in their matching lists. That gives us the observed overlap frequency, fobs(Y) ๐
Next comes the shuffle ๐. We permute the annotation lists across phenotypes, so phenotype A might get the list that belongs to phenotype B. For every permuted dataset, we count how often the Y molQTLs overlap the newly assigned annotations. That gives the expected overlap frequency, fexp(Y) ๐ฒ
Why shuffle like this? Because it keeps the distribution of functional annotations and molQTLs around molecular phenotypes exactly as it was ๐ง
Finally, we run a Fisher test to see how fobs(Y) and fexp(Y) differ ๐. You get an odds ratio estimate and a two-sided p-value. The vibe check: the first part tells you whether there's enrichment or depletion, and the second part tells you how significant that is ๐
โจ OPTIONS โจ
--qtl in.bedโ Your list of QTLs of interest, in BED format. REQUIRED ๐--bed functional_annotation.bed.gzโ Your functional annotations, in BED format. REQUIRED ๐งฌ--tss genes.bedโ Positions of all the phenotypes you mapped QTLs for, in BED format. REQUIRED ๐--out output.txtโ The output file. REQUIRED ๐--permute integerโ How many permutations to run.DEFAULT=1000๐
๐ INPUT FILES ๐
--qtl file ๐
The list of QTLs you care about. Here's an example:
1 15210 15211 1_15211 ENSG00000227232.4 -
1 735984 735985 1_735985 ENSG00000177757.1 +
1 735984 735985 1_735985 ENSG00000240453.1 -
1 739527 739528 1_739528 ENSG00000237491.4 +
The column breakdown:
1โ The variant chromosome2โ The variant's start position (0-based)3โ The variant's end position (1-based)4โ The variant ID5โ The phenotype ID6โ The phenotype's strand. (not used) ๐
--bed file ๐ฆ
The list of annotations in BED format. Here's an example:
1 254874 265487
1 730984 735985
1 734984 736585
1 739527 748528
The column breakdown:
1โ Chromosome2โ Start position (0-based)3โ End position (1-based)
--tss file ๐ธ
The list of positions for all the phenotypes you mapped QTLs for. Here's an example:
1 29369 29370 ENSG00000227232.4 1_15211 -
1 135894 135895 ENSG00000268903.1 1_985446 -
1 137964 137965 ENSG00000269981.1 1_1118728 -
1 317719 317720 ENSG00000237094.7 1_15211 +
The column breakdown:
1โ Phenotype's chromosome2โ The start position of the phenotype (0-based)3โ The end position of the phenotype (1-based)4โ The phenotype ID5โ Top variant (not used) ๐6โ The phenotype's strand
๐ค OUTPUT FILE ๐ค
--out file ๐
This is a space-separated results file that spills the enrichment tea, with these columns:
- The observed number of QTLs falling within the functional annotations
- The total number of QTLs
- The mean expected number of QTLs falling within the functional annotations (across multiple permutations)
- The standard deviation of the expected number of QTLs falling within the functional annotations (across multiple permutations)
- The empirical p-value
- Lower bound of the 95% confidence interval of the odds ratio
- The odds ratio
- Upper bound of the 95% confidence interval of the odds ratio
๐ EXAMPLE ๐
- First, you need a BED file with the positions of the QTLs you're interested in. To do that, pull out all the significant hits at a given FDR threshold (e.g. 5%), then turn that significant QTL list into a BED file:
Rscript ./script/qtltools_runFDR_cis.R results.genes.full.txt.gz 0.05 results.genes
cat results.genes.significant.txt | awk '{ print $9, $10-1, $11, $8, $1, $5 }' | tr ' ' '\t' | sort -k1,1V -k2,2g > results.genes.significant.bed
- Next, prepare a BED file with the positions of all the phenotypes you mapped QTLs for:
zcat results.genes.full.txt.gz | awk '{ print $2, $3-1, $4, $1, $8, $5 }' | tr ' ' '\t' | sort -k1,1V -k2,2g > results.genes.quantified.bed
- Finally, run the enrichment analysis:
QTLtools fenrich --qtl results.genes.significant.bed --tss results.genes.quantified.bed --bed TFs.encode.bed.gz --out enrichment.QTL.in.TF.txt
๐ SEE ALSO ๐
QTLtools(1)๐- QTLtools website:
<https://qtltools.github.io/qtltools>๐
๐ BUGS ๐
- Please submit bugs to
<https://github.com/qtltools/qtltools>๐
๐ CITATION ๐
Delaneau, O., Ongen, H., Brown, A. et al. A complete tool set for molecular QTL discovery and analysis. Nat Commun 8, 15452 (2017). <https://doi.org/10.1038/ncomms15452> ๐
๐ AUTHORS ๐
Olivier Delaneau (olivier.delaneau@gmail.com), Halit Ongen (halitongen@gmail.com) ๐ซถ
That's the whole tea, bestie! ๐ This page is stamped QTLtools-v1.3, dated 06 May 2020, and it's QTLtools-fenrich(1) forever ๐ฆโจ
๐ฆ where this page comes from
- debian bookworm: qtltools 1.3.1+dfsg-4 ยท GPL-3.0-or-later
- debian trixie: qtltools 1.3.1+dfsg-4+b3 ยท GPL-3.0-or-later
- ubuntu jammy: qtltools 1.3.1+dfsg-2build2 ยท GPL-3.0-or-later
- ubuntu noble: qtltools 1.3.1+dfsg-4build3 ยท GPL-3.0-or-later
- ubuntu questing: qtltools 1.3.1+dfsg-4build6
- ubuntu resolute: qtltools 1.3.1+dfsg-4build7 ยท GPL-3.0-or-later
- ubuntu stonking: qtltools 1.3.1+dfsg-6 ยท GPL-3.0-or-later
- ๐ girlified by claude-haiku-5-5 on : a language model's rewrite of the original, under its terms