run_SNMF: Wrapper for LEA snmf Runs LEA function snmf function and...

run_sNMFR Documentation

Wrapper for LEA snmf Runs LEA function snmf function and generate a pdf with various useful plots; optionally interpolate cluster assignments onto a map.

Description

Wrapper for LEA snmf

Runs LEA function snmf function and generate a pdf with various useful plots; optionally interpolate cluster assignments onto a map.

Usage

run_sNMF(
  x,
  format = "VCF",
  coords = NULL,
  samplenames = NULL,
  kmax = 10,
  reps = 30,
  entropy = TRUE,
  project = "new",
  iter = 500,
  save.in = NULL,
  include.out = c(".pdf", ".Qlog", ".entropyLog"),
  overwrite = FALSE,
  ...
)

Arguments

x

'vcfR' object (see package::vcfR) or a character string with path to a SNPs dataset formatted according to the 'format' argument. Currently VCF or 'fastStructure' (a type of STRUCTURE format) can be used.

format

Character string indicating the format of the data. Currently only "VCF" or "fastStructure" allowed. Other types may be added. Ignored if x is a vcfR object.

coords

Either a character string with path to file containing coordinates (longitude in first column, latitude in second column), or matrix object with longitude and latitude columns.

samplenames

NULL or a character string vector with names of samples (in same order) as data in x and coords. If NULL (the default), sample names are extracted from x.

kmax

Number indicating the maximum number of clusters to evaluate. Default is 10, which is converted using kmax = min(kmax, number of individuals-1)

reps

Number of repititions. Default 30.

entropy

Default TRUE

project

Defualt 'new'

iter

Default 500

save.in

Character string with path to directory where output files should be saved.

include.out

Character strings indicating what output files should be generated. If "entropy.mat" is provided, the function writes the crossentropy matrix and is done.

overwrite

Logical indicating whether or not to allow new output files to overwrite existing ones. Default FALSE.

...

Additional arguments passed to 'snmf' function of LEA package

save.as

Character string with where to save the output PDF with plots of results. Default is NULL.

Value

List of plots


JeffWeinell/misc.wrappers documentation built on Sept. 20, 2023, 12:42 p.m.