sqtl.seeker: sQTL seeker

Description Usage Arguments Details Value Author(s)

View source: R/sqtl.seeker.R

Description

sqtl.seeker is the main function of sQTLseekeR2 package. From transcript relative expression, prepared using prepare.trans.exp, information about the gene location and the path to an ordered genotype file, indexed by the function index.genotype, association between each SNP and the transcript relative expression is tested. Eventually, svQTL, i.e. SNPs affecting splicing variability can also be tested to pinpoint potentially false sQTL (see Details).

Usage

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
sqtl.seeker(
  tre.df,
  genotype.f,
  gene.loc,
  covariates = NULL,
  genic.window = 5000,
  min.nb.ext.scores = 1000,
  nb.perm.max = 1e+06,
  nb.perm.max.svQTL = 10000,
  svQTL = FALSE,
  asympt = TRUE,
  ld.filter = NULL,
  min.nb.ind.geno = 10,
  verbose = FALSE
)

Arguments

tre.df

a data.frame with transcript relative expression produced by 'prepare.trans.exp'.

genotype.f

the name of the genotype file. This file needs to be ordered by position, compressed and indexed using 'index.genotype' or externally using tabix (samtools). Must have column 'snpId'.

gene.loc

a data.frame with the genes location. Columns 'chr', 'start', 'end' and 'geneId' are required.

covariates

a data.frame with covariate information per sample (samples x covariates). Rownames should be the sample ids. Covariates can be either numeric or factor. When provided, they are regressed out before testing the genotype effect. Default is NULL.

genic.window

the window(bp) around the gene in which the SNPs are tested. Default is 5000 (i.e. 5kb).

min.nb.ext.scores

the minimum number of permuted score higher than the highest true score to allow the computation to stop. Default is 1000.

nb.perm.max

the maximum number of permutations. Default is 1e6.

nb.perm.max.svQTL

the maximum number of permutations for the svQTL computation. Default is 1e4.

svQTL

should svQTLs test be performed in addition to sQTLs. Default is FALSE. Warning: computation of svQTLs cannot rely on asymptotic approximation, hence the heavy permutations will considerably increase the running time.

asympt

should the asymptotic null distribution be used to assess significance instead of permutations. The davies method in the CompQuadForm package is employed to compute P-values. Default is TRUE.

ld.filter

Linkage disequilibrium threshold (r2) over which variants should be merged, so that only one SNP per LD block is tested. Only variants over the treshold that have highly similar pseudo F scores will be merged. Default is NULL.

min.nb.ind.geno

SNPs with less samples than min.nb.ind.geno in any genotype group are filtered out. Default is 10.

verbose

Should the gene IDs be outputed when analyzed. Default is TRUE. Mainly for debugging.

Details

A set of filters is automatically set to remove SNPs which are unpractical or not informative (see also check.genotype function). Precisely, these filters remove SNP with:

Testing differences in transcript relative expression between genotype groups assumes homogeneity of the variances in these groups. Testing this assumption is more complex and computationnally intensive but if needed the user can choose to test for svQTL (splicing variability QTL), i.e. gene/SNPs where this assumption is violated, by using the svQTL = TRUE. This test is run in parallel to the sQTL tests, but the computation time will be considerably higher. For this reason, another parameter can be tweaked, nb.perm.max.svQTL, to reduce the number of permutations for the svQTL tests if needed for feasibility reasons.

The permutation process is optimized by computing one permuted distribution per gene and using a number of permutations dependant on how extreme are the observed scores when compared to the permuted ones. To decrease even more the computation time, an approximation of the null F distribution was given by Anderson & Robinson (2003), as a misture of Chi-square distributions whose parameters are derived from the eigen values of the distance matrix.

In addition to the F score and P-value, the maximum difference(MD) in relative expression between genotype groups is reported. This is to be used as a measure of the size of the effect. For example, if 'md' is 0.2 there is one transcript whose relative expression shifted by 20 percent between two genotype groups.

Value

a data.frame with columns

geneId

the gene name.

snpId

the SNP name.

F

the F score.

nb.groups

the number of genotype groups (2 or 3).

md

the maximum difference in relative expression between genotype groups (see Details).

tr.first/tr.second

the transcript IDs of the two transcripts that change the most (and symetrically).

info

comma separated list with the individuals per genotype group: -1,0,1,2.

pv

the P-value.

nb.perms

the number of permutations used for the P-value computation.

F.svQTL/pv.svQTL/nb.perms.svQTL

idem for svQTLs, if svQTL is TRUE'.

LD

if ld.filter is not NULL, the variants in high LD (r2 >= ld.filter) with the tested variant that also have a similar Fscore.

Author(s)

Jean Monlong, Diego Garrido-Martín


guigolab/sQTLseekeR2 documentation built on Nov. 20, 2021, 3:21 a.m.