gettRNABasePairing converts the dot bracket annotation into a DotBracketDataFrame. Base pairing is indicated by cosrresponding numbers in the forward and reverse columns. For more detail have a look at getBasePairing.

gettRNALoopIDs converts the dot bracket annotation into a LoopIDList. For more details have a look at getLoopIDList.

gettRNABasePairing(x, with.nucleotides = FALSE)

gettRNALoopIDs(x)

# S4 method for GRanges
gettRNABasePairing(x, with.nucleotides = FALSE)

# S4 method for GRanges
gettRNALoopIDs(x)

Arguments

x

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

with.nucleotides

a single logical value: should the nucleotides be saved alongside the base pairing information in the 'base' column?

Value

gettRNABasePairing: The result is a DotBracketDataFrame with following columns: pos, forward, reverse, character and base. If a position is unpaired, forward and reverse will be 0, otherwise it will match the base paired positions.

gettRNALoopIDs: return a list of list of loop ids.

Examples

data("gr", package = "tRNA")
gettRNABasePairing(gr[1])
#> SplitDotBracketDataFrameList of length 1
#> [[1]]
#> DotBracketDataFrame with 71 rows and 4 columns
#>           pos   forward   reverse   character
#>     <integer> <integer> <integer> <character>
#> 1           1         1        70           <
#> 2           2         2        69           <
#> 3           3         3        68           <
#> 4           4         4        67           <
#> 5           5         5        66           <
#> ...       ...       ...       ...         ...
#> 67         67        67         4           >
#> 68         68        68         3           >
#> 69         69        69         2           >
#> 70         70        70         1           >
#> 71         71         0         0           .
#> 
gettRNALoopIDs(gr[1])
#> LoopIndexList of length 1
#> [[""]] 1 2 3 4 5 5 6 6 6 7 8 9 9 9 9 9 ... 19 19 19 18 17 16 15 6 5 5 4 3 2 1 0