Build a single-study QtlDataset from a manifest
describing one row per QTL context (or per trait x context). The manifest
is a data.frame or a path to a delimited file (.csv -> CSV, else
TSV). Column names may be snake_case or camelCase.
Usage
loadQtlDatasetFromManifest(
manifest,
studyName = NULL,
genotypes = NULL,
genotypeCovariates = NULL,
scaleResiduals = TRUE,
genotypeFilterParam = GenotypeFilterParam(),
transposeCovariates = FALSE
)Arguments
- manifest
A data.frame or a path to a manifest file. Recognised columns (canonical camelCase; snake_case aliases accepted):
context(required),phenotypePath(required, bgzipped BED),covariatePath(optional, per-context covariates), and the single-valuedstudy/genotypePath/genotypeCovariatePath.- studyName
Study identifier; reconciled with a
studycolumn.- genotypes
A genotype panel (see
readGenotypes) or a genotype path/prefix; reconciled with agenotypePathcolumn.- genotypeCovariates
A numeric matrix (samples x covariates) or a path to a covariate TSV; reconciled with a
genotypeCovariatePathcolumn.- scaleResiduals
Pass-through
QtlDatasetargument.- genotypeFilterParam
Pass-through
QtlDatasetfiltering options, built withGenotypeFilterParamand stored as lazy QC slots.- transposeCovariates
Transpose covariate TSVs (QTLtools layout) before treating them as samples-as-rows.
Examples
d <- system.file("extdata", "qtl_mini", package = "pecotmr")
manifest <- data.frame(context = "brain",
phenotypePath = file.path(d, "example_geneexpr.bed.gz"),
study = "s1", genotypePath = file.path(d, "example.chr22"))
loadQtlDatasetFromManifest(manifest = manifest, studyName = "s1")
#> QtlDataset for study 's1'
#> 1 context(s): brain
#> 16 unique traits across contexts
#> Genotypes: plink1 @ /tmp/RtmpmBLZhq/temp_libpathaae388f3498/pecotmr/extdata/qtl_mini/example.chr22
#> Genotype covariates: 0 cols
#> Samples: 49
#> Scale residuals: TRUE