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
|
#' @title Clustering of individuals
|
||||||
#' @param tietue File
|
#' @param data data file
|
||||||
#' @param format Format of the data ("BAPS", "GenePop" or "Preprocessed")
|
#' @param format Format of the data c("FASTA", "VCF" ,"SAM", or "GenePop")
|
||||||
#' @param savePreProcessed Save the pre-processed data?
|
|
||||||
#' @param filePreProcessed Is the file already processed?
|
|
||||||
#' @importFrom utils read.delim
|
#' @importFrom utils read.delim
|
||||||
#' @export
|
#' @export
|
||||||
greedyMix <- function(
|
greedyMix <- function(data, format) {
|
||||||
tietue,
|
format <- tolower(format)
|
||||||
format = NULL,
|
if (format == "fasta") {
|
||||||
savePreProcessed = NULL,
|
out <- load_fasta(data)
|
||||||
filePreProcessed = NULL
|
} else if (format == "vcf") {
|
||||||
) {
|
stop("VCF files not yet supported." )
|
||||||
stop(
|
# TODO #16: implement load_vcf()
|
||||||
"greedyMix() has been superseded by load_fasta().",
|
} else if (format == "sam") {
|
||||||
" Please change your code to use the latter instead of the former.",
|
stop("SAM files not yet supported." )
|
||||||
" If you believe the error is internal to rBAPS, please open",
|
# TODO #16: implement load_sam()
|
||||||
" a new issue (link on the package DESCRIPTION file)."
|
} 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}
|
\alias{greedyMix}
|
||||||
\title{Clustering of individuals}
|
\title{Clustering of individuals}
|
||||||
\usage{
|
\usage{
|
||||||
greedyMix(
|
greedyMix(data, format)
|
||||||
tietue,
|
|
||||||
format = NULL,
|
|
||||||
savePreProcessed = NULL,
|
|
||||||
filePreProcessed = NULL
|
|
||||||
)
|
|
||||||
}
|
}
|
||||||
\arguments{
|
\arguments{
|
||||||
\item{tietue}{File}
|
\item{data}{data file}
|
||||||
|
|
||||||
\item{format}{Format of the data ("BAPS", "GenePop" or "Preprocessed")}
|
\item{format}{Format of the data c("FASTA", "VCF" ,"SAM", or "GenePop")}
|
||||||
|
|
||||||
\item{savePreProcessed}{Save the pre-processed data?}
|
|
||||||
|
|
||||||
\item{filePreProcessed}{Is the file already processed?}
|
|
||||||
}
|
}
|
||||||
\description{
|
\description{
|
||||||
Clustering of individuals
|
Clustering of individuals
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue