makePromoterDBfromRE: makePromoterDBfromRE

Description Usage Arguments Value Examples

View source: R/makePromoterDBfromRE.R

Description

Identify and count the occurence of sequence motifs, described by regular expressions, in a set of promoter sequences. Both, sense and antisense strands are scanned for the occurence of each motif and the number of matches is reported.

Usage

1
makePromoterDBfromRE(Motifs, promoter.fasta, promoterDB = "promoter.DB")

Arguments

Motifs

a character vector of the motifs to be matched. A motif can be defined with the full sequences or with special characters.

promoter.fasta

Fasta file of the promoter sequences.

promoterDB

Output file where the results will be saved.

Value

A list names Strands with 3 elements,

plus

A count matrix of the occurence of motifs in the "minus" strand.

minus

A count matrix of the occurence of motifs in the "plus" strand.

both

A count matrix of the occurence of motifs in the "minus" and "plus" strands together.

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
# Read a file of sample sequence motifs.
motifs.dir = system.file("extdata", "AGRIS_PLACE_motifs_short_mb2.txt", package="TFbindR", mustWork = TRUE)
Motifs=read.delim(file = motifs.dir ,header=TRUE, sep="\t", as.is=T)

# Remove duplicated motifs.
Motifs=Motifs[which(!duplicated(Motifs$Motif)),]

# Read a sample fasta file. 
promoter.dir = system.file("extdata","TAIR10_upstream_1000_translation_start_20101028.fa",package="TFbindR")

# Specify the output directory.
output.dir="."

# Run the function to create the DB and save it into R file type .rda which is automatically compressed
makePromoterDBfromRE(Motifs = Motifs$Motif,promoter.fasta = promoter.dir, promoterDB=file.path(output.dir,"TAIR10_500bp_upstream.RE.db.rda"))

jsalojar/TFbindR documentation built on Dec. 9, 2019, 12:16 a.m.