read.resampling
read.resampling.Rd
read.resampling reads all resampled PCAs and performs PANE on each one. It returns a list containing all PANE results per each resampling. The output can then be used in the se.resampling function, to estimate the standard error.
Arguments
- path_tofiles
string containing directory path to the resampling files.
- file_pattern
string containing common pattern to find the all PCAs obtained by resampling
- as_file
R data.frame with two columns: POP and A/S, POP column lists all populations to be considered, A/S indicates whether the population should be considered as Admixed ('A') or as Source ('S')
- eigentype
if present, PCA will be read through read_eigen() function, if absent PCA will be loaded via read_flash()
Examples
if (FALSE) {
example_as = read.table('data/Example_AS', header=TRUE)
pca_jackknife = read.resampling(path_tofiles = 'data/', file_pattern = '*_Jack*', as_file = example_as, eigentype) #OR
pca_jackknife = read.resampling(path_tofiles = 'data/', file_pattern = '*_Jack*', as_file = example_as)
}