From 31575a5b9e400626e41765cf823a5a1c28d331dd Mon Sep 17 00:00:00 2001 From: Waldir Leoncio Date: Fri, 13 Sep 2024 13:52:39 +0200 Subject: [PATCH] Dropped support for GenePop on `importFile()` File should be handled by `process_GenePop_data()`, as per original BAPS. --- R/importFile.R | 12 +----------- 1 file changed, 1 insertion(+), 11 deletions(-) diff --git a/R/importFile.R b/R/importFile.R index 2ed9c75..57f2fee 100644 --- a/R/importFile.R +++ b/R/importFile.R @@ -1,6 +1,5 @@ #' @title Import data file -#' @description Imports data from several formats (FASTA, VCF, SAM, BAM, -#' Genepop). +#' @description Imports data from several formats (FASTA, VCF, SAM, BAM). #' @param data raw dataset #' @param format data format (guesses from extension if not provided) #' @param verbose if \code{TRUE}, prints extra output information @@ -33,15 +32,6 @@ importFile <- function(data, format, verbose) { ) } else if (format == "bam") { out <- Rsamtools::scanBam(data) - } else if (format == "genepop") { - if (toupper(adegenet::.readExt(data)) == "TXT") { - message("Creating a copy of the file with the .gen extension") - dataGen <- gsub("txt", "gen", data) - file.copy(data, dataGen) - out <- adegenet::read.genepop(dataGen) - } else { - out <- adegenet::read.genepop(data) - } } else { stop("Format not supported.") }