Skip to content

Commit

Permalink
Merge pull request #149 from zkamvar/znk-update-export-docs
Browse files Browse the repository at this point in the history
Update conversion documentation
  • Loading branch information
knausb committed Dec 12, 2019
2 parents 0532d57 + dbf1815 commit ea1cdde
Show file tree
Hide file tree
Showing 2 changed files with 38 additions and 4 deletions.
20 changes: 18 additions & 2 deletions R/vcfR_conversion.R
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,10 @@
#' Because 'forks' do not exist in the windows environment, this will only work for windows users when n.cores=1.
#' In the Unix environment, users may increase this number to allow the use of multiple threads (i.e., cores).
#'
#' @note \subsection{For users of \pkg{poppr}}{
#' If you wish to use \code{vcfR2genind()}, it is \strong{strongly recommended} to use it with the option \code{return.alleles = TRUE}.
#' The reason for this is because the \pkg{poppr} package accomodates mixed-ploidy data by interpreting "0" alleles \emph{in genind objects} to be NULL alleles in both \code{poppr::poppr.amova()} and \code{poppr::locus_table()}.
#' }
#'
#'
#' @seealso
Expand Down Expand Up @@ -109,8 +113,20 @@ vcfR2loci <- function(x, return.alleles = FALSE)
#' @param n.cores integer specifying the number of cores to use.
#'
#' @examples
#' data(vcfR_test)
#' gl <- vcfR2genlight(vcfR_test)
#' adegenet_installed <- require("adegenet")
#' if (adegenet_installed) {
#' data(vcfR_test)
#' # convert to genlight (preferred method with bi-allelic SNPs)
#' gl <- vcfR2genlight(vcfR_test)
#'
#' # convert to genind, keeping information about allelic state
#' # (slightly slower, but preferred method for use with the "poppr" package)
#' gid <- vcfR2genind(vcfR_test, return.alleles = TRUE)
#'
#' # convert to genind, returning allelic states as 0, 1, 2, etc.
#' # (not preferred, but slightly faster)
#' gid2 <- vcfR2genind(vcfR_test, return.alleles = FALSE)
#' }
#'
#' @export
vcfR2genlight <- function(x, n.cores=1){
Expand Down
22 changes: 20 additions & 2 deletions man/vcfR_conversion.Rd

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

0 comments on commit ea1cdde

Please sign in to comment.