gl.read.dart: Imports DArT data into dartR and converts it into a genlight...

View source: R/gl.read.dart.r

gl.read.dartR Documentation

Imports DArT data into dartR and converts it into a genlight object

Description

This function is a wrapper function that allows you to convert your DArT file into a genlight object in one step. In previous versions you had to use read.dart and then dart2genlight. In case you have individual metadata for each individual/sample you can specify as before in the dart2genlight command the file that combines the data.

Usage

gl.read.dart(
  filename,
  ind.metafile = NULL,
  recalc = TRUE,
  mono.rm = FALSE,
  nas = "-",
  topskip = NULL,
  lastmetric = "RepAvg",
  covfilename = NULL,
  service_row = 1,
  plate_row = 3,
  probar = FALSE,
  verbose = NULL
)

Arguments

filename

File containing the SNP data (csv file) [required].

ind.metafile

File that contains additional information on individuals [required].

recalc

Force the recalculation of locus metrics, in case individuals have been manually deleted from the input csv file [default TRUE].

mono.rm

Force the removal of monomorphic loci (including all NAs), in case individuals have been manually deleted from the input csv file [default FALSE].

nas

A character specifying NAs [default '-'].

topskip

A number specifying the number of rows to be skipped. If not provided the number of rows to be skipped are 'guessed' by the number of rows with '*' at the beginning [default NULL].

lastmetric

Specifies the last non-genetic column (Default is 'RepAvg'). Be sure to check if that is true, otherwise the number of individuals will not match. You can also specify the last column by a number [default 'RepAvg'].

covfilename

Use ind.metafile parameter [depreciated, NULL].

service_row

The row number in which the information of the DArT service is contained [default 1].

plate_row

The row number in which the information of the plate location is contained [default 3].

probar

Show progress bar [default FALSE].

verbose

Verbosity: 0, silent or fatal errors; 1, begin and end; 2, progress log ; 3, progress and results summary; 5, full report [default 2, or as set by gl.set.verbose()].

Details

The dartR genlight object can then be fed into a number of initial screening, export and export functions provided by the package. For some of the functions it is necessary to have the metadata that was provided from DArT. Please check the vignette for more information. Additional information can also be found in the help documents for utils.read.dart.

Value

A genlight object that contains individual metrics [if data were provided] and locus metrics [from a DArT report].

Author(s)

Custodian: Bernd Gruber (Post to https://groups.google.com/d/forum/dartr)

See Also

utils.read.dart

Examples

dartfile <- system.file('extdata','testset_SNPs_2Row.csv', package='dartR')
metadata <- system.file('extdata','testset_metadata.csv', package='dartR')
gl <- gl.read.dart(dartfile, ind.metafile = metadata, probar=TRUE)


dartR documentation built on June 8, 2023, 6:48 a.m.