write_rubias: Write a rubias object

View source: R/write_rubias.R

write_rubiasR Documentation

Write a rubias object

Description

Write a rubias object from a tidy data frame or GDS file/object.

Usage

write_rubias(
  data,
  strata = NULL,
  filename = NULL,
  parallel.core = parallel::detectCores() - 1
)

Arguments

data

(4 options) A file or object generated by radiator:

  • tidy data

  • Genomic Data Structure (GDS)

How to get GDS and tidy data ? Look into tidy_genomic_data, read_vcf or tidy_vcf.

strata

(optional, tibble file or object) This tibble of individual's metadata must contain four columns: SAMPLE_TYPE, REPUNIT, COLLECTION, INDIVIDUALS. Those columns are described in rubias. Default:strata = NULL. With default, SAMPLE_TYPE is filled with reference. REPUNIT and COLLECTION will be filled by the STRATA or POP_ID column found in the data.

filename

The prefix for the name of the file written to the working directory. Default: filename = NULL. With default, only the rubias object is generated. The filename will be appended _rubias.tsv.

parallel.core

(optional) The number of core used for parallel execution during import. Default: parallel.core = parallel::detectCores() - 1.

Value

A rubias object in the global environment and a file is written in the working directory if filename argument was used.

Author(s)

Thierry Gosselin thierrygosselin@icloud.com

References

Moran BM, and Anderson, E. C. 2018 Bayesian inference from the conditional genetic stock identification model. Can. J. Fish. Aquat. Sci. 76: 551-560.

Anderson, Eric C., Robin S. Waples, and Steven T. Kalinowski. (2008) An improved method for predicting the accuracy of genetic stock identification. Canadian Journal of Fisheries and Aquatic Sciences 65, 7:1475-1486.

Anderson, E. C. (2010) Assessing the power of informative subsets of loci for population assignment: standard methods are upwardly biased. Molecular ecology resources 10, 4:701-710.

See Also

/hrefhttps://github.com/eriqande/rubiasrubias: genetic stock identification (GSI) in the tidyverse.


thierrygosselin/radiator documentation built on May 5, 2024, 5:12 a.m.