R: Calcul Score of a Sequence, using a loggods matrix
CalculScores
R Documentation
Calcul Score of a Sequence, using a loggods matrix
Description
Giving a logodds matrix, the Score of a sequence is calculated as the sum of the logodds of each nucleotide at each position of the sequence (equivalent to calculating the probability of each nucleotide at each position)
Usage
CalculScores(sequencia, logodds)
Arguments
sequencia
Sequence to analyze
logodds
logodds matrix for a given motif.
Value
score: score of the studied sequence
Author(s)
Erola Pairo <epeiroatibec.pcb.ub.es>
References
Gary D. Stormo. DNA binding sites: representation and discovery. Bioinformatics (2000) 16(1): 16-23 doi:10.1093/bioinformatics/16.1.16
See Also
CalculPSSM, CalculInformation
Examples
require("MEET")
#First example, calculating logodds of a Sequence
data(TFlogodds)
data(Sequence)
CalculScores(sequencia=Sequence, logodds=TFlogodds)
#given a Transfac matrix, calculate first loggods and then scores
data(TranscriptionFactor)
data(BackgroundOrganism)
data(Sequence)
Factortrans<-TranscriptionFactor
suma<-apply(Factortrans,2,function(y){sum(y=="-")})
Factortrans<-Factortrans[, suma==0]
logodds<-CalculInformation(matriu=Factortrans, Prob=Prob)
logodds <- logodds[,2:dim(logodds)[2]]
CalculScores(sequencia=Sequence,logodds=logodds)
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(MEET)
Loading required package: seqinr
Loading required package: pcaMethods
Loading required package: Biobase
Loading required package: BiocGenerics
Loading required package: parallel
Attaching package: 'BiocGenerics'
The following objects are masked from 'package:parallel':
clusterApply, clusterApplyLB, clusterCall, clusterEvalQ,
clusterExport, clusterMap, parApply, parCapply, parLapply,
parLapplyLB, parRapply, parSapply, parSapplyLB
The following objects are masked from 'package:stats':
IQR, mad, xtabs
The following objects are masked from 'package:base':
Filter, Find, Map, Position, Reduce, anyDuplicated, append,
as.data.frame, cbind, colnames, do.call, duplicated, eval, evalq,
get, grep, grepl, intersect, is.unsorted, lapply, lengths, mapply,
match, mget, order, paste, pmax, pmax.int, pmin, pmin.int, rank,
rbind, rownames, sapply, setdiff, sort, table, tapply, union,
unique, unsplit
Welcome to Bioconductor
Vignettes contain introductory material; view with
'browseVignettes()'. To cite Bioconductor, see
'citation("Biobase")', and for packages 'citation("pkgname")'.
Attaching package: 'pcaMethods'
The following object is masked from 'package:stats':
loadings
Loading required package: Matrix
Loading required package: ROCR
Loading required package: gplots
Attaching package: 'gplots'
The following object is masked from 'package:stats':
lowess
Loading required package: Hmisc
Loading required package: lattice
Loading required package: survival
Loading required package: Formula
Loading required package: ggplot2
Attaching package: 'Hmisc'
The following objects are masked from 'package:Biobase':
combine, contents
The following object is masked from 'package:BiocGenerics':
combine
The following object is masked from 'package:seqinr':
translate
The following objects are masked from 'package:base':
format.pval, round.POSIXt, trunc.POSIXt, units
Loading required package: KernSmooth
KernSmooth 2.23 loaded
Copyright M. P. Wand 1997-2009
Loading required package: seqLogo
Loading required package: grid
> png(filename="/home/ddbj/snapshot/RGM3/R_CC/result/MEET/CalculScores.Rd_%03d_medium.png", width=480, height=480)
> ### Name: CalculScores
> ### Title: Calcul Score of a Sequence, using a loggods matrix
> ### Aliases: CalculScores
>
> ### ** Examples
>
> require("MEET")
> #First example, calculating logodds of a Sequence
> data(TFlogodds)
> data(Sequence)
> CalculScores(sequencia=Sequence, logodds=TFlogodds)
[1] 39.37294
> #given a Transfac matrix, calculate first loggods and then scores
> data(TranscriptionFactor)
> data(BackgroundOrganism)
> data(Sequence)
> Factortrans<-TranscriptionFactor
> suma<-apply(Factortrans,2,function(y){sum(y=="-")})
> Factortrans<-Factortrans[, suma==0]
> logodds<-CalculInformation(matriu=Factortrans, Prob=Prob)
> logodds <- logodds[,2:dim(logodds)[2]]
> CalculScores(sequencia=Sequence,logodds=logodds)
[1] 35.97108
>
>
>
>
>
>
> dev.off()
null device
1
>