diff --git a/NAMESPACE b/NAMESPACE index c80ffba..f4a2451 100644 --- a/NAMESPACE +++ b/NAMESPACE @@ -1,45 +1,7 @@ # Generated by roxygen2: do not edit by hand -export(addAlleles) -export(admix1) -export(calculatePopLogml) -export(computeAllFreqs2) -export(computeIndLogml) -export(computePersonalAllFreqs) -export(computeRows) -export(etsiParas) -export(fgetl) -export(fopen) export(greedyMix) -export(greedyPopMix) -export(handleData) -export(handlePopData) -export(initPopNames) -export(learn_partition_modified) -export(learn_simple_partition) -export(linkage) export(load_fasta) -export(logml2String) -export(lueGenePopData) -export(lueGenePopDataPop) -export(lueNimi) -export(noIndex) -export(ownNum2Str) -export(poistaLiianPienet) -export(proportion2str) -export(randdir) -export(rivinSisaltamienMjonojenLkm) -export(selvitaDigitFormat) -export(simulateAllFreqs) -export(simulateIndividuals) -export(simuloiAlleeli) -export(suoritaMuutos) -export(takeLine) -export(testaaKoordinaatit) -export(testaaOnkoKunnollinenBapsData) -export(testaaPop) -export(writeMixtureInfo) -export(writeMixtureInfoPop) importFrom(R6,R6Class) importFrom(Rsamtools,scanBam) importFrom(adegenet,.readExt) diff --git a/R/addAlleles.R b/R/addAlleles.R index 8f08341..9854027 100644 --- a/R/addAlleles.R +++ b/R/addAlleles.R @@ -4,7 +4,6 @@ #' @param line line #' @param divider divider #' @return data (after alleles were added) -#' @export addAlleles <- function(data, ind, line, divider) { # Lisaa BAPS-formaatissa olevaan datataulukkoon # yksil�� ind vastaavat rivit. Yksil�n alleelit diff --git a/R/admix1.R b/R/admix1.R index 689c5c2..a91e616 100644 --- a/R/admix1.R +++ b/R/admix1.R @@ -6,7 +6,6 @@ #' alleleCodes, adjprior, popnames, rowsFromInd, data, npops, noalle #' @param tietue tietue #' @importFrom methods is -#' @export admix1 <- function(tietue) { if (!is.list(tietue)) { message("Load mixture result file. These are the files in this directory:") diff --git a/R/calculatePopLogml.R b/R/calculatePopLogml.R index 2803697..c10bd63 100644 --- a/R/calculatePopLogml.R +++ b/R/calculatePopLogml.R @@ -4,7 +4,6 @@ #' for the mean parameter. #' @param points points #' @param fii fii -#' @export calculatePopLogml <- function(points, fii) { n <- length(points) fuzzy_ones <- sum(points) diff --git a/R/computeAllFreqs2.R b/R/computeAllFreqs2.R index d6f623a..bb89bd2 100644 --- a/R/computeAllFreqs2.R +++ b/R/computeAllFreqs2.R @@ -2,7 +2,6 @@ #' @description Lisää a priori jokaista alleelia joka populaation joka lokukseen #' j 1/noalle(j) verran. #' @param noalle noalle -#' @export computeAllFreqs2 <- function(noalle) { COUNTS <- ifelse(isGlobalEmpty(COUNTS), vector(), COUNTS) SUMCOUNTS <- ifelse(isGlobalEmpty(SUMCOUNTS), vector(), COUNTS) diff --git a/R/computeIndLogml.R b/R/computeIndLogml.R index d928e6b..d1095e7 100644 --- a/R/computeIndLogml.R +++ b/R/computeIndLogml.R @@ -3,7 +3,6 @@ #' määritellyiksi kuten osuusTaulu:ssa. #' @param omaFreqs own Freqs? #' @param osuusTaulu Percentage table? -#' @export computeIndLogml <- function(omaFreqs, osuusTaulu) { omaFreqs <- as.matrix(omaFreqs) osuusTaulu <- as.matrix(osuusTaulu) diff --git a/R/computePersonalAllFreqs.R b/R/computePersonalAllFreqs.R index 4b91327..142bffe 100644 --- a/R/computePersonalAllFreqs.R +++ b/R/computePersonalAllFreqs.R @@ -7,8 +7,6 @@ #' @param data data #' @param allFreqs allFreqs #' @param rowsFromInd rowsFromInd -#' @export - computePersonalAllFreqs <- function(ind, data, allFreqs, rowsFromInd) { if (isGlobalEmpty(COUNTS)) { nloci <- npops <- 1 diff --git a/R/computeRows.R b/R/computeRows.R index ab95da9..7221fd6 100644 --- a/R/computeRows.R +++ b/R/computeRows.R @@ -4,7 +4,6 @@ #' @param rowsFromInd rowsFromInd #' @param inds matrix #' @param ninds ninds -#' @export computeRows <- function(rowsFromInd, inds, ninds) { if (!is(inds, "matrix")) inds <- as.matrix(inds) if (identical(dim(inds), c(nrow(inds), 1L))) { diff --git a/R/etsiParas.R b/R/etsiParas.R index 80ee063..da03d73 100644 --- a/R/etsiParas.R +++ b/R/etsiParas.R @@ -1,4 +1,3 @@ -#' @export #' @title Etsi Paras #' @description Search for the best? #' @param osuus Percentages? diff --git a/R/fgetl-fopen.R b/R/fgetl-fopen.R index 6442fbf..8b255ee 100644 --- a/R/fgetl-fopen.R +++ b/R/fgetl-fopen.R @@ -6,7 +6,6 @@ #' fgetl returns tline as a numeric value -1. #' @author Waldir Leoncio #' @seealso fopen -#' @export fgetl <- function(file) { # ========================================================================== # Validation @@ -27,5 +26,4 @@ fgetl <- function(file) { #' @return The same as `readLines(filename)` #' @author Waldir Leoncio #' @seealso fgetl -#' @export fopen <- function(filename) readLines(filename) diff --git a/R/greedyPopMix.R b/R/greedyPopMix.R index fcb02db..d2114c7 100644 --- a/R/greedyPopMix.R +++ b/R/greedyPopMix.R @@ -11,7 +11,6 @@ #' @importFrom matlab2r uiputfile #' @references Samtools: a suite of programs for interacting #' with high-throughput sequencing data. -#' @export greedyPopMix <- function(data, format, partitionCompare = NULL, verbose = TRUE ) { # Replacing original file reading code with greedyMix() diff --git a/R/handleData.R b/R/handleData.R index 637d62a..03a6191 100644 --- a/R/handleData.R +++ b/R/handleData.R @@ -8,7 +8,6 @@ #' code to the smallest code that is larger than any code in use. After this, #' the function changes the allele codes so that one locus j #' codes get values between? 1, ..., Noah (j). -#' @export handleData <- function(raw_data) { # Alkuper?isen datan viimeinen sarake kertoo, milt?yksil?lt? # kyseinen rivi on per?isin. Funktio tutkii ensin, ett?montako diff --git a/R/handlePopData.R b/R/handlePopData.R index eba3873..7d3815e 100644 --- a/R/handlePopData.R +++ b/R/handlePopData.R @@ -4,7 +4,6 @@ #' codes so that the codes for one locus have values between 1 and noalle[j]. #' Before this change, an allele whose code is zero is changed. #' @param raw_data raw data -#' @export handlePopData <- function(raw_data) { # Alkuperäisen datan viimeinen sarake kertoo, milt?yksilölt? # kyseinen rivi on peräisin. Funktio muuttaa alleelikoodit diff --git a/R/initPopNames.R b/R/initPopNames.R index 3a01e15..749808a 100644 --- a/R/initPopNames.R +++ b/R/initPopNames.R @@ -1,7 +1,6 @@ #' @title Initialize Pop Names #' @param nameFile nameFile #' @param indexFile indexFile -#' @export initPopNames <- function(nameFile, indexFile) { # Palauttaa tyhj�n, mik�li nimitiedosto ja indeksitiedosto # eiv�t olleet yht?pitki? diff --git a/R/learn_partition_modified.R b/R/learn_partition_modified.R index 03f8e5a..d89df43 100644 --- a/R/learn_partition_modified.R +++ b/R/learn_partition_modified.R @@ -1,5 +1,4 @@ #' @title Learn partition (modified) -#' @export #' @param ordered ordered #' @return part #' @description This function is called only if some individual has less than diff --git a/R/learn_simple_partition.R b/R/learn_simple_partition.R index d85d4e3..46323f6 100644 --- a/R/learn_simple_partition.R +++ b/R/learn_simple_partition.R @@ -3,7 +3,6 @@ #' @param fii fii #' @description Goes through all the ways to divide the points into two or #' three groups. Chooses the partition which obtains highest logml. -#' @export learn_simple_partition <- function(ordered_points, fii) { npoints <- length(ordered_points) diff --git a/R/linkage.R b/R/linkage.R index 37dddce..d030ff1 100644 --- a/R/linkage.R +++ b/R/linkage.R @@ -13,7 +13,6 @@ #' that BAPS should use this function instead of the base one, so this is why #' this function is part of this package (instead of a MATLAB-replicating #' package such as matlab2r) -#' @export linkage <- function(Y, method = "co") { k <- size(Y)[1] n <- size(Y)[2] diff --git a/R/logml2String.R b/R/logml2String.R index f1ce392..bc47ce4 100644 --- a/R/logml2String.R +++ b/R/logml2String.R @@ -2,7 +2,6 @@ #' @description Returns a string representation of a logml #' @param logml input Logml #' @return String version of logml -#' @export logml2String <- function(logml) { # Palauttaa logml:n string-esityksen. mjono <- " " diff --git a/R/lueGenePopData.R b/R/lueGenePopData.R index e85cd8a..0f7f87d 100644 --- a/R/lueGenePopData.R +++ b/R/lueGenePopData.R @@ -2,7 +2,6 @@ #' @description Reads GenePop-formatted data #' @param tiedostonNimi Name of the file #' @return list containing data and popnames -#' @export lueGenePopData <- function(tiedostonNimi) { fid <- readLines(tiedostonNimi) line <- fid[1] # ensimmäinen rivi diff --git a/R/lueGenePopDataPop.R b/R/lueGenePopDataPop.R index e906853..73f2c7e 100644 --- a/R/lueGenePopDataPop.R +++ b/R/lueGenePopDataPop.R @@ -3,7 +3,6 @@ #' group. popnames are as before. #' @param tiedostonNimi Name of the file #' @return List containing data and popnames -#' @export lueGenePopDataPop <- function(tiedostonNimi) { # Data annetaan muodossa, jossa viimeinen sarake kertoo ryhmän. # popnames on kuten ennenkin. diff --git a/R/lueNimi.R b/R/lueNimi.R index 0154ddc..614c1f7 100644 --- a/R/lueNimi.R +++ b/R/lueNimi.R @@ -2,7 +2,6 @@ #' @description Returns the part of the line from the beginning that is before the comma. Useful for returning the name of a GenePop area #' @param line line #' @return nimi -#' @export lueNimi <- function(line) { # ========================================================================== # Validation diff --git a/R/noIndex.R b/R/noIndex.R index 3159238..82cce38 100644 --- a/R/noIndex.R +++ b/R/noIndex.R @@ -5,7 +5,6 @@ #' @return puredata: a data contains no index column. #' @param data data #' @param noalle noalle -#' @export noIndex <- function(data, noalle) { limit <- ifelse(is(noalle, "matrix"), ncol(noalle), length(noalle)) if (size(data, 2) == limit + 1) { diff --git a/R/ownNum2Str.R b/R/ownNum2Str.R index df7ac1e..3897c48 100644 --- a/R/ownNum2Str.R +++ b/R/ownNum2Str.R @@ -2,7 +2,6 @@ #' @description Converts numbers to strings #' @param number number #' @note On Matlab, if number is NaN the output is 'NaN'. Here, the output will be an error. Also, the function belo expects "number" to have length one, whereas Matlab accepts vectors. -#' @export ownNum2Str <- function(number) { absolute <- abs(number) if (absolute < 1000) { diff --git a/R/poistaLiianPienet.R b/R/poistaLiianPienet.R index a07c700..a063cdc 100644 --- a/R/poistaLiianPienet.R +++ b/R/poistaLiianPienet.R @@ -5,7 +5,6 @@ #' @param npops npops #' @param rowsFromInd rowsFromInd #' @param alaraja alaraja -#' @export poistaLiianPienet <- function(npops, rowsFromInd, alaraja) { popSize <- zeros(1, npops) if (npops > 0) { diff --git a/R/proportion2str.R b/R/proportion2str.R index bac1ed4..207a97b 100644 --- a/R/proportion2str.R +++ b/R/proportion2str.R @@ -3,7 +3,6 @@ #' @return a 4-mark presentation of proportion #' @note The `round` function in R, being ISO-compliant, rounds 8.5 to 8. The #' Matlab equivalent rounds it to 9. -#' @export proportion2str <- function(prob) { if (abs(prob) < 1e-3) { str <- "0.00" diff --git a/R/randdir.R b/R/randdir.R index 19eceae..7ee626d 100644 --- a/R/randdir.R +++ b/R/randdir.R @@ -1,10 +1,9 @@ #' @title Generates random numbers #' @return vector of length `nc` with r.v. realizations from Gamma(rate=1) -#' @examples randdir(matrix(c(10, 30, 60), 3), 3) +#' @examples rBAPS:::randdir(matrix(c(10, 30, 60), 3), 3) #' @param counts shape parameter #' @param nc number of rows on output #' @seealso randga -#' @export randdir <- function(counts, nc) { svar <- zeros(nc, 1) for (i in 1:nc) { diff --git a/R/rivinSisaltamienMjonojenLkm.R b/R/rivinSisaltamienMjonojenLkm.R index 88b4248..8023162 100644 --- a/R/rivinSisaltamienMjonojenLkm.R +++ b/R/rivinSisaltamienMjonojenLkm.R @@ -2,7 +2,6 @@ #' @param line line number #' @return count #' @description Returns the number of queues contained in the line. There must be a space between the queues. -#' @export rivinSisaltamienMjonojenLkm <- function(line) { # Palauttaa line:n sis�lt�mien mjonojen lukum��r�n. # Mjonojen v�liss?t�ytyy olla v�lily�nti. diff --git a/R/selvitaDigitFormat.R b/R/selvitaDigitFormat.R index ac179f1..4f82e0d 100644 --- a/R/selvitaDigitFormat.R +++ b/R/selvitaDigitFormat.R @@ -1,7 +1,6 @@ #' @title Find out the Digit Format #' @param line the first line after the "pop" word from data in Genepop format. # @note Function clarified based on the line format whether the alleles of the data are given using 2 or 3 numbers. #' @return df -#' @export selvitaDigitFormat <- function(line) { # line on ensimm�inen pop-sanan j�lkeinen rivi # Genepop-formaatissa olevasta datasta. funktio selvitt�� diff --git a/R/simulateAllFreqs.R b/R/simulateAllFreqs.R index 7d2e138..6e518f2 100644 --- a/R/simulateAllFreqs.R +++ b/R/simulateAllFreqs.R @@ -2,8 +2,6 @@ #' @description Lisää jokaista alleelia joka populaation joka lokukseen j1/noalle(j) verran. Näin saatuja counts:eja vastaavista Dirichlet-jakaumista simuloidaan arvot populaatioiden alleelifrekvensseille. #' Add each allele to each locus in each population by j 1 / noalle(j). The Dirichlet distributions corresponding to the counts thus obtained simulate values for the allele frequencies of the populations. #' @param noalle noalle -#' @export - simulateAllFreqs <- function(noalle) { if (isGlobalEmpty(COUNTS)) { max_noalle <- 0 diff --git a/R/simulateIndividuals.R b/R/simulateIndividuals.R index a630ac1..779ba3c 100644 --- a/R/simulateIndividuals.R +++ b/R/simulateIndividuals.R @@ -6,8 +6,6 @@ #' @param allfreqs allfreqs #' @param pop pop #' @param missing_level missing_level -#' @export - simulateIndividuals <- function(n, rowsFromInd, allfreqs, pop, missing_level) { nloci <- size(allfreqs, 2) diff --git a/R/simuloiAlleeli.R b/R/simuloiAlleeli.R index 0ec5c02..21582b1 100644 --- a/R/simuloiAlleeli.R +++ b/R/simuloiAlleeli.R @@ -5,8 +5,6 @@ #' @param allfreqs allfreqa #' @param pop pop #' @param loc loc -#' @export - simuloiAlleeli <- function(allfreqs, pop, loc) { if (length(dim(allfreqs)) == 0) { freqs <- 1 diff --git a/R/suoritaMuutos.R b/R/suoritaMuutos.R index f45a397..09368ef 100644 --- a/R/suoritaMuutos.R +++ b/R/suoritaMuutos.R @@ -3,7 +3,6 @@ #' @param osuusTaulu Percentage table? #' @param osuus percentage? #' @param indeksi index -#' @export suoritaMuutos <- function(osuusTaulu, osuus, indeksi) { if (isGlobalEmpty(COUNTS)) { npops <- 1 diff --git a/R/takeLine.R b/R/takeLine.R index 8208eaf..1105e6a 100644 --- a/R/takeLine.R +++ b/R/takeLine.R @@ -3,7 +3,6 @@ #' @param description description #' @param width width #' @return newline -#' @export takeLine <- function(description, width) { # Returns one line from the description: line ends to the first # space after width:th mark. diff --git a/R/testaaKoordinaatit.R b/R/testaaKoordinaatit.R index d56cd6e..1c87852 100644 --- a/R/testaaKoordinaatit.R +++ b/R/testaaKoordinaatit.R @@ -3,7 +3,6 @@ #' @param coordinates coordinates #' @param interactive prompt user for relevant questions during execution #' @return a list of defectives ("viallinen") and coordinates -#' @export testaaKoordinaatit <- function(ninds, coordinates, interactive = TRUE) { # Testaa onko koordinaatit kunnollisia. # modified by Lu Cheng, 05.12.2012 diff --git a/R/testaaOnkoKunnollinenBapsData.R b/R/testaaOnkoKunnollinenBapsData.R index 5296dcb..83633c4 100644 --- a/R/testaaOnkoKunnollinenBapsData.R +++ b/R/testaaOnkoKunnollinenBapsData.R @@ -2,7 +2,6 @@ #' @description Test if loaded BAPS data is proper #' @param data dataset #' @return ninds -#' @export testaaOnkoKunnollinenBapsData <- function(data) { # Tarkastaa onko viimeisess?sarakkeessa kaikki # luvut 1,2,...,n johonkin n:��n asti. diff --git a/R/testaaPop.R b/R/testaaPop.R index 91f9a82..5e709af 100644 --- a/R/testaaPop.R +++ b/R/testaaPop.R @@ -3,7 +3,6 @@ #' @param rivi Line #' @return pal = 1 if the line starts with one of the following # letter combinations: Pop, pop, POP. In all others cases, pal = 0 -#' @export testaaPop <- function(rivi) { # pal=1, mik�li rivi alkaa jollain seuraavista # kirjainyhdistelmist? Pop, pop, POP. Kaikissa muissa diff --git a/R/writeMixtureInfo.R b/R/writeMixtureInfo.R index 4c5d553..c0d331a 100644 --- a/R/writeMixtureInfo.R +++ b/R/writeMixtureInfo.R @@ -10,7 +10,6 @@ #' @param partitionSummary partitionSummary #' @param popnames popnames #' @param fixedK fixedK -#' @export writeMixtureInfo <- function( logml, rowsFromInd, data, adjprior, priorTerm, outPutFile, inputFile, partitionSummary, popnames, fixedK diff --git a/R/writeMixtureInfoPop.R b/R/writeMixtureInfoPop.R index 3bade59..41ffe8e 100644 --- a/R/writeMixtureInfoPop.R +++ b/R/writeMixtureInfoPop.R @@ -10,7 +10,6 @@ #' @param partitionSummary partitionSummary #' @param popnames popnames #' @param fixedK fixedK -#' @export writeMixtureInfoPop <- function(logml, rows, data, adjprior, priorTerm, outPutFile, inputFile, partitionSummary, popnames, fixedK) { diff --git a/man/randdir.Rd b/man/randdir.Rd index 15489e5..59c69b4 100644 --- a/man/randdir.Rd +++ b/man/randdir.Rd @@ -18,7 +18,7 @@ vector of length `nc` with r.v. realizations from Gamma(rate=1) Generates random numbers } \examples{ -randdir(matrix(c(10, 30, 60), 3), 3) +rBAPS:::randdir(matrix(c(10, 30, 60), 3), 3) } \seealso{ randga