diff --git a/R/fst_NEI87.R b/R/fst_NEI87.R index 97bb0d2..cf3d868 100644 --- a/R/fst_NEI87.R +++ b/R/fst_NEI87.R @@ -43,7 +43,7 @@ #' @param data A file in the working directory or object in the global environment #' in wide or long (tidy) formats. To import, the function uses internally #' \href{https://github.com/thierrygosselin/stackr}{stackr} -#' \code{\link[stackr]{read_long_tidy_wide}}. See details for more info. +#' \code{\link[stackr]{tidy_wide}}. See details for more info. #' #' \emph{How to get a tidy data frame ?} #' \href{https://github.com/thierrygosselin/stackr}{stackr} @@ -129,7 +129,7 @@ #' @details \strong{Input data:} #' #' To discriminate the long from the wide format, -#' the function \pkg{stackr} \code{\link[stackr]{read_long_tidy_wide}} searches +#' the function \pkg{stackr} \code{\link[stackr]{tidy_wide}} searches #' for \code{MARKERS or LOCUS} in column names (TRUE = long format). #' The data frame is tab delimitted. @@ -158,7 +158,7 @@ #' @rdname fst_NEI87 #' @import parallel #' @importFrom dplyr select distinct n_distinct group_by ungroup rename arrange tally filter if_else mutate summarise left_join inner_join right_join anti_join semi_join full_join summarise_each_ funs summarise_if mutate_if count bind_rows bind_cols ntile desc n -#' @importFrom stackr read_long_tidy_wide change_pop_names +#' @importFrom stackr tidy_wide change_pop_names #' @importFrom tidyr spread gather unite separate complete nesting #' @importFrom stringi stri_replace_all_regex stri_sub stri_join #' @importFrom purrr map @@ -256,7 +256,7 @@ fst_NEI87 <- function( # Import data --------------------------------------------------------------- if (verbose) message("Importing data") - input <- stackr::read_long_tidy_wide(data = data) + input <- stackr::tidy_wide(data = data) # Change individuals names containing special character input$INDIVIDUALS <- stringi::stri_replace_all_fixed( diff --git a/R/fst_WC84.R b/R/fst_WC84.R index 1428330..95595eb 100644 --- a/R/fst_WC84.R +++ b/R/fst_WC84.R @@ -41,7 +41,7 @@ #' @param data A file in the working directory or object in the global environment #' in wide or long (tidy) formats. To import, the function uses internally #' \href{https://github.com/thierrygosselin/stackr}{stackr} -#' \code{\link[stackr]{read_long_tidy_wide}}. See details for more info. +#' \code{\link[stackr]{tidy_wide}}. See details for more info. #' #' \emph{How to get a tidy data frame ?} #' \href{https://github.com/thierrygosselin/stackr}{stackr} @@ -137,7 +137,7 @@ #' @details \strong{Input data:} #' #' To discriminate the long from the wide format, -#' the function \pkg{stackr} \code{\link[stackr]{read_long_tidy_wide}} searches +#' the function \pkg{stackr} \code{\link[stackr]{tidy_wide}} searches #' for \code{MARKERS or LOCUS} in column names (TRUE = long format). #' The data frame is tab delimitted. @@ -166,7 +166,7 @@ #' @rdname fst_WC84 #' @import parallel #' @import ggplot2 -#' @importFrom stackr read_long_tidy_wide discard_monomorphic_markers keep_common_markers change_pop_names detect_biallelic_markers +#' @importFrom stackr tidy_wide discard_monomorphic_markers keep_common_markers change_pop_names detect_biallelic_markers #' @importFrom tidyr separate gather spread unite #' @importFrom purrr map flatten #' @importFrom dplyr mutate summarise group_by ungroup select rename full_join left_join anti_join right_join semi_join filter n_distinct distinct arrange sample_n bind_rows bind_cols ntile desc n @@ -291,7 +291,7 @@ fst_WC84 <- function( # Import data --------------------------------------------------------------- if (verbose) message("Importing data") - input <- stackr::read_long_tidy_wide(data = data, import.metadata = TRUE) + input <- stackr::tidy_wide(data = data, import.metadata = TRUE) # For long tidy format, switch LOCUS to MARKERS column name, if found MARKERS not found if (tibble::has_name(input, "LOCUS") && !tibble::has_name(input, "MARKERS")) { diff --git a/README.Rmd b/README.Rmd index f71d82b..cf718e3 100644 --- a/README.Rmd +++ b/README.Rmd @@ -239,6 +239,10 @@ Danecek P, Auton A, Abecasis G et al. (2011) The variant call format and VCFtool Foll M, Gaggiotti O (2008) A Genome-Scan Method to Identify Selected Loci Appropriate for Both Dominant and Codominant Markers: A Bayesian Perspective. Genetics, 180, 977–993. +Goudet J.hierfstat, a package for r to compute and test hierarchical F-statistics. +Molecular Ecology Notes.2005; 5: 184-186. doi:10.1111/j.1471-8286.2004.00828.x + + Ishwaran H. and Kogalur U.B. (2015). Random Forests for Survival, Regression and Classification (RF-SRC), R package version 1.6.1. Jombart T (2008) adegenet: a R package for the multivariate analysis of genetic markers. Bioinformatics, 24, 1403–1405. diff --git a/README.md b/README.md index d23f0f9..d764563 100644 --- a/README.md +++ b/README.md @@ -274,6 +274,8 @@ Danecek P, Auton A, Abecasis G et al. (2011) The variant call format and VCFtool Foll M, Gaggiotti O (2008) A Genome-Scan Method to Identify Selected Loci Appropriate for Both Dominant and Codominant Markers: A Bayesian Perspective. Genetics, 180, 977–993. +Goudet J.hierfstat, a package for r to compute and test hierarchical F-statistics. Molecular Ecology Notes.2005; 5: 184-186. + Ishwaran H. and Kogalur U.B. (2015). Random Forests for Survival, Regression and Classification (RF-SRC), R package version 1.6.1. Jombart T (2008) adegenet: a R package for the multivariate analysis of genetic markers. Bioinformatics, 24, 1403–1405.