This function finds the longest self-hybridizing subsequences present
in RNA or DNA sequences.
Usage
get_selfhyb_subseq(seq, minlen, type = c("RNA", "DNA"))
show_selfhyb_counts(L)
show_selfhyb_lengths(L)
Arguments
seq
character vector of RNA or DNA sequences
minlen
an integer specifying the minimum length in bases of the
self-hybridizing subsequences. Subsequences with length less than
minlen will be ignored.
type
one of "RNA" or "DNA" depending on the type of
sequences provided in seq. Note that you cannot mix RNA and
DNA sequences.
L
The output of get_selfhyp_subseq.
Details
get_selfhyb_subseq finds the longest self-hybridizing
subsequences of the specified minimum length. It does this using
suffix trees and the getLongestSubstring function provided by
the Rlibstree package.
These are defined to be the longest string that is found in both
the input sequence, seq, and in its reverse complement.
Value
A list with an element for each sequence in seq. The list will
be named using names(seq).
Each element is itself a list with an element for each longest
self-hybridizing subsequence (there can be more than one). Each such
element is yet another list with components:
starts
integer vector giving the character start positions for
the self-hybridizing subsequence in the sequence.
rcstarts
integer vector giving the character start positions
for the reverse complement of the self-hybridizing subsequence in
the sequence.
Author(s)
Seth Falcon
Examples
if (suppressWarnings(require(Rlibstree, quietly=TRUE))) {
seqs = c(a="UGAGGUAGUAGGUUGUAUAGUU", b="UGAGGUAGUAGGUUGUGUGGUU",
c="UGAGGUAGUAGGUUGUAUGGUU")
ans = get_selfhyb_subseq(seqs, minlen=3, type="RNA")
length(ans)
ans[["a"]]
show_selfhyb_counts(ans)
show_selfhyb_lengths(ans)
}
Results
R version 3.3.1 (2016-06-21) -- "Bug in Your Hair"
Copyright (C) 2016 The R Foundation for Statistical Computing
Platform: x86_64-pc-linux-gnu (64-bit)
R is free software and comes with ABSOLUTELY NO WARRANTY.
You are welcome to redistribute it under certain conditions.
Type 'license()' or 'licence()' for distribution details.
R is a collaborative project with many contributors.
Type 'contributors()' for more information and
'citation()' on how to cite R or R packages in publications.
Type 'demo()' for some demos, 'help()' for on-line help, or
'help.start()' for an HTML browser interface to help.
Type 'q()' to quit R.
> library(microRNA)
> png(filename="/home/ddbj/snapshot/RGM3/R_BC/result/microRNA/get_selfhyb_subseq.Rd_%03d_medium.png", width=480, height=480)
> ### Name: get_selfhyb_subseq
> ### Title: Get Self-Hybridizing Subsequences
> ### Aliases: get_selfhyb_subseq show_selfhyb_counts show_selfhyb_lengths
> ### Keywords: manip
>
> ### ** Examples
>
> if (suppressWarnings(require(Rlibstree, quietly=TRUE))) {
+ seqs = c(a="UGAGGUAGUAGGUUGUAUAGUU", b="UGAGGUAGUAGGUUGUGUGGUU",
+ c="UGAGGUAGUAGGUUGUAUGGUU")
+
+ ans = get_selfhyb_subseq(seqs, minlen=3, type="RNA")
+ length(ans)
+
+ ans[["a"]]
+
+ show_selfhyb_counts(ans)
+ show_selfhyb_lengths(ans)
+ }
>
>
>
>
>
> dev.off()
null device
1
>