Last data update: 2014.03.03

R: build background model
buildBackgroundModelR Documentation

build background model

Description

build background model for dag test

Usage

buildBackgroundModel(dagPeptides, 
                                 bg=c("wholeGenome", "inputSet", "nonInputSet"),
                                 model=c("any", "anchored"),
                                 targetPosition=c("any", "Nterminus", "Cterminus"),
                                 uniqueSeq=TRUE,
                                 permutationSize=30L,
                                 rand.seed=1,
                                 replacement=FALSE,
                                 proteome)

Arguments

dagPeptides

an object of dagPeptides, output of fetchSequence or formatSequence

bg

could be "wholeGenome", "inputSet" or "nonInputSet"

model

could be "any" or "anchored"

targetPosition

could be "any", "Nterminus" or "Cterminus"

uniqueSeq

should the background sequence be unique?

permutationSize

how many times should it samples

rand.seed

random seed

replacement

Should sampling be with replacement?

proteome

an object of Proteome, output of prepareProteome

Details

The background could be generated from wholeGenome, inputSet or nonInputSet. whole genome: randomly select subsequences from the whole genome with each subsequence containing amino acids with same width of input sequences. anchored whole genome: randomly select subsequences from the whole genome with each subsequence containing amino acids with same width of input sequences where the middle amino acids must contain anchor amino acid, e.g., K, which is specified by user. input set: same to whole genome, but only use protein sequence from input id and not including the site specified in input sequences anchored input set: same to anchored whole genome, but only use protein sequences from input id, and not including the site specified in input sequences. non-input set: whole genome - input set. anchored non-input set: whole genome - input set and the middle amino acids must contain anchor amino acid.

Value

an object of dagBackground which contains background and permutationSize.

Author(s)

Jianhong Ou, Alexey Stukalov, Julie Zhu

See Also

prepareProteome

Examples

    data("seq.example")
    data("proteome.example")
    bg <- buildBackgroundModel(seq.example, proteome=proteome.example)

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(dagLogo)
Loading required package: biomaRt
Loading required package: grImport
Loading required package: grid
Loading required package: XML
Loading required package: motifStack
Loading required package: MotIV
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


Attaching package: 'MotIV'

The following object is masked from 'package:stats':

    filter

Loading required package: ade4

Attaching package: 'ade4'

The following object is masked from 'package:BiocGenerics':

    score

Loading required package: Biostrings
Loading required package: S4Vectors
Loading required package: stats4

Attaching package: 'S4Vectors'

The following objects are masked from 'package:base':

    colMeans, colSums, expand.grid, rowMeans, rowSums

Loading required package: IRanges
Loading required package: XVector
> png(filename="/home/ddbj/snapshot/RGM3/R_BC/result/dagLogo/buildBackgroundModel.Rd_%03d_medium.png", width=480, height=480)
> ### Name: buildBackgroundModel
> ### Title: build background model
> ### Aliases: buildBackgroundModel
> ### Keywords: misc
> 
> ### ** Examples
> 
>     data("seq.example")
>     data("proteome.example")
>     bg <- buildBackgroundModel(seq.example, proteome=proteome.example)
> 
> 
> 
> 
> 
> dev.off()
null device 
          1 
>