QTLtools-ase(1) | Bioinformatics tools | QTLtools-ase(1) |
QTLtools ase - Measure ASE from RNA-seq
QTLtools ase --bam [sample.bam|sample.sam|sample.cram] --vcf [in.vcf|in.bcf|in.vcf.gz] --sample sample_name_in_vcf --mapq integer --out output_file_prefix [OPTIONS]
This mode measures allele specific expression (ASE) from RNAseq for transcribed heterozygous SNPs as detailed in <https://www.ncbi.nlm.nih.gov/pmc/articles/PMC3918453/>. In brief, the reference allele mapping bias is calculated for each of the 12 REF/ALT pairs separately provided that there are at least --sites number of REF/ALT sites that have a minimum --cov-bias number of reads overlapping. For REF/ALT pairs that fail these criteria, reference allele mapping bias is calculated from all sites. Reference allele mapping bias is the number of all reads across many sites that contained the reference allele for a given REF/ALT pair over the total number of reads overlapping. --subsample controls which percentile of the highest covered sites are subsampled, which is necessary so that the reference allele mapping bias is not estimated mostly from very high coverage sites, but from sites covering all the genome. The ASE p-value for each site is then calculated as a two-tailed binomial test checking if the observed number of reference allele reads is significantly different from random, given the total number of reads, and the probability of observing a reference allele, which is the reference allele mapping bias for a certain REF/ALT pair.
The defaults for options should work well for most RNAseq experiments. It is NOT advisable to decrease the --baseq below 10, --cov and --cov-bias below 8, and setting --subsample to 1. It is NOT recommended to use the following options regarding filtering --keep-bans-for-bias, --keep-discordant-for-bias, --filter-duplicates, --ignore-orientation, and --legacy-options. Also refrain from using --auto-flip, but rather create correct VCF/BCF files.
We highly recommended using a BCF file rather than a VCF due to performance benefits, --fasta to provide the genome sequence used, --blacklist to filter low mappability regions, and --gtf to annotate the SNPs. If you are using unfiltered imputed genotypes then consider using --imp-qual and --geno-prob. For trouble shooting purposes you can use --filtered, which will list why certain variants are filtered from the analysis. If you are I/O bound you may try using --group-by for better performance. If your blacklist file contains many overlapping or contiguous regions you can decrease the memory usage with --merge-on-the-fly.
1 | INDIVIDUAL | The sample id |
2 | RSID | The SNP ID from the VCF file |
3 | CHR | Chromosome of the SNP |
4 | POS | Position of the SNP |
5 | ALLELES | The SNP's alleles |
6 | BOTH_ALLELES_SEEN | Whether or not both of the SNP's alleles were seen in the RNAseq reads |
7 | MIN_ALLELE_RATIO | The minor allele ration among RNAseq reads |
8 | REF_COUNT | Number of reference alleles in reads |
9 | NONREF_COUNT | Number of alternative alleles in reads |
10 | TOTAL_COUNT | Number of read overlapping the SNP |
11 | WEIGHTED_REF_COUNT | REF_COUNT adjusted for ref mapping bias |
12 | WEIGHTED_NONREF_COUNT | NONREF_COUNT adjusted for ref mapping bias |
13 | WRC_MINUS_WNC | WEIGHTED_REF_COUNT - WEIGHTED_NONREF_COUNT |
14 | ALLELES_SEEN | Alleles observed in RNAseq reads |
15 | REF_ALLELE | Reference allele |
16 | ALT_ALLELE | Alternative allele |
17 | OTHER_COUNT | Number of discordant reads (not REF or ALT) |
18 | EXPECTED_DISCORDANT | Expected number of discordant alleles. Calculated by adding up all the base error probabilities of RNAseq read positions overlapping the SNP |
19 | DISCORDANT_PVAL | P-value for observed number of discordant reads being more than expected. One can Bonferroni correct these p-values, and exclude the significant ones from downstream analyses. |
20 | REF_RATIO | Reference allele mapping bias |
21 | PVALUE | ASE p-value |
22 | CONCERN | If there were any concerns potentially rendering this SNP unusable, they will be coded here. See below OUTPUT FILE CODES for how to decode |
23 | EXON_INFO | Exons that overlap this SNP will be listed here if a GTF file is provided. Exon names, which are formed by concatenating gene id, transcript id, exon position, and gene name delimited with a colon, are separated with semicolons |
24 | SECONDARY | The number of secondary alignments that were filtered out |
25 | SUPPLEMENTARY | If --filter-supp is provided, then the number of supplementary alignments that were filtered out |
26 | FAIL_MAPQ | The number of alignments that were filtered out due to low mapping quality |
27 | FAILQC | If --keep-failed-qc is not provided, then the number of filtered reads that failed qc according to the sequencer |
28 | DUPLICATE | If --filter-duplicates is provided, then the number of filtered reads that were labeled as duplicate by the aligner |
29 | MATE_UNMAPPED | If --keep-orphan-reads is not provided, then the number of reads that were filtered since one mate was unmapped |
30 | WRONG_ORIENTATION | If --ignore-orientation is not provided, then the number of reads that were filtered since they were in the wrong orientation |
31 | NOT_PROPER_PAIR | If --check-proper-pairing is provided, then the number of filtered reads that were not properly paired according to the aligner |
32 | SKIPPED | The number of alignments that were filtered out since they did not have actual bases overlapping the SNP |
33 | FAIL_BASEQ | The number of filtered reads where the base overlapping the SNP had a base quality less than --baseq |
34 | INDEL | If --filter-indel-reads is provided, then the number of filtered reads that contained indels |
35 | DEPTH | The number alignments that overlap with the SNP position |
1 | INDIVIDUAL | The sample id |
2 | ALLELES | The reference alternative allele pair |
3 | REF_ALL | Total number of reference alleles observed across all sites |
4 | NONREF_ALL | Total number of alternative alleles observed across all sites |
5 | SITES | Number of sites for this REF/ALT pair that pass the thresholds |
6 | SUBSAMPLED_SITES | Number of sites that were subsampled to SUBSAMPLED_TO since they had too high a coverage |
7 | SUBSAMPLED_TO | The coverage SUBSAMPLED_SITES were subsampled to |
8 | PERC | Reference allele mapping bias |
9 | SOURCE | Whether the reference allele mapping bias was calculated from allele specific sites of all sites |
RM | Reference allele in the VCF file mismatches the reference sequence. Requires --fasta |
DP | Multiple variants observed at the same position in the VCF file |
NRA | No reference or alternative allele observed in the RNAseq reads |
MDTA | More discordant (not reference or alternative) alleles than alternative alleles in the RNAseq reads |
MDTR | More discordant (not reference or alternative) alleles than reference alleles in the RNAseq reads |
BANS | Both alleles of the SNP were not observed in RNAseq reads |
LMAR | Among the RNAseq reads the minor allele ratio was less than 2% |
PD | Pileup depth (--max-depth) was potentially exceeded around this SNP. This may prevent some overlapping reads from being counted. We recommend rerunning with a higher --max-depth. |
VMA | Multi-allelic variant |
VU | Variant position or ID is excluded by the user |
VCNIB | Variant chromosome is not in the BAM file |
VB | Variant is in a blacklisted region |
VI | Variant is an indel |
VMRA | Variant is missing either the reference or the alternative allele |
VNIF | Variant is not in the reference genome. Only if --fasta was provided |
VS | Reference and alternative alleles were swapped (not excluded). Only if --auto-flip and --fasta were provided |
VF | Reference and alternative alleles' strand was flipped (not excluded). Only if --auto-flip and --fasta were provided |
VWR | Reference allele does not match the reference sequence. Only if --auto-flip and --fasta were provided |
VBI | Variant failed the imputation quality filter |
VMGT | Variant with missing GT field or variant is not diploid |
VMG | Missing genotype |
VH | Homozygous variant |
VBG | Variant failed the genotype probability filter |
VD | Duplicate variant position |
VMI | Variant with a missing ID (not excluded). Will be renamed if --fix-id is provided |
VDK | Heterozygous variant has another variant with the same position (not excluded) |
BC | Variant did not have enough coverage for reference allele mapping bias calculations |
BBANS | Both alleles were not observed for reference allele mapping bias calculations |
BMDTRA | Variant had more discordant alleles than reference or alternative alleles thus was excluded from reference allele mapping bias calculations |
AC | Variant did not have enough coverage ASE calculations |
ABANS | Both alleles were not observed for ASE calculations |
QTLtools website: <https://qtltools.github.io/qtltools>
Please submit bugs to <https://github.com/qtltools/qtltools>
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>
Halit Ongen (halitongen@gmail.com), Olivier Delaneau (olivier.delaneau@gmail.com)
06 May 2020 | QTLtools-v1.3 |