Description Usage Arguments Value Examples
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.
1 | motifDistance(fasta, motif1, motif2)
|
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 |
a numeric vector represented by two columns, the first being the index the second being the position of the motif within that index. distance
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")
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.