greedyMix changed to channel data load (close #16)
This commit is contained in:
parent
2ada115bf3
commit
a296f9f8fb
2 changed files with 23 additions and 29 deletions
|
|
@ -1,20 +1,23 @@
|
|||
#' @title Clustering of individuals
|
||||
#' @param tietue File
|
||||
#' @param format Format of the data ("BAPS", "GenePop" or "Preprocessed")
|
||||
#' @param savePreProcessed Save the pre-processed data?
|
||||
#' @param filePreProcessed Is the file already processed?
|
||||
#' @param data data file
|
||||
#' @param format Format of the data c("FASTA", "VCF" ,"SAM", or "GenePop")
|
||||
#' @importFrom utils read.delim
|
||||
#' @export
|
||||
greedyMix <- function(
|
||||
tietue,
|
||||
format = NULL,
|
||||
savePreProcessed = NULL,
|
||||
filePreProcessed = NULL
|
||||
) {
|
||||
stop(
|
||||
"greedyMix() has been superseded by load_fasta().",
|
||||
" Please change your code to use the latter instead of the former.",
|
||||
" If you believe the error is internal to rBAPS, please open",
|
||||
" a new issue (link on the package DESCRIPTION file)."
|
||||
)
|
||||
greedyMix <- function(data, format) {
|
||||
format <- tolower(format)
|
||||
if (format == "fasta") {
|
||||
out <- load_fasta(data)
|
||||
} else if (format == "vcf") {
|
||||
stop("VCF files not yet supported." )
|
||||
# TODO #16: implement load_vcf()
|
||||
} else if (format == "sam") {
|
||||
stop("SAM files not yet supported." )
|
||||
# TODO #16: implement load_sam()
|
||||
} else if(format == "genepop") {
|
||||
# TODO #16: implement load_genepop()
|
||||
stop("GenePop files not yet supported." )
|
||||
} else {
|
||||
stop("Format not supported.")
|
||||
}
|
||||
return(out)
|
||||
}
|
||||
|
|
@ -4,21 +4,12 @@
|
|||
\alias{greedyMix}
|
||||
\title{Clustering of individuals}
|
||||
\usage{
|
||||
greedyMix(
|
||||
tietue,
|
||||
format = NULL,
|
||||
savePreProcessed = NULL,
|
||||
filePreProcessed = NULL
|
||||
)
|
||||
greedyMix(data, format)
|
||||
}
|
||||
\arguments{
|
||||
\item{tietue}{File}
|
||||
\item{data}{data file}
|
||||
|
||||
\item{format}{Format of the data ("BAPS", "GenePop" or "Preprocessed")}
|
||||
|
||||
\item{savePreProcessed}{Save the pre-processed data?}
|
||||
|
||||
\item{filePreProcessed}{Is the file already processed?}
|
||||
\item{format}{Format of the data c("FASTA", "VCF" ,"SAM", or "GenePop")}
|
||||
}
|
||||
\description{
|
||||
Clustering of individuals
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue