################################################### ### chunk number 1: load ################################################### #line 443 "vignettes/cosmo/inst/doc/cosmo.Rnw" library(cosmo) ################################################### ### chunk number 2: rseqArgs ################################################### #line 451 "vignettes/cosmo/inst/doc/cosmo.Rnw" args(rseq) ################################################### ### chunk number 3: pwm ################################################### #line 508 "vignettes/cosmo/inst/doc/cosmo.Rnw" data(motifPWM) motifPWM ################################################### ### chunk number 4: seqLogo1 ################################################### #line 518 "vignettes/cosmo/inst/doc/cosmo.Rnw" seqLogo(motifPWM) ################################################### ### chunk number 5: transMats ################################################### #line 526 "vignettes/cosmo/inst/doc/cosmo.Rnw" data(transMats) transMats ################################################### ### chunk number 6: rseqEx ################################################### #line 534 "vignettes/cosmo/inst/doc/cosmo.Rnw" simSeqs <- rseq(20, 100, 1.0, motifPWM, transMats, "ZOOPS") simSeqs$motifs ################################################### ### chunk number 7: makeConSetArg ################################################### #line 549 "vignettes/cosmo/inst/doc/cosmo.Rnw" args(makeConSet) ################################################### ### chunk number 8: makeConSetEx ################################################### #line 557 "vignettes/cosmo/inst/doc/cosmo.Rnw" conSet1 <- makeConSet(numInt=3, type=c("B","V","B"),length=c(3,NA,3)) ################################################### ### chunk number 9: printConSet ################################################### #line 563 "vignettes/cosmo/inst/doc/cosmo.Rnw" conSet1 ################################################### ### chunk number 10: boundCon1 ################################################### #line 571 "vignettes/cosmo/inst/doc/cosmo.Rnw" boundCon1 <- makeBoundCon(lower=1.0, upper=2.0) ################################################### ### chunk number 11: boundCon2 ################################################### #line 575 "vignettes/cosmo/inst/doc/cosmo.Rnw" boundCon2 <- makeBoundCon(lower=0.0, upper=1.0) ################################################### ### chunk number 12: palCon ################################################### #line 580 "vignettes/cosmo/inst/doc/cosmo.Rnw" palCon1 <- makePalCon(int1=1, int2=3, errBnd=0.05) ################################################### ### chunk number 13: addCon ################################################### #line 585 "vignettes/cosmo/inst/doc/cosmo.Rnw" constraint <- list(boundCon1, boundCon2, palCon1) int <- list(1, 2, NA) conSet1 <- addCon(conSet=conSet1, constraint=constraint, int=int) conSet1 ################################################### ### chunk number 14: conSet2 ################################################### #line 593 "vignettes/cosmo/inst/doc/cosmo.Rnw" conSet2 <- makeConSet(numInt=1, type="V",length=NA) subCon1 <- makeSubMotifCon(submotif="TATA",minfreq=0.9) conSet2 <- addCon(conSet=conSet2, constraint=subCon1, int=NA) conSet2 ################################################### ### chunk number 15: cosmoArgs ################################################### #line 605 "vignettes/cosmo/inst/doc/cosmo.Rnw" args(cosmo) ################################################### ### chunk number 16: cosmoClass ################################################### #line 679 "vignettes/cosmo/inst/doc/cosmo.Rnw" slotNames("cosmo") ################################################### ### chunk number 17: example1 ################################################### #line 751 "vignettes/cosmo/inst/doc/cosmo.Rnw" seqFile <- system.file("Exfiles/seq.fasta", package="cosmo") res <- cosmo(seqs=seqFile, constraints=list(conSet1, conSet2) , minW=7, maxW=8, models=c("OOPS", "TCM")) ################################################### ### chunk number 18: printPwm ################################################### #line 756 "vignettes/cosmo/inst/doc/cosmo.Rnw" print(res) ################################################### ### chunk number 19: summary ################################################### #line 761 "vignettes/cosmo/inst/doc/cosmo.Rnw" summary(res) ################################################### ### chunk number 20: candModels ################################################### #line 766 "vignettes/cosmo/inst/doc/cosmo.Rnw" res@cand ################################################### ### chunk number 21: motifs ################################################### #line 782 "vignettes/cosmo/inst/doc/cosmo.Rnw" summary(res@motifs) ################################################### ### chunk number 22: seqLogo2 ################################################### #line 795 "vignettes/cosmo/inst/doc/cosmo.Rnw" plot(res) ################################################### ### chunk number 23: postprob ################################################### #line 808 "vignettes/cosmo/inst/doc/cosmo.Rnw" plot(res, type="prob") ################################################### ### chunk number 24: bgModelArgs ################################################### #line 838 "vignettes/cosmo/inst/doc/cosmo.Rnw" args(bgModel) ################################################### ### chunk number 25: bgModelEx ################################################### #line 852 "vignettes/cosmo/inst/doc/cosmo.Rnw" bgFile <- system.file("Exfiles", "bgSeqs", package="cosmo") tm <- bgModel(bgFile) ################################################### ### chunk number 26: bgModelOutput ################################################### #line 861 "vignettes/cosmo/inst/doc/cosmo.Rnw" tm ################################################### ### chunk number 27: tmatEx ################################################### #line 876 "vignettes/cosmo/inst/doc/cosmo.Rnw" res <- cosmo(seqs=seqFile, constraints="None" , minW=8, maxW=8, models="OOPS", transMat=tm$transMat) ################################################### ### chunk number 28: tmatExOut ################################################### #line 879 "vignettes/cosmo/inst/doc/cosmo.Rnw" res ################################################### ### chunk number 29: bfileEx ################################################### #line 885 "vignettes/cosmo/inst/doc/cosmo.Rnw" bfile <- system.file("Exfiles", "bfile", package="cosmo") s1 <- scan(file = bfile, what = "", sep = "\n", quote = "", allowEscapes = FALSE, quiet = TRUE) cat(paste(s1,collapse="\n")) ################################################### ### chunk number 30: bfile2tmat ################################################### #line 904 "vignettes/cosmo/inst/doc/cosmo.Rnw" tmat <- bfile2tmat(bfile) tmat