This function splits a large matrix into smaller blocks with cols_per_chunk
columns per block,
and saves them as .rds
files with prefix prefix
split_mat(mat, cols_per_chunk, prefix, overwrite = TRUE, verbose = TRUE)
The matrix to be split
Number of columns per block
Prefix of output files
Overwrite existing files (default TRUE
)
Print progress updates
if (FALSE) {
afdat = packedancestrymap_to_afs('path/to/packedancestrymap_prefix', allpopulations)
split_mat(afdat$afs, cols_per_chunk = 20, prefix = 'afdat_split_v42.1/afs')
}