Description Usage Arguments Details Value Author(s) See Also Examples
View source: R/class_dmSQTLdata.R
Constructor functions for a dmSQTLdata
object.
dmSQTLdata assignes to a gene all the SNPs that are located in a given
surrounding (window
) of this gene.
1 2 | dmSQTLdata(counts, gene_ranges, genotypes, snp_ranges, samples, window = 5000,
BPPARAM = BiocParallel::SerialParam())
|
counts |
Data frame with counts. Rows correspond to features, for
example, transcripts or exons. This data frame has to contain a
|
gene_ranges |
|
genotypes |
Data frame with genotypes. Rows correspond to SNPs. This
data frame has to contain a |
snp_ranges |
|
samples |
Data frame with column |
window |
Size of a down and up stream window, which is defining the surrounding for a gene. Only SNPs that are located within a gene or its surrounding are considered in the sQTL analysis. |
BPPARAM |
Parallelization method used by
|
It is quite common that sample grouping defined by some of the SNPs is
identical. Compare dim(genotypes)
and dim(unique(genotypes))
.
In our QTL analysis, we do not repeat tests for the SNPs that define the
same grouping of samples. Each grouping is tested only once. SNPs that define
such unique groupings are aggregated into blocks. P-values and adjusted
p-values are estimated at the block level, but the returned results are
extended to a SNP level by repeating the block statistics for each SNP that
belongs to a given block.
Returns a dmSQTLdata
object.
Malgorzata Nowicka
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 | # --------------------------------------------------------------------------
# Create dmSQTLdata object
# --------------------------------------------------------------------------
# Use subsets of data defined in the GeuvadisTranscriptExpr package
library(GeuvadisTranscriptExpr)
geuv_counts <- GeuvadisTranscriptExpr::counts
geuv_genotypes <- GeuvadisTranscriptExpr::genotypes
geuv_gene_ranges <- GeuvadisTranscriptExpr::gene_ranges
geuv_snp_ranges <- GeuvadisTranscriptExpr::snp_ranges
colnames(geuv_counts)[c(1,2)] <- c("feature_id", "gene_id")
colnames(geuv_genotypes)[4] <- "snp_id"
geuv_samples <- data.frame(sample_id = colnames(geuv_counts)[-c(1,2)])
d <- dmSQTLdata(counts = geuv_counts, gene_ranges = geuv_gene_ranges,
genotypes = geuv_genotypes, snp_ranges = geuv_snp_ranges,
samples = geuv_samples, window = 5e3)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.