% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/miR_converter.R
\name{miR_converter}
\alias{miR_converter}
\title{Convert miRNA annotation to the miRBase 21 version}
\usage{
miR_converter(data, remove_old = TRUE, original_version,
  latest_version = 21)
}
\arguments{
\item{data}{expression data in data.frame format, with sample name in columns and
miRNA name in rows.}

\item{remove_old}{logical value, if the miRNA is deleted in miRBase 21, should
it be removed from row? Default is TRUE.}

\item{original_version}{the original version of miRNA  in input matrix. This
one is necessary.}

\item{latest_version}{choose an interger under 21, and this function would
convert miRNA annotation to that version. Default is 21.}
}
\value{
expression data in data.frame format, with sample name in columns and
   miRNA name for miRBase version 21 in rows.
}
\description{
This function will convert the miRNA names from the data frame, which
is produced by \link{differExp_discrete}, to the miRBase 21 version
of miRNA annotation. If the input contains hundreds of miRNAs, it
would take a few minutes to convert all of them.
}
\examples{
## Use the internal dataset
data("mirna", package = "anamiR", envir = environment())
data("pheno.mirna", package = "anamiR", envir = environment())

## SummarizedExperiment class
require(SummarizedExperiment)
mirna_se <- SummarizedExperiment(
 assays = SimpleList(counts=mirna),
 colData = pheno.mirna)

## Finding differential miRNA from miRNA expression data with t.test
mirna_d <- differExp_discrete(
   se = mirna_se,
   class = "ER",
   method = "t.test"
)

## Convert annotation to miRBse 21
mirna_21 <- miR_converter(data = mirna_d, original_version = 17)

}
