rename_transcripts {ribor} | R Documentation

## Renames the transcripts

### Description

The function `rename_transcripts` strives to make the transcript names less cumbersome to write and easier to use.

### Usage

    rename_transcripts(ribo, rename)

### Arguments

`ribo` | a path to the ribo file or a 'Ribo' object
`rename` | A function that renames the original transcript or an already generated character vector of aliases

### Details

Transcript names found in a .ribo file can often be long and inconvenient to use. As a result, this function allows the user to rename the transcripts.

Often times, a short function can be used on the ribo file reference names to split and extract a more convenient name, and a function with a similar input and output to `rename_default` can be passed in.

However, if there is no simple function that takes the original name and renames it into a unique alias, then the user can provide a character vector of the same length as the number of transcripts in the ribo file. This character vector would provide aliases that match the order of the original reference names returned by the `get_reference_names` function.

### Value

A character vector denoting the renamed transcript aliases

### See Also

`rename_default` to view expected input and output of a 'rename' function `Ribo` to generate a ribo object

### Examples

    file.path <- system.file("extdata", "HEK293_ingolia.ribo", package = "ribor")
    sample <- Ribo(file.path, rename = rename_default)

    aliases <- rename_transcripts(sample, rename = rename_default)

[Package ribor version 1.4.0 Index]