rearrangeInputsForAssoGenet: Plant association genetics

View source: R/quantgen.R

rearrangeInputsForAssoGenetR Documentation

Plant association genetics

Description

Subset and sort inputs necessary to perform an analysis of plant association genetics, that is, the subset of cultivars with genotypes and phenotypes, and the subset of markers having genotypes and coordinates.

Usage

rearrangeInputsForAssoGenet(
  ids,
  y,
  X,
  snp.coords,
  alleles,
  rename.chr.prefix = NULL,
  verbose = 1
)

Arguments

ids

data.frame of identifiers, with (at least) column names cultivar.code and accession.code; the outputs will be sorted according to this option

y

vector, matrix or data.frame which row names should be present in ids$cultivar.code or ids$accession.code

X

matrix of bi-allelic SNP genotypes encoded in allele doses in [0,2], with genotypes in rows and SNPs in columns; the "second" allele is arbitrary, it corresponds to the second column of alleles, which can be the minor or the major allele; row names should be present in ids$accession.code or ids$cultivar.code, and column names in rownames(snp.coords)

snp.coords

data.frame with 2 columns coord and chr, and SNP identifiers as row names

alleles

data.frame with SNPs in rows (names as row names) and alleles in columns (exactly 2 columns are required); the second column should correspond to the allele which number of copies is counted at each SNP in X

rename.chr.prefix

if not NULL, the value of this parameter will be passed to chromNames2integers so that chromosome names from snp.coords will be renamed as integers

verbose

verbosity level (0/1)

Value

list with inputs after subsetting and sorting

Author(s)

Timothee Flutre

See Also

chromNames2integers


timflutre/rutilstimflutre documentation built on Feb. 7, 2024, 8:17 a.m.