Construct a MultiStudyQtlDataset S4 object from a named
list of QtlDataset objects (individual-level studies) and an
optional QtlSumStats of summary-statistic-only studies. The total
study count must be at least two, satisfied by either (a) at least two
qtlDatasets entries, or (b) at least one qtlDatasets entry
plus a non-empty sumStats.
Examples
panel <- readGenotypes(
system.file("extdata", "toy_ref.bed", package = "pecotmr")
)
rng <- GenomicRanges::GRanges(
"chr22", IRanges::IRanges(14600000L, width = 1000L)
)
names(rng) <- "ENSG1"
se <- SummarizedExperiment::SummarizedExperiment(
assays = list(expression = matrix(
rnorm(ncol(panel)), 1,
dimnames = list("ENSG1", colnames(panel))
)),
rowRanges = rng
)
qd1 <- QtlDataset(
study = "s1", genotypes = panel, phenotypes = list(brain = se)
)
qd2 <- QtlDataset(
study = "s2", genotypes = panel, phenotypes = list(brain = se)
)
MultiStudyQtlDataset(qtlDatasets = list(s1 = qd1, s2 = qd2))
#> MultiStudyQtlDataset: 2 individual-level + 0 sumstats studies
#> Individual-level studies: s1, s2