runUTRAnnotation: Run UTR annotation on a variant file

Description Usage Arguments Value Examples

View source: R/run_annotation.R

Description

Run UTR annotation on a variant file to check whether a variant alter any of the feature element in UTRs, return a CSV file with annotated information

Usage

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
runUTRAnnotation(
  variantFile,
  annotationResult,
  species,
  ensemblVersion = NULL,
  dataDir = NULL,
  conservationBwFiles = NULL,
  cores = NULL,
  format = "csv",
  mrl_prediction = TRUE,
  verbose = FALSE
)

Arguments

variantFile

a CSV file with Chr, Pos, Ref, Alt

annotationResult

output annotation file

species

species, either human or mouse

ensemblVersion

(optional) a number specifying which version of Ensembl annotation you'd like to use, by default use the latest version

dataDir

(optional) path to the store / extract database information, if not specified will create a folder named as input variant file name with a "db_" prefix

conservationBwFiles

(optional) path to a folder which contains one or more conservation bigWig files. If not set, will skip conservation analysis.

cores

(optional) number of cores to use for parallel computing. If not specified, use a single core by default.

format

(optional) csv or vcf, the default is csv

mrl_prediction

(optional) Whether do MRL prediction and check if it increase or decrease. The default is TRUE.

verbose

Whether print diagnostic messages. The default is FALSE.

Value

A CSV file with annotated variants

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
test_variant_file <- system.file("extdata", "variants_sample.csv", package = "utr.annotation")

# run UTR annotation with 1 core and skip getting conservation scores for variant positions
runUTRAnnotation(variantFile = test_variant_file,
                 annotationResult = "annotated_variants_sample.csv",
                 species = "human",
                 ensemblVersion = 93,
                 dataDir = "test_db")
unlink("test_db", recursive = TRUE)
unlink("annotated_variants_sample.csv")

## Not run: 
# Download BigWig format conservation track files hg38.phastCons100way.bw and hg38.phyloP100way.bw
# from UCSC Genome Browser to a folder (here we name it folder_store_conservation_bw_files)
Conservation_scores <- "folder_store_conservation_bw_files"
runUTRAnnotation(variantFile = test_variant_file,
                 annotationResult = "annotated_variants_sample.csv",
                 species = "human",
                 ensemblVersion = 93,
                 dataDir = "test_db",
                 cores = 8,
                 conservationBwFiles = Conservation_scores)

## End(Not run)

utr.annotation documentation built on Aug. 23, 2021, 9:06 a.m.