|
21 | 21 |
|
22 | 22 | #' @param output 29 genomic data formats can be exported: tidy (by default),
|
23 | 23 | #' genepop, genind, genlight, vcf (for file format version, see details below),
|
24 |
| -#' plink, structure, faststructure, arlequin, hierfstat, gtypes (strataG), bayescan, betadiv, |
25 |
| -#' pcadapt, hzar, fineradstructure, related, seqarray, snprelate, maverick, |
26 |
| -#' genepopedit, rubias and hapmap. |
| 24 | +#' plink, structure, faststructure, arlequin, hierfstat, gtypes (strataG), |
| 25 | +#' bayescan, betadiv, pcadapt, hzar, fineradstructure, related, seqarray, |
| 26 | +#' snprelate, maverick, genepopedit, rubias, hapmap and dadi. |
27 | 27 | #' Use a character string,
|
28 | 28 | #' e.g. \code{output = c("genind", "genepop", "structure")}, to have preferred
|
29 | 29 | #' output formats generated. With default, only the tidy format is generated.
|
@@ -790,18 +790,21 @@ genomic_converter <- function(
|
790 | 790 | } # end MavericK output
|
791 | 791 |
|
792 | 792 | # dadi -----------------------------------------------------------------------
|
793 |
| - if ("dadi" %in% output) message("Under construction, use radiator::vcf2dadi") |
| 793 | + if ("dadi" %in% output) { |
| 794 | + radiator::write_dadi( |
| 795 | + data = input |
| 796 | + ) |
| 797 | + message("\n\nNote: To use an outgroup, use radiator::write_dadi separately\n") |
| 798 | + } |
| 799 | + |
| 800 | + |
794 | 801 |
|
795 | 802 | # Writing tidy on disk -------------------------------------------------------
|
796 | 803 | # tidy.name <- stringi::stri_join(filename, ".rad")
|
797 | 804 | # message("\nWriting tidy data set:\n", tidy.name)
|
798 | 805 | # write_rad(data = input, path = tidy.name)
|
799 | 806 |
|
800 |
| - # if (!is.null(imputation.method)) { |
801 |
| - # tidy.name.imp <- stringi::stri_join(filename.imp, ".rad") |
802 |
| - # message("\nWriting tidy data set:\n", tidy.name) |
803 |
| - # write_rad(data = input.imp, path = tidy.name.imp) |
804 |
| - # } |
| 807 | + |
805 | 808 | # outout results -------------------------------------------------------------
|
806 | 809 | if (verbose) {
|
807 | 810 | n.markers <- length(unique(input$MARKERS))
|
|
0 commit comments