SequenceMotif: co-motif exploration for sequence

Description Usage Arguments Value Author(s) See Also Examples

View source: R/BI_SequenceMotif.R

Description

co-motif exploration for sequence

Usage

1
2
SequenceMotif(sequence, motif, base = c("A", "C", "U", "G"),
  verbose = T)

Arguments

sequence

a vector of sequences

motif

a charactor or numeric motif

base

the type of base.Default is c("A","C","U","G")

verbose

whether do reports

Value

a list contain counts and sequences information of motifs

Author(s)

Weibin Huang<654751191@qq.com>

See Also

combn2;alply;

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
## Create some random sequences
sequence <-  NULL
for(i in 1:100){
  set.seed(i);
  j <- sample(18:21,1)
  s.i <- sample(c("A","C","U","G"),j,replace = T)
  s.i <- paste(s.i,collapse = "")
  sequence <- c(sequence,s.i)
}

## explore two 4-base motifs
motif <- c("CCGU","GGAU")
l <- SequenceMotif(sequence,motif)
View(l$Counts)
View(l$Sequence)
l$Sequence$GGAU

## explore all 3-base or 4-base motifs
motif <- c(3,4)
l <- SequenceMotif(sequence,motif)
View(l$Counts)
View(l$Sequence)
l$Sequence$GGAU

shijianasdf/BasicBioinformaticsAnalysisFromZhongShan documentation built on Jan. 3, 2020, 10:08 p.m.