liftOverToExomicBG: liftOverToExomicBG

Description Usage Arguments Value Examples

View source: R/liftOverToExomicBG.R

Description

Lifts features such as CLIP-seq reads or RNA structure annotations from genome to transcriptome.

Usage

1
liftOverToExomicBG(input, chain, chrom_size, output_bg, format = "bedGraph")

Arguments

input

A single input file name or a vector of input file names in the format of c(forward_reads, reverse_reads) for strand-separated alignments. Files must be BED or bedGraph format. Required

chain

The name of the chain file to be used for liftOver. Format should be like chain files derived from getChainChrSize function. Required

chrom_size

Name of chromosome size file. File must be in two-column format without a header where first column is chromosome name and second column is chromosome length, as from liftOverToExomicBG. Required.

output_bg

The name of the lifted-over output bedGraph file. Required.

format

File type of input file(s). Recommended "BED" or "bedGraph". Default "bedGraph"

Value

writes lifted-over bedGraph file

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
## first, get chain file
load(system.file("extdata/transcript_list.Rda", package="nearBynding"))
gtf<-system.file("extdata/Homo_sapiens.GRCh38.chr4&5.gtf",
                package="nearBynding")
GenomeMappingToChainFile(genome_gtf = gtf,
                        out_chain_name = "test.chain",
                        RNA_fragment = "three_prime_utr",
                        transcript_list = transcript_list,
                        alignment = "hg38")
## and chain file chromosome sizes
getChainChrSize(chain = "test.chain",
               out_chr = "chr4and5_3UTR.size")

## get bedGraph file
chr4and5_sorted.bedGraph<-system.file("extdata/chr4and5_sorted.bedGraph",
                                     package="nearBynding")

liftOverToExomicBG(input = chr4and5_sorted.bedGraph,
                  chain = "test.chain",
                  chrom_size = "chr4and5_3UTR.size",
                  output_bg = "chr4and5_liftOver.bedGraph")

vbusa1/nearBynding documentation built on Aug. 4, 2021, 4:08 p.m.