tRNA-subset: Subsetting tRNAs

hasTStemR Documentation

Subsetting tRNAs

Description

The functions has* can be used to subset the GRanges object containing information about tRNAs.

Please not that the settings mismatches and bulged take precedence before unpaired or paired. This means that by setting either mismatches or bulged to either TRUE or FALSE, unpaired = TRUE or paired = TRUE are automatically set to allow specific subsetting. If this removes elements from the results, please consider constructing a logical vectors with two calls as suggested in the examples.

Usage

hasTStem(x, length = NA, unpaired = NA, mismatches = NA, bulged = NA)

hasDStem(x, length = NA, unpaired = NA, mismatches = NA, bulged = NA)

hasAcceptorStem(x, length = NA, unpaired = NA, mismatches = NA, bulged = NA)

hasAnticodonStem(x, length = NA, unpaired = NA, mismatches = NA, bulged = NA)

hasTloop(x, length = NA)

hasDloop(x, length = NA)

hasAnticodonLoop(x, length = NA)

hasVariableLoop(x, length = NA, paired = NA, mismatches = NA, bulged = NA)

## S4 method for signature 'GRanges'
hasTStem(x, length = NA, unpaired = NA, mismatches = NA, bulged = NA)

## S4 method for signature 'GRanges'
hasDStem(x, length = NA, unpaired = NA, mismatches = NA, bulged = NA)

## S4 method for signature 'GRanges'
hasAcceptorStem(x, length = NA, unpaired = NA, mismatches = NA, bulged = NA)

## S4 method for signature 'GRanges'
hasAnticodonStem(x, length = NA, unpaired = NA, mismatches = NA, bulged = NA)

## S4 method for signature 'GRanges'
hasTloop(x, length = NA)

## S4 method for signature 'GRanges'
hasDloop(x, length = NA)

## S4 method for signature 'GRanges'
hasAnticodonLoop(x, length = NA)

## S4 method for signature 'GRanges'
hasVariableLoop(x, length = NA, paired = NA, mismatches = NA, bulged = NA)

Arguments

x

a GRanges object from a tRNAscan import or with equivalent information

length

the length as integer

unpaired

logical: has unpaired nucleotides

mismatches

logical: has mismatched nucleotides

bulged

logical: has mismatched nucleotides of different length creating a bulge

paired

logical: has paired nucleotides (only used for loops)

Value

a logical vector of the length or input GRanges object

Examples

data("gr", package = "tRNA")
hasTStem(gr, length = 5, mismatches = TRUE)
gr[hasTStem(gr, length = 5, mismatches = TRUE)]
gr[hasDStem(gr, unpaired = FALSE) & hasDStem(gr, mismatches = FALSE)]

FelixErnst/tRNA documentation built on April 1, 2024, 2:39 p.m.