Load data into a mavproject prior to analysis. Data must be formatted as a dataframe with samples in rows and loci in columns. If individuals are polyploid then multiple rows can be used per sample. Ploidy is allowed to vary between samples, and can be specified in multiple ways.

bind_data(
  project,
  df,
  ID_col = 1,
  pop_col = NULL,
  ploidy_col = NULL,
  data_cols = NULL,
  ID = NULL,
  pop = NULL,
  ploidy = NULL,
  missing_data = -9,
  wide_format = FALSE,
  name = NULL,
  check_delete_output = TRUE
)

Arguments

project

an rmaverick project, as produced by the function mavproject()

df

a dataframe containing genetic information and optional meta-data

ID_col

which column of the input data contains the sample IDs. If NULL then IDs must be defined seperately through the ID argument

pop_col

which column of the input data contains the ostensible population of the samples. If NULL then populations must be defined seperately through the pop argument

ploidy_col

which column of the input data contains the ploidy of the samples. If NULL then ploidy must be defined seperately through the ploidy argument

data_cols

which columns of the input data contain genetic information. Defaults to all remaining columns of the data once special columns have been accounted for

ID

sample IDs, if not using the ID_col option

pop

ostensible populations, if not using the pop_col option

ploidy

sample ploidy, if not using the ploidy_col option. Can be a scalar, in which case the same value is used for all samples, or a vector specifying the ploidy seperately for each sample.

missing_data

which value represents missing data

wide_format

if TRUE then uses one line per sample, with loci stacked side-by-side in columns. When using this format the ploidy must be the same for all samples, and must be specified using the ploidy variable rather than as a seperate column

name

optional name of the data set to aid in record keeping

check_delete_output

whether to prompt the user before overwriting existing data