motifDistance: Motif Distance

Description Usage Arguments Value Examples

Description

Find the distances between two motifs within set of genomic ranges. The subsets are represented by DNAStringSet from the Biostrings package. If the index of genomic ranges for each motif is already known use diffMotif. If the distribution of motifs are already known look into mT1:::.motifDiffFromDens.

Usage

1
motifDistance(fasta, motif1, motif2)

Arguments

fasta

A DNAStringSet with a set of genomic ranges

motif1

A motif as an atomic Character of IUPAC characters

motif2

A motif as an atomic Character of IUPAC characters

Value

a numeric vector represented by two columns, the first being the index the second being the position of the motif within that index. distance

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
## load fasta file
fasta<-mT1_fasta
## Find distances
distances<-motifDistance(fasta,"CANNTG","HGATAA")

## Determine the range of the motif locations and plot the
## frequency
width<-fasta@ranges@width[1] # all fasta strings should be the same width
r<-seq(-width+1,width-1)
y<-combHeights(r,distances[,2])[[1]]
plot(r,y,main="CANNTG-HGATAA")

alexjgriffith/mT1 documentation built on May 10, 2019, 8:53 a.m.