getBasePairing: Accessing Dot Bracket annotation

Description Usage Arguments Value Examples

View source: R/tRNA-dotbracket.R

Description

getBasePairing converts a dot bracket annotation into a data.frame. Base pairing is indicated by corresponding numbers in the forward and reverse columns.

Usage

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
gettRNABasePairing(x)

gettRNALoopIDs(x)

## S4 method for signature 'GRanges'
gettRNABasePairing(x)

getBasePairing(dotBracket, sequence)

## S4 method for signature 'GRanges'
gettRNALoopIDs(x)

getLoopIDs(dotBracket)

Arguments

x

a GRanges object created by import.tRNAscanAsGRanges or GRanges with equivalent information. The tRNA_str and tRNA_seq columns will be used for input into getBasePairing.

dotBracket

character vectors describing a nucleotide sequence structure in the dot bracket annotations. Valid characters are: .(\{[><]\})

sequence

optional: character vectors describing a nucleotide sequence. The same number of sequences with the same length as the dot bracket string have to be used. Each nucleotide sequence has to be a character vector. The identity of the nucleotides are not control, so in theory all letters can be used.

Value

getBasePairing: The result is a data.frame with following columns: pos, forward, reverse, chr and base (if sequence was provided or a GRanges objects was used). If a position is unpaired, forward and reverse will be 0, otherwise it will match the base paired positions. gettRNALoopIDs, getLoopIDs: return a list of list of loop ids.

Examples

1
2
3
4
5
data("gr", package = "tRNA", envir = environment())
gettRNABasePairing(gr[1])
getBasePairing(gr[1]$tRNA_str)
gettRNALoopIDs(gr[1])
getLoopIDs(gr[1]$tRNA_str)

tRNA documentation built on Nov. 1, 2018, 2:24 a.m.