gt_as_geno_lea: Convert a 'gentibble' to a .geno file for sNMF from the LEA...

View source: R/gt_as_geno_lea.R

gt_as_geno_leaR Documentation

Convert a gentibble to a .geno file for sNMF from the LEA package

Description

This function writes a .geno file from a gen_tibble. Unless a file path is given, a file with suffix .geno is written in the same location as the .rds and .bk files that underpin the gen_tibble.

Usage

gt_as_geno_lea(x, file = NULL)

Arguments

x

a gen_tibble

file

the .geno filename with a path, or NULL (the default) to use the location of the backing files.

Details

NOTE that we currently read all the data into memory to write the file, so this function is not suitable for very large datasets.

Value

the path of the .geno file

Examples


example_gt <- load_example_gt("gen_tbl")

# Write a geno file
gt_as_geno_lea(example_gt, file = paste0(tempfile(), "_example.geno"))


tidypopgen documentation built on Aug. 28, 2025, 1:08 a.m.