View source: R/check_bed_table.R
check_bed_table | R Documentation |
.bed
table is valid.Check if a .bed
table is valid.
Will stop if not
check_bed_table(bed_table)
bed_table |
a table that maps the SNPs to the individuals,
of which the column names are the names of the individuals,
the row names are the names of the SNPs,
and the values are the SNP variant.
Use get_test_bed_table to get a |
The class
of a bed_table
must be:
matrix
: on older versions of R, probably before v4.0
c(matrix
, array
): on newer versions of R, probably from v4.0
a checked bed_table
, now of class bed_table
Richèl J.C. Bilderbeek
# Simple .bed table
check_bed_table(get_test_bed_table())
# Read a .bed table from file, one needs a .bim and .fam for that as well
bim_table <- read_plink_bim_file(get_plinkr_filename("toy_data.bim"))
fam_table <- read_plink_fam_file(get_plinkr_filename("toy_data.fam"))
bed_table <- read_plink_bed_file(
bed_filename = get_plinkr_filename("toy_data.bed"),
names_loci = bim_table$id,
names_ind = fam_table$id
)
check_bed_table(bed_table)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.