QTLtools-trans(1)
β¨ QTLtools-trans(1) β¨
Bioinformatics tools π§π
β¨ NAME β¨
okay bestie, the name says it all π«Ά QTLtools trans - trans QTL analysis is the mode that hunts for trans (distal) QTLs, the ones that sneakily affect your phenotypes from far away π¦
β¨ SYNOPSIS β¨
QTLtools trans --vcf [in.vcf|in.vcf.gz|in.bcf|in.bed.gz] --bed
quantifications.bed.gz [--nominal | --permute | --sample integer |
--adjust in.txt] --out output.txt [OPTIONS]
β¨ DESCRIPTION β¨
this mode maps trans (distal) QTLs π using linear regression, and the whole method is written up in <https://www.nature.com/articles/ncomms15452>. the flow is giving clean: first it regresses out your covariates from the phenotype data, then it runs the linear regression between the phenotype residuals and the genotype. and if you pass --normal and --cov together, the residuals after covariate correction get rank normal transformed π it also comes with an efficient permutation scheme, so you can pick your pass:
- a nominal pass (
--nominal) that lists every genotype-phenotype association under a threshold you choose π₯ - a permutation pass (
--permuteor--sample no_genes_to_sample) to empirically characterise the null distribution of associations π§ͺ - an adjustment of the nominal p-values based on permutations (
--adjust) π
okay so the full permutation scheme (--permute) is the one that's literally the gold standard π₯ all phenotypes get permuted together using the same random number sequence, which keeps the correlation structure intact. that means the only association actually broken in the data is the one between genotype and phenotype. then it runs a standard association scan that's identical to the one in the nominal pass. in practice this gets repeated for 100 permutations of the phenotype data π
then comes FDR correction. you rank all the nominal p-values in ascending order and count how many p-values in the permuted data sets are smaller. that gives you an FDR estimate! for example, if there are 500 p-values in the permuted data sets that are smaller than the 100th smallest nominal p-value, you can assume the FDR for those first 100 associations is around 5% (=500/(100 Γ 100)) β¨
now the approximation π§ this one exists for fast screening in trans, and it's built on what we already do in cis. the trick is assuming the phenotypes are independent and normally distributed (which you can enforce with --normal). since all the phenotypes are normally distributed, they're effectively the same, and the cis region removed from each phenotype is so small compared to the rest of the genome that its phenotype-specific impact is negligible. so the number of variants and the correlation amongst them is roughly the same for each phenotype, and each phenotype is roughly the same too π«Ά that means you can run permutations with a small number of phenotypes instead of all of them. this drastically cuts the computational burden, and the null distribution you generate can be applied to all phenotypes. π₯
here's how it works: it draws from the null by permuting some randomly chosen phenotypes, testing for associations with all variants in trans, and storing the smallest p-value. repeat this many times (typically 1000) and you've built a null distribution of the strongest associations for a single phenotype. then it gets made continuous by fitting a beta distribution, just like in cis, and that's used to adjust every nominal p-value from the initial pass for the number of variants being tested. to correct for the number of phenotypes tested, FDR gets estimated the same way as in cis, from the best adjusted p-values per phenotype (one per phenotype). this also gives an adjusted p-value threshold you can use to find all the phenotype-variant pairs that are whole-genome significant. the devs tested this and it gave similar results to the full permutation scheme, both in FDR estimates and number of discoveries, while running faster β‘
π important: linear regressions assume normally distributed data, so the devs highly recommend using--normalto rank normal transform the phenotype quantifications. this helps you avoid false positive associations caused by outliers. and if you're using the approximate permutation scheme (--sample), you MUST use--normalor make sure your phenotypes are already normally distributed. no skipping this one, periodt π
β¨ OPTIONS β¨
--vcf [in.vcf|in.bcf|in.vcf.gz|in.bed.gz]β genotypes in VCF/BCF format, or another molecular phenotype in BED format 𧬠if a variant has aDSfield in its genotypeFORMAT(the dosage calculated from genotype probabilities, like after imputation), that's what gets used as the genotype. if there's only aGTfield in the genotypeFORMAT, that's used instead and gets converted to a dosage. REQUIRED. π--bed quantifications.bed.gzβ molecular phenotype quantifications in BED format. REQUIRED. πΈ--out output.txtβ where your output file goes. REQUIRED. π--cov covariates.txtβ the covariates you want to correct the phenotype data with. π§Ή--normalβ rank normal transforms the phenotype data so each phenotype comes out normally distributed. RECOMMENDED. π--window integerβ the size of the cis window flanking each phenotype's start position that gets removed. DEFAULT=5000000 πͺ--threshold floatβ the p-value threshold below which hits get reported. give1.0if you want literally everything, but heads up, that might make a huge file π when--adjustis provided, this threshold applies to the adjusted p-values instead. DEFAULT=1e-5 π―--bins integerβ how many bins to use for categorising all p-values above--threshold. DEFAULT=1000 ποΈ--nominalβ calculates the nominal p-value for the genotype-phenotype associations and prints out the ones that pass your threshold. Mutually exclusive with--permute,--sampleand--adjust. π«--permuteβ permutes all phenotypes together, once. for multiple permutations you need to change the random seed with--seedeach time. Mutually exclusive with--nominal,--sampleand--adjust. π--sample integerβ permutes randomly chosen phenotypesintegertimes. Mutually exclusive with--nominal,--permute,--adjust, and--chunk. π²--adjust filenameβ tests and adjusts p-values using the null distribution infilename. Mutually exclusive with--nominal,--permute, and--sample. π--chunk integer1 integer2β for parallelisation π§© it divides the data intointeger2chunks and processes chunk numberinteger1. the minimum number of chunks has to be at least the same as the number of chromosomes in the--bedfile. πββοΈ
β¨ OUTPUT FILES β¨
these are all space separated, so grab your files and get to work π
πΈ .hits.txt.gz
this one details the variant-phenotype pairs that pass the threshold, with these columns:
1β the phenotype ID2β the phenotype chromosome3β start position of the phenotype4β the variant ID5β the variant chromosome6β the start position of the variant7β the nominal p-value of the association between the variant and the phenotype.8β the adjusted p-value of the association between the variant and the phenotype. Requires--adjust9β correlation coefficient
π .best.txt.gz
this one lists the most significant variant per phenotype, with these columns:
1β the phenotype ID2β the adjusted p-value of the association between the variant and the phenotype. Requires--adjust3β the nominal p-value of the association between the variant and the phenotype.4β the variant ID
π«§ .bins.txt.gz
this one holds the binning of all hits with a p-value below your specified --threshold, with these columns:
1β the index of the bin2β the lower bound of the correlation coefficient for this bin3β the upper bound of the correlation coefficient for this bin4β the upper bound of the p-value for this bin5β the lower bound of the p-value for this bin
β¨ FULL PERMUTATION ANALYSIS EXAMPLE β¨
- run a nominal analysis, rank normal transforming the phenotypes and outputting all associations with a p-value below
1e-5π₯
QTLtools trans --vcf genotypes.chr22.vcf.gz --bed
genes.simulated.chr22.bed.gz --nominal --normal --out trans.nominal
- run a full permutation analysis with 100 jobs on a compute cluster π₯οΈ run the following, and make sure you change the seed for each permutation iteration.
qsubneeds to be swapped out for whatever job submission system you use (bsub,psub, etc...) π
for j in $(seq 1 100); do
echo "QTLtools trans --vcf genotypes.chr22.vcf.gz --bed
genes.simulated.chr22.bed.gz --permute --normal --out
trans.perm$j.txt --seed $j" | qsub
done
β¨ APPROXIMATE PERMUTATION ANALYSIS EXAMPLE β¨
- build the null distribution by randomly selecting 1000 phenotypes, and rank normal transforming the phenotypes π²
QTLtools trans --vcf genotypes.chr22.vcf.gz --bed
genes.simulated.chr22.bed.gz --sample 1000 --normal --out trans.sample
- run the nominal pass, adjusting the p-values with the given null distribution, rank normal transforming the phenotypes, and printing out associations with an adjusted p-value less than
0.1β¨
QTLtools trans --vcf genotypes.chr22.vcf.gz --bed
genes.simulated.chr22.bed.gz --adjust trans.sample.best.txt.gz
--threshold 0.1 --normal --out trans.adjust
β¨ SEE ALSO β¨
QTLtools(1)π- QTLtools website:
<https://qtltools.github.io/qtltools>π
β¨ BUGS β¨
- π versions up to and including
1.2suffer from a bug in reading missing genotypes in VCF/BCF files. this bug affects variants that have aDSfield in their genotype'sFORMATand have a missing genotype (DSfield is.) in one of the samples. when that happens, the genotypes for all the samples get set to missing, which effectively removes that variant from the analyses π
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 β¨
Halit Ongen (halitongen@gmail.com), Olivier Delaneau (olivier.delaneau@gmail.com) π©βπ»π§βπ»
π«Ά bestie, that's the whole tea. this page was brought to you by QTLtools v1.3, dated 06 May 2020, and filed under QTLtools-trans(1) πβ¨π¦
π¦ 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