From 882fcd4112f8538b060662fc5f185693f2f17933 Mon Sep 17 00:00:00 2001 From: Waldir Leoncio Date: Mon, 11 Sep 2023 12:51:41 +0200 Subject: [PATCH] Exporting importFile() --- NAMESPACE | 1 + R/importFile.R | 11 +++++++++++ man/importFile.Rd | 26 ++++++++++++++++++++++++++ 3 files changed, 38 insertions(+) create mode 100644 man/importFile.Rd diff --git a/NAMESPACE b/NAMESPACE index 11639f0..ea66867 100644 --- a/NAMESPACE +++ b/NAMESPACE @@ -2,6 +2,7 @@ export(greedyMix) export(handleData) +export(importFile) export(load_fasta) importFrom(R6,R6Class) importFrom(Rsamtools,scanBam) diff --git a/R/importFile.R b/R/importFile.R index d854adf..2ed9c75 100644 --- a/R/importFile.R +++ b/R/importFile.R @@ -1,3 +1,14 @@ +#' @title Import data file +#' @description Imports data from several formats (FASTA, VCF, SAM, BAM, +#' Genepop). +#' @param data raw dataset +#' @param format data format (guesses from extension if not provided) +#' @param verbose if \code{TRUE}, prints extra output information +#' @return The data in a format that can be used by the other functions +#' @export +#' @examples +#' path_inst <- system.file("extdata", "", package = "rBAPS") +#' importFile(file.path(path_inst, "FASTA_clustering_haploid.fasta")) importFile <- function(data, format, verbose) { # Parsing data format ------------------------------------------------------ diff --git a/man/importFile.Rd b/man/importFile.Rd new file mode 100644 index 0000000..9adb584 --- /dev/null +++ b/man/importFile.Rd @@ -0,0 +1,26 @@ +% Generated by roxygen2: do not edit by hand +% Please edit documentation in R/importFile.R +\name{importFile} +\alias{importFile} +\title{Import data file} +\usage{ +importFile(data, format, verbose) +} +\arguments{ +\item{data}{raw dataset} + +\item{format}{data format (guesses from extension if not provided)} + +\item{verbose}{if \code{TRUE}, prints extra output information} +} +\value{ +The data in a format that can be used by the other functions +} +\description{ +Imports data from several formats (FASTA, VCF, SAM, BAM, +Genepop). +} +\examples{ +path_inst <- system.file("extdata", "", package = "rBAPS") +importFile(file.path(path_inst, "FASTA_clustering_haploid.fasta")) +}