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.
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.- study
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, mafCutoff, macCutoff, xvarCutoff
Pass-through
QtlDatasetarguments (stored as lazy QC slots).- imissCutoff, keepSamples, keepVariants, keepIndel
Pass-through
QtlDatasetarguments (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, study = "s1")
#> QtlDataset for study 's1'
#> 1 context(s): brain
#> 16 unique traits across contexts
#> Genotypes: plink1 @ /tmp/RtmppU8QTb/temp_libpath984aa04109/pecotmr/extdata/qtl_mini/example.chr22
#> Genotype covariates: 0 cols
#> Samples: 49
#> Scale residuals: TRUE