Package 'PlinkMatrix'

Title: DelayedArray interface for plink bed files
Description: This package provides a DelayedArray interface for plink bed files. There is support for interfacing to plink genotype data via RangedSummarizedExperiment. Example data from the GEUVADIS project (internationalgenome.org) are used for demonstration.
Authors: Vince Carey [aut, cre] (ORCID: <https://orcid.org/0000-0003-4046-0063>), NHGRI U24HG004059 [fnd]
Maintainer: Vince Carey <[email protected]>
License: MIT + file LICENSE
Version: 1.1.0
Built: 2026-05-30 09:35:27 UTC
Source: https://github.com/bioc/PlinkMatrix

Help Index


Method: dim for delayed plink

Description

Method: dim for delayed plink

Usage

## S4 method for signature 'PlinkSeed'
dim(x)

Arguments

x

PlinkSeed instance

Value

2-vector

Examples

methods(class="PlinkSeed")

Method: dimnames for delayed plink

Description

Method: dimnames for delayed plink

Usage

## S4 method for signature 'PlinkSeed'
dimnames(x)

Arguments

x

PlinkSeed instance

Value

list of dimnames


sample GRanges coordinated with example_PlinkMatrix

Description

sample GRanges coordinated with example_PlinkMatrix

Usage

data("example_GRanges", package="PlinkMatrix")

Format

GRanges

Examples

data("example_GRanges", package="PlinkMatrix")
head(example_GRanges)

produce PlinkMatrix from example data

Description

produce PlinkMatrix from example data

Usage

example_PlinkMatrix(folder = tempdir(), as_RSE = FALSE)

Arguments

folder

a path where unzipped example data will be managed

as_RSE

logical(1) if TRUE (default is FALSE) a RangedSummarizedExperiment is returned

Value

a SummarizedExperiment or RangedSummarizedExperiment with rowRanges calculated from SNP ids

Examples

example_PlinkMatrix()

sample characteristics of 445 GEUVADIS samples

Description

sample characteristics of 445 GEUVADIS samples

Usage

data("g445samples", package="PlinkMatrix")

Format

data.frame

Note

Example data are those provided with tensorqtl, see https://github.com/broadinstitute/tensorqtl/tree/0c4db65a0cdc47f3b824ae530b89d270ef5e0096/example/data.

Examples

data("g445samples", package="PlinkMatrix")
g445samples[seq_len(4), seq_len(4)]

Get sample metadata

Description

Get sample metadata

Usage

getSampleData(x)

Arguments

x

DelayedArray instance

Value

data.frame

Examples

tst <- example_PlinkMatrix()
head(getSampleData(tst))

Get variant metadata

Description

Get variant metadata

Usage

getVariantData(x)

Arguments

x

DelayedArray instance

Value

data.frame

Examples

tst <- example_PlinkMatrix()
dim(getVariantData(tst))

produce GRanges from variant notation for plink example from geuvadis

Description

produce GRanges from variant notation for plink example from geuvadis

Usage

plid2gr(x, sepused = "_")

Arguments

x

character vector of variant names

sepused

single character, defaults to "_"

Value

GRanges instance

Examples

plid2gr("chr18_80259028_AG_A_b38")

Constructor for DelayedArray

Description

Constructor for DelayedArray

Usage

PlinkMatrix(filepath)

Arguments

filepath

path to plink bed, bim, fam resources without suffixes

Value

An instance of PlinkMatrix

Examples

PlinkMatrix

Delayed interface to Plink genotype files

Description

This package includes C++ code to interface to Plink files. Large-scale genotype calls can be managed in a RangedSummarized Experiment instance.

Value

side effects


read subset for use in delayed matrix approach

Description

read subset for use in delayed matrix approach

Usage

read_bed_subset(prefix, snp_indices, sample_indices, n_total_samples = NULL)

Arguments

prefix

character path to bed resources and file prefix

snp_indices

integer vector of snp indices

sample_indices

integer vector of sample indices

n_total_samples

optional

Value

matrix

Examples

read_bed_subset

present seed concisely

Description

present seed concisely

Usage

## S4 method for signature 'PlinkSeed'
show(object)

Arguments

object

instance of PlinkSeed

Value

side effect of cat

Examples

ex <- example_PlinkMatrix()
ex