Dropped support for GenePop on importFile()
File should be handled by `process_GenePop_data()`, as per original BAPS.
This commit is contained in:
parent
00605016d6
commit
31575a5b9e
1 changed files with 1 additions and 11 deletions
|
|
@ -1,6 +1,5 @@
|
||||||
#' @title Import data file
|
#' @title Import data file
|
||||||
#' @description Imports data from several formats (FASTA, VCF, SAM, BAM,
|
#' @description Imports data from several formats (FASTA, VCF, SAM, BAM).
|
||||||
#' Genepop).
|
|
||||||
#' @param data raw dataset
|
#' @param data raw dataset
|
||||||
#' @param format data format (guesses from extension if not provided)
|
#' @param format data format (guesses from extension if not provided)
|
||||||
#' @param verbose if \code{TRUE}, prints extra output information
|
#' @param verbose if \code{TRUE}, prints extra output information
|
||||||
|
|
@ -33,15 +32,6 @@ importFile <- function(data, format, verbose) {
|
||||||
)
|
)
|
||||||
} else if (format == "bam") {
|
} else if (format == "bam") {
|
||||||
out <- Rsamtools::scanBam(data)
|
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 {
|
} else {
|
||||||
stop("Format not supported.")
|
stop("Format not supported.")
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue