options(java.parameters = "-Xmx4000M")
library(SELEX)
library(SelexGLM)
library(grid)
workDir = "./cache/"
selex.config(workingDir=workDir, maxThreadNumber=4)
### LOCAL PATHS NEED TO BE RE-DEFINED TO RUN OFF OF MY COMPUTER
##################################################################
selexDir = "/Users/gabriella/Columbia/SELEX/"
rawdataDir = "/Users/gabriella/Columbia/rawdata/Mann/HM/"
# CLUSTER VERSIONS ARE COMMENTED OUT
#selexDir = "/vega/hblab/users/gdm2120/SELEX/SELEX/"
#rawdataDir = "/vega/hblab/projects/selex/rawdata/Mann/hm/"
##################################################################
saveDir = "gabriella/SelexGLMtest/MultiroundViewNoSymmetry"
dir.create(file.path(selexDir, saveDir), showWarnings = FALSE, recursive = TRUE)
shapeTable = read.table(paste(selexDir, "gabriella/ShapeParamData/ShapeTableOrthogonal.txt", sep = ""), sep = "\t",
stringsAsFactors = FALSE)
ST = shapeTable[,c(1, 14:19)]
colnames(ST) = c("Sequence", "MGW", "ProT", "HelTA",
"HelTB", "RollA", "RollB")
selex.defineSample('r0',
paste(rawdataDir, "exp6/mplex1.0b.mplex2.0b.fastq.gz", sep = ""),
'm1r0',
0, 16, 'TGG', 'CCAGCTG')
selex.defineSample('r0',
paste(rawdataDir, "exp6/mplex1.0b.mplex2.0b.fastq.gz", sep = ""),
'm2r0',
0, 16, 'TGG', 'CCACGTC')
selex.defineSample('Ubx4a.R2',
paste(rawdataDir, "exp4/exdUbxiva.exdAntp.L.2.fastq.gz", sep = ""),
'HM.Ubx4a.Exd',
2, 16, 'TGG', 'CCAGCTG')
selex.defineSample('Ubx4a.R3',
paste(rawdataDir,"exp4/exdUbxiva.exdAntp.L.3.fastq.gz", sep = ""),
'HM.Ubx4a.Exd',
3, 16, 'TGG', 'CCAGCTG')
r0.train = selex.sample(seqName = 'r0', sampleName='m1r0', round = 0)
r0.test = selex.sample(seqName = 'r0', sampleName='m2r0', round = 0)
dataSample = selex.sample(seqName = 'Ubx4a.R2', sampleName = 'HM.Ubx4a.Exd', round = 2)
dataSample.R3 = selex.sample(seqName = 'Ubx4a.R3', sampleName = 'HM.Ubx4a.Exd', round = 3)
# MARKOV MODEL BUILT
kmax = selex.kmax(sample = r0.test)
# Train Markov model on Hm 16bp library Round 0 data
mm = selex.mm(sample = r0.train, order = NA, crossValidationSample =r0.test, Kmax = kmax, mmMethod = "TRANSITION")
mmscores = selex.mmSummary(sample = r0.train)
ido = which(mmscores$R==max(mmscores$R))
mm.order = mmscores$Order[ido]
libLen = as.numeric(as.character(selex.getAttributes(dataSample)$VariableRegionLength))
# For the sake of previous analysis on the Hox data used in this example, I will use kLen = 12 as my k-mer length, even though kLen identified through the information gain analysis has kLen = 13.
kLen = 12
#data.probeCounts = getProbeCounts(dataSample, markovModel = mm)
#save(data.probeCounts, file = paste(selexDir, saveDir, "/data.probeCounts.RData", sep = ""))
load(file = paste(selexDir, saveDir, "/data.probeCounts.RData", sep = ""))
#data.kmerTable = getKmerCountAffinities(dataSample, k = kLen, minCount = 100, markovModel = mm)
#save(data.kmerTable, file = paste(selexDir, saveDir, "/data.kmerTable.RData", sep = ""))
load(file = paste(selexDir, saveDir, "/data.kmerTable.RData", sep = ""))
#data.probeCounts.R3 = getProbeCounts(dataSample.R3, markovModel = mm)
#save(data.probeCounts.R3, file = paste(selexDir, saveDir, "/data.probeCounts.R3.RData", sep = ""))
load(file = paste(selexDir, saveDir, "/data.probeCounts.R3.RData", sep = ""))
# Inputs about library are data specific
ModelTest = model(name = "HM-Exd-Ubx4a R2+R3 Nucleotide+View Model",
varRegLen = libLen,
leftFixedSeq = "GTTCAGAGTTCTACAGTCCGACGATCTGG",
rightFixedSeq ="CCAGCTGTCGTATGCCGTCTTCTGCTTG",
consensusSeq = "NTGAYNNAYNNN",
affinityType = "AffinitySym",
leftFixedSeqOverlap = 5,
minAffinity = 0.00,
missingValueSuppression = 1,
minSeedValue = .001,
upFootprintExtend = 4,
confidenceLevel = .95,
verbose = FALSE,
includeView = TRUE,
rounds = list(c(2, 3)),
rcSymmetric = FALSE)
getFeatureDesign(ModelTest)
## Feature design for object of class 'model'
##
## seedLen: 12
## upFootprintExtend: 4
## downFootprintExtend: 4
## rcSymmetric: FALSE
##
## Slot "N":
## N.upFootprintExtend: 4
## N.downFootprintExtend: 4
## N.set: 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20
## Number of previous iterations: 0
##
## Slot "Intercept":
## Number of Views per Strand of DNA: 7
## Number of Rounds: 2 (2, 3)
## Number of previous iterations: 0
##
## Slot "Shape":
## "ShapeParamsUsed": NONE
# Add seed model
addSeedPsam(ModelTest) = seedTable2psam(ModelTest, data.kmerTable)
# Model nucleotide Betas after seed PSAM is added
print(getValues(getN(ModelTest)))
## 1 2 3 4 5 6 7 8 9 10
## N.A 0 0 0 0 0.0000000 -0.8340377 -0.6171102 0.000000 -1.360965 -1.476628
## N.C 0 0 0 0 -0.8162560 -1.8500362 -3.1650820 -2.675131 -1.992603 -2.448111
## N.G 0 0 0 0 -0.2525938 -2.1521858 0.0000000 -2.618543 -1.264517 -2.484039
## N.T 0 0 0 0 -0.4154319 0.0000000 -1.3143951 -2.908717 0.000000 0.000000
## 11 12 13 14 15 16 17 18
## N.A -1.118790 0.000000 -2.022527 -0.86831649 0.0000000 -0.7152829 0 0
## N.C -2.174582 -3.392451 -1.355055 -1.05294403 -1.6266289 0.0000000 0 0
## N.G -1.362605 -2.603949 -1.716115 -0.02638645 -0.0963874 -0.3890593 0 0
## N.T 0.000000 -3.561304 0.000000 0.00000000 -1.0818102 -0.2918482 0 0
## 19 20
## N.A 0 0
## N.C 0 0
## N.G 0 0
## N.T 0 0
plot(ModelTest@features@N, Ntitle = "HM-Ubx4a-Exd R2 Nucleotide Features\nSeeding Model", ddG = TRUE)
Next we score the probes using topModelMatch
sample1 = sample(nrow(data.probeCounts), 500000)
sample2 = sample(nrow(data.probeCounts.R3), 500000)
data = rbind(data.probeCounts[sample1, ], data.probeCounts.R3[sample2, ])
#data = rbind(data.probeCounts, data.probeCounts.R3)
data = topModelMatch(data, ModelTest)
# Uses aligned probes to build design matrix
data = addDesignMatrix(data, ModelTest)
designMatrixSummary = getDesignMatrix(ModelTest, data)
## No shape parameters included in fit.
print("Round summary: ")
## [1] "Round summary: "
print (designMatrixSummary$Round)
## 2 3 Total
## Round 396284 464043 860327
print("Mono-nucleotide summary: ")
## [1] "Mono-nucleotide summary: "
print (designMatrixSummary$N)
## N.A N.C N.G N.T
## 1 75303 199379 332562 253083
## 2 109946 175452 336129 238800
## 3 153464 94100 401668 211095
## 4 164665 116090 406338 173234
## 5 370377 63320 282297 144333
## 6 104511 21627 19190 714999
## 7 177696 2185 608672 71774
## 8 817398 12314 16679 13936
## 9 42899 16378 42334 758716
## 10 39590 9642 12197 798898
## 11 58694 13383 57188 731062
## 12 836097 5741 13463 5026
## 13 12880 102279 15953 729215
## 14 104507 47681 432467 275672
## 15 371615 49351 302786 136575
## 16 104648 397108 170263 188308
## 17 134348 442408 107660 175911
## 18 256198 349279 98772 156078
## 19 206586 315633 214651 123457
## 20 229288 388252 168154 74633
print("View/strand orientation summary: ")
## [1] "View/strand orientation summary: "
print (designMatrixSummary$Intercept)
## View.1 View.2 View.3 View.4 View.5 View.6 View.7 StrandTotal
## Strand.F 53715 87778 80056 74296 74994 75920 89450 536209
## Strand.R 38823 54817 50716 39719 41092 43955 54996 324118
# # Constructs regression expression with independent features using design matrix
regressionFormula = updatedRegressionFormula(data, ModelTest)
print("Regression Formula: ")
## [1] "Regression Formula: "
print (regressionFormula)
## [1] "ObservedCount ~ offset(logProb)+Round.2+N.A1+N.C1+N.T1+N.A2+N.C2+N.T2+N.A3+N.C3+N.T3+N.A4+N.C4+N.T4+N.C5+N.G5+N.T5+N.A6+N.C6+N.G6+N.A7+N.C7+N.T7+N.C8+N.G8+N.T8+N.A9+N.C9+N.G9+N.A10+N.C10+N.G10+N.A11+N.C11+N.G11+N.C12+N.G12+N.T12+N.A13+N.C13+N.G13+N.A14+N.C14+N.T14+N.C15+N.G15+N.T15+N.A16+N.G16+N.T16+N.A17+N.G17+N.T17+N.A18+N.G18+N.T18+N.A19+N.G19+N.T19+N.A20+N.G20+N.T20+Strand.F1+Strand.R1+Strand.F2+Strand.R2+Strand.F3+Strand.R3+Strand.F4+Strand.R4+Strand.F5+Strand.R5+Strand.F6+Strand.R6+Strand.R7"
fit = glm(regressionFormula,
data=data,
family = poisson(link="log"))
## Warning: glm.fit: fitted rates numerically 0 occurred
summary(fit)
##
## Call:
## glm(formula = regressionFormula, family = poisson(link = "log"),
## data = data)
##
## Deviance Residuals:
## Min 1Q Median 3Q Max
## -14.9398 -0.9594 -0.3371 0.2471 19.3409
##
## Coefficients:
## Estimate Std. Error z value Pr(>|z|)
## (Intercept) 25.9799985 0.0068299 3803.887 < 2e-16 ***
## Round.2 -0.8665432 0.0026337 -329.019 < 2e-16 ***
## N.A1 0.0217454 0.0012258 17.740 < 2e-16 ***
## N.C1 -0.0302969 0.0013662 -22.175 < 2e-16 ***
## N.T1 -0.0472560 0.0012461 -37.923 < 2e-16 ***
## N.A2 0.0410221 0.0010229 40.103 < 2e-16 ***
## N.C2 -0.0321541 0.0011539 -27.865 < 2e-16 ***
## N.T2 -0.0543052 0.0010612 -51.175 < 2e-16 ***
## N.A3 0.0498994 0.0008729 57.165 < 2e-16 ***
## N.C3 -0.0968250 0.0010588 -91.448 < 2e-16 ***
## N.T3 -0.0704332 0.0009303 -75.713 < 2e-16 ***
## N.A4 0.0100403 0.0007863 12.769 < 2e-16 ***
## N.C4 -0.1536739 0.0009697 -158.481 < 2e-16 ***
## N.T4 -0.0712809 0.0007985 -89.263 < 2e-16 ***
## N.C5 -0.7904000 0.0016125 -490.159 < 2e-16 ***
## N.G5 -0.2773901 0.0006816 -406.942 < 2e-16 ***
## N.T5 -0.4214655 0.0007485 -563.044 < 2e-16 ***
## N.A6 -0.8704441 0.0014585 -596.807 < 2e-16 ***
## N.C6 -1.6016940 0.0079441 -201.622 < 2e-16 ***
## N.G6 -1.8827779 0.0122596 -153.576 < 2e-16 ***
## N.A7 -0.6417588 0.0008219 -780.829 < 2e-16 ***
## N.C7 -2.5228323 0.0801031 -31.495 < 2e-16 ***
## N.T7 -1.1216813 0.0018218 -615.707 < 2e-16 ***
## N.C8 -2.1071077 0.0214821 -98.087 < 2e-16 ***
## N.G8 -2.0512367 0.0160076 -128.142 < 2e-16 ***
## N.T8 -2.1593982 0.0170036 -126.997 < 2e-16 ***
## N.A9 -1.2859220 0.0036356 -353.707 < 2e-16 ***
## N.C9 -1.7866818 0.0123163 -145.067 < 2e-16 ***
## N.G9 -1.2735565 0.0035905 -354.700 < 2e-16 ***
## N.A10 -1.4238814 0.0042499 -335.037 < 2e-16 ***
## N.C10 -2.0531408 0.0243104 -84.455 < 2e-16 ***
## N.G10 -1.9329191 0.0203386 -95.037 < 2e-16 ***
## N.A11 -1.0232666 0.0020661 -495.262 < 2e-16 ***
## N.C11 -1.3729521 0.0095626 -143.575 < 2e-16 ***
## N.G11 -0.9769796 0.0021602 -452.271 < 2e-16 ***
## N.C12 -2.3444628 0.0464466 -50.477 < 2e-16 ***
## N.G12 -2.0743761 0.0181614 -114.219 < 2e-16 ***
## N.T12 -2.4283005 0.0421698 -57.584 < 2e-16 ***
## N.A13 -1.8788434 0.0133411 -140.831 < 2e-16 ***
## N.C13 -0.5632526 0.0011216 -502.184 < 2e-16 ***
## N.G13 -1.6668076 0.0099424 -167.646 < 2e-16 ***
## N.A14 -0.6263215 0.0011135 -562.484 < 2e-16 ***
## N.C14 -0.7800215 0.0017887 -436.090 < 2e-16 ***
## N.T14 -0.1496742 0.0005430 -275.622 < 2e-16 ***
## N.C15 -0.8978080 0.0021493 -417.725 < 2e-16 ***
## N.G15 -0.1185204 0.0005634 -210.368 < 2e-16 ***
## N.T15 -0.5144171 0.0008750 -587.872 < 2e-16 ***
## N.A16 -0.4563735 0.0009957 -458.327 < 2e-16 ***
## N.G16 -0.2177338 0.0007484 -290.917 < 2e-16 ***
## N.T16 -0.2602191 0.0007143 -364.304 < 2e-16 ***
## N.A17 -0.1793964 0.0008792 -204.046 < 2e-16 ***
## N.G17 -0.2460541 0.0009929 -247.818 < 2e-16 ***
## N.T17 -0.0779527 0.0007804 -99.887 < 2e-16 ***
## N.A18 -0.0838812 0.0010672 -78.596 < 2e-16 ***
## N.G18 -0.0881562 0.0011178 -78.865 < 2e-16 ***
## N.T18 0.0715949 0.0009332 76.719 < 2e-16 ***
## N.A19 -0.0620947 0.0012296 -50.498 < 2e-16 ***
## N.G19 -0.1066724 0.0013405 -79.579 < 2e-16 ***
## N.T19 0.1011834 0.0010821 93.504 < 2e-16 ***
## N.A20 -0.0318163 0.0015224 -20.899 < 2e-16 ***
## N.G20 -0.0715558 0.0016216 -44.126 < 2e-16 ***
## N.T20 0.0687244 0.0013848 49.627 < 2e-16 ***
## Strand.F1 -0.0712535 0.0025283 -28.182 < 2e-16 ***
## Strand.R1 -0.0006337 0.0028143 -0.225 0.822
## Strand.F2 0.1354451 0.0023313 58.098 < 2e-16 ***
## Strand.R2 0.1202413 0.0024733 48.615 < 2e-16 ***
## Strand.F3 0.0815021 0.0019924 40.906 < 2e-16 ***
## Strand.R3 0.0835060 0.0022255 37.522 < 2e-16 ***
## Strand.F4 0.0266087 0.0021866 12.169 < 2e-16 ***
## Strand.R4 0.0102616 0.0024421 4.202 2.65e-05 ***
## Strand.F5 0.0611707 0.0026997 22.658 < 2e-16 ***
## Strand.R5 0.0432092 0.0029039 14.880 < 2e-16 ***
## Strand.F6 0.0569660 0.0025979 21.928 < 2e-16 ***
## Strand.R6 0.0869046 0.0027671 31.407 < 2e-16 ***
## Strand.R7 0.0141537 0.0020409 6.935 4.07e-12 ***
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
##
## (Dispersion parameter for poisson family taken to be 1)
##
## Null deviance: 6057390 on 860326 degrees of freedom
## Residual deviance: 1445731 on 860252 degrees of freedom
## AIC: 2643025
##
## Number of Fisher Scoring iterations: 9
ModelTest = addNewBetas(ModelTest, data, fit)
## No shape parameters included in fit.
# # Nucleotide Features after first round of fitting
summary(ModelTest)
## An object of class 'model'
##
## Slot "name": HM-Exd-Ubx4a R2+R3 Nucleotide+View Model
## Slot "varRegLen": 16
## Slot "leftFixedSeq": GTTCAGAGTTCTACAGTCCGACGATCTGG
## Slot "rightFixedSeq": CCAGCTGTCGTATGCCGTCTTCTGCTTG
## Slot "leftFixedSeqOverlap": 5
## Slot "rightFixedSeqOverlap": 5
## Slot "confidenceLevel": 0.95
## Slot "minAffinity": 0
## Slot "missingValueSuppression": 1
## Slot "minSeedValue": 0.001
## Slot "seedLen": 12
## Slot "consensusSeq": [ACGT]TGA[CT][ACGT][ACGT]A[CT][ACGT][ACGT][ACGT]
## Slot "upFootprintExtend": 4
## Slot "downFootprintExtend": 4
## Slot "fpLen": 20
##
## Fits a model of footprint length 20 for mono-nucleotide features with 7 view(s) per strand of DNA and 2 round(s) of data (round = 2, 3) without reverse complement symmetry.
##
## Slot "regressionFormula": ObservedCount ~ offset(logProb)+Round.2+Round.3+N.A1+N.C1+N.G1+N.T1+N.A2+N.C2+N.G2+N.T2+N.A3+N.C3+N.G3+N.T3+N.A4+N.C4+N.G4+N.T4+N.A5+N.C5+N.G5+N.T5+N.A6+N.C6+N.G6+N.T6+N.A7+N.C7+N.G7+N.T7+N.A8+N.C8+N.G8+N.T8+N.A9+N.C9+N.G9+N.T9+N.A10+N.C10+N.G10+N.T10+N.A11+N.C11+N.G11+N.T11+N.A12+N.C12+N.G12+N.T12+N.A13+N.C13+N.G13+N.T13+N.A14+N.C14+N.G14+N.T14+N.A15+N.C15+N.G15+N.T15+N.A16+N.C16+N.G16+N.T16+N.A17+N.C17+N.G17+N.T17+N.A18+N.C18+N.G18+N.T18+N.A19+N.C19+N.G19+N.T19+N.A20+N.C20+N.G20+N.T20+Strand.F1+Strand.R1+Strand.F2+Strand.R2+Strand.F3+Strand.R3+Strand.F4+Strand.R4+Strand.F5+Strand.R5+Strand.F6+Strand.R6+Strand.F7+Strand.R7
##
##
## Includes the following feature sub-classes:
## An object of class 'N'
## Fits 20 nucleotides for a feature model of length 20.
## Nucleotide beta values:
## 1 2 3 4 5 6
## N.A 0.02174536 0.04102213 0.04989937 0.01004026 0.0000000 -0.8704441
## N.C -0.03029691 -0.03215409 -0.09682500 -0.15367389 -0.7904000 -1.6016940
## N.G 0.00000000 0.00000000 0.00000000 0.00000000 -0.2773901 -1.8827779
## N.T -0.04725599 -0.05430520 -0.07043318 -0.07128095 -0.4214655 0.0000000
## 7 8 9 10 11 12
## N.A -0.6417588 0.000000 -1.285922 -1.423881 -1.0232666 0.000000
## N.C -2.5228323 -2.107108 -1.786682 -2.053141 -1.3729521 -2.344463
## N.G 0.0000000 -2.051237 -1.273557 -1.932919 -0.9769796 -2.074376
## N.T -1.1216813 -2.159398 0.000000 0.000000 0.0000000 -2.428301
## 13 14 15 16 17 18
## N.A -1.8788434 -0.6263215 0.0000000 -0.4563735 -0.17939643 -0.08388117
## N.C -0.5632526 -0.7800215 -0.8978080 0.0000000 0.00000000 0.00000000
## N.G -1.6668076 0.0000000 -0.1185204 -0.2177338 -0.24605412 -0.08815617
## N.T 0.0000000 -0.1496742 -0.5144171 -0.2602191 -0.07795266 0.07159492
## 19 20
## N.A -0.06209466 -0.03181629
## N.C 0.00000000 0.00000000
## N.G -0.10667238 -0.07155580
## N.T 0.10118344 0.06872438
##
## Nucleotide beta errors:
## 1 2 3 4 5
## N.A 0.001225789 0.001022926 0.0008728981 0.0007863284 0.0000000000
## N.C 0.001366243 0.001153924 0.0010587979 0.0009696662 0.0016125376
## N.G 0.000000000 0.000000000 0.0000000000 0.0000000000 0.0006816458
## N.T 0.001246089 0.001061175 0.0009302660 0.0007985459 0.0007485479
## 6 7 8 9 10
## N.A 0.001458502 0.0008218937 0.00000000 0.003635556 0.004249926
## N.C 0.007944050 0.0801030965 0.02148208 0.012316281 0.024310364
## N.G 0.012259566 0.0000000000 0.01600757 0.003590522 0.020338560
## N.T 0.000000000 0.0018217765 0.01700359 0.000000000 0.000000000
## 11 12 13 14 15
## N.A 0.002066110 0.00000000 0.013341077 0.0011134916 0.0000000000
## N.C 0.009562609 0.04644656 0.001121606 0.0017886722 0.0021492824
## N.G 0.002160162 0.01816142 0.009942423 0.0000000000 0.0005633947
## N.T 0.000000000 0.04216979 0.000000000 0.0005430418 0.0008750489
## 16 17 18 19 20
## N.A 0.0009957372 0.0008791966 0.001067247 0.001229638 0.001522355
## N.C 0.0000000000 0.0000000000 0.000000000 0.000000000 0.000000000
## N.G 0.0007484384 0.0009928808 0.001117817 0.001340463 0.001621621
## N.T 0.0007142913 0.0007804081 0.000933205 0.001082135 0.001384808
##
##
## An object of class 'Intercept'
## Fits 14 views and 2 round(s) (round = 2, 3).
## Intercept beta values:
## Round.2:
## View.1 View.2 View.3 View.4 View.5 View.6 View.7
## Strand.F 25.04220 25.2489 25.19496 25.14006 25.17463 25.17042 25.11346
## Strand.R 25.11282 25.2337 25.19696 25.12372 25.15666 25.20036 25.12761
##
## Round.3:
## View.1 View.2 View.3 View.4 View.5 View.6 View.7
## Strand.F 25.98 25.98 25.98 25.98 25.98 25.98 25.98
## Strand.R 25.98 25.98 25.98 25.98 25.98 25.98 25.98
##
## Intercept beta errors:
## Round.2:
## View.1 View.2 View.3 View.4 View.5
## Strand.F 0.007744408 0.007682350 0.007586380 0.007639668 0.007802040
## Strand.R 0.007842412 0.007726627 0.007650909 0.007716672 0.007875033
## View.6 View.7
## Strand.F 0.007767393 0.007320068
## Strand.R 0.007825608 0.007599266
##
## Round.3:
## View.1 View.2 View.3 View.4 View.5
## Strand.F 0.006829856 0.006829856 0.006829856 0.006829856 0.006829856
## Strand.R 0.006829856 0.006829856 0.006829856 0.006829856 0.006829856
## View.6 View.7
## Strand.F 0.006829856 0.006829856
## Strand.R 0.006829856 0.006829856
##
##
##
## An object of class 'Shape'
## Fits 0 shape coefficients for 0 kinds of shape parameter(s) (shape = ) for a feature model of length 20.
vPheight = verticalPlot_height(ModelTest)
pM <- plot(ModelTest, plotTitle = "HM-Ubx4a-Exd R2+R3 Nucleotide+View Fit", Nplot.ddG = TRUE, verticalPlots = TRUE)
ggplot2::ggsave(pM, file = paste(selexDir, saveDir, "/modelPlot.pdf", sep = ""), height = vPheight, width = 6)
ggplot2::ggsave(pM, file = paste(selexDir, saveDir, "/modelPlot.",1, ".pdf", sep = ""), height = vPheight, width = 6)
data = rbind(data.probeCounts[sample1, ], data.probeCounts.R3[sample2, ])
#data = rbind(data.probeCounts, data.probeCounts.R3)
data.nrow = nrow(data)
data = topModelMatch(data, ModelTest)
data = addDesignMatrix(data, ModelTest)
designMatrixSummary.v2 = getDesignMatrix(ModelTest, data)
## No shape parameters included in fit.
if ((all(designMatrixSummary.v2$N == designMatrixSummary$N)) & (all(designMatrixSummary.v2$Round == designMatrixSummary$Round)) & (all(designMatrixSummary.v2$Intercept == designMatrixSummary$Intercept))) {
print ("Stability Reached")
}
for (i in 2:20) {
if ((all(designMatrixSummary.v2$N == designMatrixSummary$N)) & (all(designMatrixSummary.v2$Round == designMatrixSummary$Round)) & (all(designMatrixSummary.v2$Intercept == designMatrixSummary$Intercept))) {
break
}
data.nrow = nrow(data)
print (paste("i =",i))
designMatrixSummary = getDesignMatrix(ModelTest, data)
print("Round summary: ")
print (designMatrixSummary$Round)
print("Mono-nucleotide summary: ")
print (designMatrixSummary$N)
print("View/strand orientation summary: ")
print (designMatrixSummary$Intercept)
# # Constructs regression expression with independent features using design matrix
regressionFormula = updatedRegressionFormula(data, ModelTest)
print("Regression Formula: ")
print (regressionFormula)
fit = glm(regressionFormula,
data=data,
family = poisson(link="log"))
summary(fit)
ModelTest = addNewBetas(ModelTest, data, fit)
# # Nucleotide Features after first round of fitting
summary(ModelTest)
pM <- plot(ModelTest, plotTitle = "HM-Ubx4a-Exd R2+R3 Nucleotide+View Fit", Nplot.ddG = TRUE, verticalPlots = TRUE)
ggplot2::ggsave(pM, file = paste(selexDir, saveDir, "/modelPlot.pdf", sep = ""), height = vPheight, width = 6)
ggplot2::ggsave(pM, file = paste(selexDir, saveDir, "/modelPlot.",i, ".pdf", sep = ""), height = vPheight, width = 6)
data = topModelMatch(data, ModelTest)
data = addDesignMatrix(data, ModelTest)
designMatrixSummary.v2 = getDesignMatrix(ModelTest, data)
print(paste("Number of Observations in Design Matrix: ",nrow(data), sep = ""))
if ((all(designMatrixSummary.v2$N == designMatrixSummary$N)) & (all(designMatrixSummary.v2$Round == designMatrixSummary$Round)) & (all(designMatrixSummary.v2$Intercept == designMatrixSummary$Intercept))) {
print (paste("Stability Reached after ", i, " iterations.", sep = ""))
break
} else if (nrow(data) == 0) {
print ("Algorithm failed to converge: No probes meet the confidence level requirement (Confidence Level:", ModelTest@confidenceLevel, ")", sep = "")
}
}
## [1] "i = 2"
## No shape parameters included in fit.
## [1] "Round summary: "
## 2 3 Total
## Round 375596 459331 834927
## [1] "Mono-nucleotide summary: "
## N.A N.C N.G N.T
## 1 71839 194863 322264 245961
## 2 106756 169446 327801 230924
## 3 148348 91555 391477 203547
## 4 161174 110479 395291 167983
## 5 363332 61164 270955 139476
## 6 96191 20341 15977 702418
## 7 170122 1945 593862 68998
## 8 796895 11065 13694 13273
## 9 34242 13198 36699 750788
## 10 33151 7834 10323 783619
## 11 50985 12686 54761 716495
## 12 811450 6367 11490 5620
## 13 9558 105889 12521 706959
## 14 102714 46854 427685 257674
## 15 355809 49806 291172 138140
## 16 101462 383910 169598 179957
## 17 130452 429056 104062 171357
## 18 246481 338823 95758 153865
## 19 199773 307234 206459 121461
## 20 221683 377768 162748 72728
## [1] "View/strand orientation summary: "
## View.1 View.2 View.3 View.4 View.5 View.6 View.7 StrandTotal
## Strand.F 51928 86099 78478 72935 72746 73536 85642 521364
## Strand.R 37574 53366 49645 38581 39636 42252 52509 313563
## [1] "Regression Formula: "
## [1] "ObservedCount ~ offset(logProb)+Round.2+N.A1+N.C1+N.T1+N.A2+N.C2+N.T2+N.A3+N.C3+N.T3+N.A4+N.C4+N.T4+N.C5+N.G5+N.T5+N.A6+N.C6+N.G6+N.A7+N.C7+N.T7+N.C8+N.G8+N.T8+N.A9+N.C9+N.G9+N.A10+N.C10+N.G10+N.A11+N.C11+N.G11+N.C12+N.G12+N.T12+N.A13+N.C13+N.G13+N.A14+N.C14+N.T14+N.C15+N.G15+N.T15+N.A16+N.G16+N.T16+N.A17+N.G17+N.T17+N.A18+N.G18+N.T18+N.A19+N.G19+N.T19+N.A20+N.G20+N.T20+Strand.F1+Strand.R1+Strand.R2+Strand.F3+Strand.R3+Strand.F4+Strand.R4+Strand.F5+Strand.R5+Strand.F6+Strand.R6+Strand.F7+Strand.R7"
## No shape parameters included in fit.
## An object of class 'model'
##
## Slot "name": HM-Exd-Ubx4a R2+R3 Nucleotide+View Model
## Slot "varRegLen": 16
## Slot "leftFixedSeq": GTTCAGAGTTCTACAGTCCGACGATCTGG
## Slot "rightFixedSeq": CCAGCTGTCGTATGCCGTCTTCTGCTTG
## Slot "leftFixedSeqOverlap": 5
## Slot "rightFixedSeqOverlap": 5
## Slot "confidenceLevel": 0.95
## Slot "minAffinity": 0
## Slot "missingValueSuppression": 1
## Slot "minSeedValue": 0.001
## Slot "seedLen": 12
## Slot "consensusSeq": [ACGT]TGA[CT][ACGT][ACGT]A[CT][ACGT][ACGT][ACGT]
## Slot "upFootprintExtend": 4
## Slot "downFootprintExtend": 4
## Slot "fpLen": 20
##
## Fits a model of footprint length 20 for mono-nucleotide features with 7 view(s) per strand of DNA and 2 round(s) of data (round = 2, 3) without reverse complement symmetry.
##
## Slot "regressionFormula": ObservedCount ~ offset(logProb)+Round.2+Round.3+N.A1+N.C1+N.G1+N.T1+N.A2+N.C2+N.G2+N.T2+N.A3+N.C3+N.G3+N.T3+N.A4+N.C4+N.G4+N.T4+N.A5+N.C5+N.G5+N.T5+N.A6+N.C6+N.G6+N.T6+N.A7+N.C7+N.G7+N.T7+N.A8+N.C8+N.G8+N.T8+N.A9+N.C9+N.G9+N.T9+N.A10+N.C10+N.G10+N.T10+N.A11+N.C11+N.G11+N.T11+N.A12+N.C12+N.G12+N.T12+N.A13+N.C13+N.G13+N.T13+N.A14+N.C14+N.G14+N.T14+N.A15+N.C15+N.G15+N.T15+N.A16+N.C16+N.G16+N.T16+N.A17+N.C17+N.G17+N.T17+N.A18+N.C18+N.G18+N.T18+N.A19+N.C19+N.G19+N.T19+N.A20+N.C20+N.G20+N.T20+Strand.F1+Strand.R1+Strand.F2+Strand.R2+Strand.F3+Strand.R3+Strand.F4+Strand.R4+Strand.F5+Strand.R5+Strand.F6+Strand.R6+Strand.F7+Strand.R7
##
##
## Includes the following feature sub-classes:
## An object of class 'N'
## Fits 20 nucleotides for a feature model of length 20.
## Nucleotide beta values:
## 1 2 3 4 5 6
## N.A 0.02161680 0.04116163 0.04968048 0.009676129 0.0000000 -0.8703624
## N.C -0.03080325 -0.03190743 -0.09711335 -0.153391713 -0.7902572 -1.6002163
## N.G 0.00000000 0.00000000 0.00000000 0.000000000 -0.2769111 -1.9038633
## N.T -0.04743797 -0.05350019 -0.07058902 -0.071120573 -0.4209625 0.0000000
## 7 8 9 10 11 12
## N.A -0.6418182 0.000000 -1.276362 -1.422949 -1.0157410 0.000000
## N.C -2.5258672 -2.120071 -1.789571 -2.075350 -1.3637884 -2.334191
## N.G 0.0000000 -2.096095 -1.275476 -1.952938 -0.9779989 -2.096544
## N.T -1.1222207 -2.155269 0.000000 0.000000 0.0000000 -2.465743
## 13 14 15 16 17 18
## N.A -1.893950 -0.6256484 0.0000000 -0.4558603 -0.17955429 -0.08374309
## N.C -0.563107 -0.7809584 -0.8975121 0.0000000 0.00000000 0.00000000
## N.G -1.668017 0.0000000 -0.1188200 -0.2177312 -0.24587791 -0.08831218
## N.T 0.000000 -0.1491573 -0.5138728 -0.2599798 -0.07778824 0.07166771
## 19 20
## N.A -0.06183125 -0.03186788
## N.C 0.00000000 0.00000000
## N.G -0.10639641 -0.07169170
## N.T 0.10134188 0.06853919
##
## Nucleotide beta errors:
## 1 2 3 4 5
## N.A 0.001227401 0.001023550 0.0008735877 0.0007863359 0.0000000000
## N.C 0.001367158 0.001155034 0.0010591287 0.0009715764 0.0016132155
## N.G 0.000000000 0.000000000 0.0000000000 0.0000000000 0.0006823636
## N.T 0.001247362 0.001062273 0.0009307194 0.0007985833 0.0007490592
## 6 7 8 9 10
## N.A 0.001461079 0.0008209909 0.00000000 0.003809889 0.004359196
## N.C 0.007908856 0.0826646719 0.02180765 0.012518961 0.025197804
## N.G 0.012712334 0.0000000000 0.01713440 0.003613790 0.021276997
## N.T 0.000000000 0.0018219500 0.01688406 0.000000000 0.000000000
## 11 12 13 14 15
## N.A 0.002089993 0.00000000 0.013747033 0.0011130465 0.0000000000
## N.C 0.009457113 0.04518970 0.001116826 0.0017851658 0.0021446679
## N.G 0.002164481 0.01871764 0.010022616 0.0000000000 0.0005638808
## N.T 0.000000000 0.04289796 0.000000000 0.0005437652 0.0008734697
## 16 17 18 19 20
## N.A 0.0009958352 0.0008795767 0.001067556 0.001230283 0.001523163
## N.C 0.0000000000 0.0000000000 0.000000000 0.000000000 0.000000000
## N.G 0.0007480090 0.0009933159 0.001118673 0.001341109 0.001622679
## N.T 0.0007151687 0.0007804032 0.000933293 0.001082684 0.001385523
##
##
## An object of class 'Intercept'
## Fits 14 views and 2 round(s) (round = 2, 3).
## Intercept beta values:
## Round.2:
## View.1 View.2 View.3 View.4 View.5 View.6 View.7
## Strand.F 25.17768 25.38413 25.33084 25.27575 25.31053 25.30653 25.24928
## Strand.R 25.24831 25.36903 25.33300 25.25965 25.29231 25.33610 25.26348
##
## Round.3:
## View.1 View.2 View.3 View.4 View.5 View.6 View.7
## Strand.F 26.38251 26.38251 26.38251 26.38251 26.38251 26.38251 26.38251
## Strand.R 26.38251 26.38251 26.38251 26.38251 26.38251 26.38251 26.38251
##
## Intercept beta errors:
## Round.2:
## View.1 View.2 View.3 View.4 View.5
## Strand.F 0.008330157 0.007963591 0.008284461 0.008349883 0.008324490
## Strand.R 0.008437961 0.008084675 0.008353475 0.008436064 0.008409874
## View.6 View.7
## Strand.F 0.008290195 0.008298123
## Strand.R 0.008351975 0.008346303
##
## Round.3:
## View.1 View.2 View.3 View.4 View.5 View.6
## Strand.F 0.00745047 0.00745047 0.00745047 0.00745047 0.00745047 0.00745047
## Strand.R 0.00745047 0.00745047 0.00745047 0.00745047 0.00745047 0.00745047
## View.7
## Strand.F 0.00745047
## Strand.R 0.00745047
##
##
##
## An object of class 'Shape'
## Fits 0 shape coefficients for 0 kinds of shape parameter(s) (shape = ) for a feature model of length 20.
## No shape parameters included in fit.
## [1] "Number of Observations in Design Matrix: 833942"
## [1] "i = 3"
## No shape parameters included in fit.
## [1] "Round summary: "
## 2 3 Total
## Round 374969 458973 833942
## [1] "Mono-nucleotide summary: "
## N.A N.C N.G N.T
## 1 71718 194705 321779 245740
## 2 106604 169268 327387 230683
## 3 148168 91377 391162 203235
## 4 160925 110258 394985 167774
## 5 362808 61110 270658 139366
## 6 96109 20314 15856 701663
## 7 169711 1926 593499 68806
## 8 796204 11028 13457 13253
## 9 34220 13154 36641 749927
## 10 33111 7795 10247 782789
## 11 50943 12658 54703 715638
## 12 810668 6365 11407 5502
## 13 9493 105801 12490 706158
## 14 102584 46753 427342 257263
## 15 355341 49738 290922 137941
## 16 101297 383491 169442 179712
## 17 130310 428514 103957 171161
## 18 246225 338334 95670 153713
## 19 199513 306825 206241 121363
## 20 221405 377351 162523 72663
## [1] "View/strand orientation summary: "
## View.1 View.2 View.3 View.4 View.5 View.6 View.7 StrandTotal
## Strand.F 51873 86018 78419 72819 72611 73419 85527 520686
## Strand.R 37550 53343 49618 38518 39585 42183 52459 313256
## [1] "Regression Formula: "
## [1] "ObservedCount ~ offset(logProb)+Round.2+N.A1+N.C1+N.T1+N.A2+N.C2+N.T2+N.A3+N.C3+N.T3+N.A4+N.C4+N.T4+N.C5+N.G5+N.T5+N.A6+N.C6+N.G6+N.A7+N.C7+N.T7+N.C8+N.G8+N.T8+N.A9+N.C9+N.G9+N.A10+N.C10+N.G10+N.A11+N.C11+N.G11+N.C12+N.G12+N.T12+N.A13+N.C13+N.G13+N.A14+N.C14+N.T14+N.C15+N.G15+N.T15+N.A16+N.G16+N.T16+N.A17+N.G17+N.T17+N.A18+N.G18+N.T18+N.A19+N.G19+N.T19+N.A20+N.G20+N.T20+Strand.F1+Strand.R1+Strand.R2+Strand.F3+Strand.R3+Strand.F4+Strand.R4+Strand.F5+Strand.R5+Strand.F6+Strand.R6+Strand.F7+Strand.R7"
## No shape parameters included in fit.
## An object of class 'model'
##
## Slot "name": HM-Exd-Ubx4a R2+R3 Nucleotide+View Model
## Slot "varRegLen": 16
## Slot "leftFixedSeq": GTTCAGAGTTCTACAGTCCGACGATCTGG
## Slot "rightFixedSeq": CCAGCTGTCGTATGCCGTCTTCTGCTTG
## Slot "leftFixedSeqOverlap": 5
## Slot "rightFixedSeqOverlap": 5
## Slot "confidenceLevel": 0.95
## Slot "minAffinity": 0
## Slot "missingValueSuppression": 1
## Slot "minSeedValue": 0.001
## Slot "seedLen": 12
## Slot "consensusSeq": [ACGT]TGA[CT][ACGT][ACGT]A[CT][ACGT][ACGT][ACGT]
## Slot "upFootprintExtend": 4
## Slot "downFootprintExtend": 4
## Slot "fpLen": 20
##
## Fits a model of footprint length 20 for mono-nucleotide features with 7 view(s) per strand of DNA and 2 round(s) of data (round = 2, 3) without reverse complement symmetry.
##
## Slot "regressionFormula": ObservedCount ~ offset(logProb)+Round.2+Round.3+N.A1+N.C1+N.G1+N.T1+N.A2+N.C2+N.G2+N.T2+N.A3+N.C3+N.G3+N.T3+N.A4+N.C4+N.G4+N.T4+N.A5+N.C5+N.G5+N.T5+N.A6+N.C6+N.G6+N.T6+N.A7+N.C7+N.G7+N.T7+N.A8+N.C8+N.G8+N.T8+N.A9+N.C9+N.G9+N.T9+N.A10+N.C10+N.G10+N.T10+N.A11+N.C11+N.G11+N.T11+N.A12+N.C12+N.G12+N.T12+N.A13+N.C13+N.G13+N.T13+N.A14+N.C14+N.G14+N.T14+N.A15+N.C15+N.G15+N.T15+N.A16+N.C16+N.G16+N.T16+N.A17+N.C17+N.G17+N.T17+N.A18+N.C18+N.G18+N.T18+N.A19+N.C19+N.G19+N.T19+N.A20+N.C20+N.G20+N.T20+Strand.F1+Strand.R1+Strand.F2+Strand.R2+Strand.F3+Strand.R3+Strand.F4+Strand.R4+Strand.F5+Strand.R5+Strand.F6+Strand.R6+Strand.F7+Strand.R7
##
##
## Includes the following feature sub-classes:
## An object of class 'N'
## Fits 20 nucleotides for a feature model of length 20.
## Nucleotide beta values:
## 1 2 3 4 5 6
## N.A 0.02161796 0.04118556 0.04967212 0.009706826 0.0000000 -0.8703717
## N.C -0.03078716 -0.03188387 -0.09707026 -0.153371718 -0.7902692 -1.6003049
## N.G 0.00000000 0.00000000 0.00000000 0.000000000 -0.2769103 -1.9035372
## N.T -0.04744382 -0.05349705 -0.07060092 -0.071126095 -0.4209607 0.0000000
## 7 8 9 10 11 12
## N.A -0.6417425 0.000000 -1.276403 -1.422914 -1.0157639 0.000000
## N.C -2.5580154 -2.121431 -1.789558 -2.073904 -1.3633777 -2.334184
## N.G 0.0000000 -2.099540 -1.275492 -1.952250 -0.9780047 -2.097386
## N.T -1.1222256 -2.155701 0.000000 0.000000 0.0000000 -2.459204
## 13 14 15 16 17 18
## N.A -1.8946767 -0.6256303 0.0000000 -0.4558612 -0.17954685 -0.08371906
## N.C -0.5631081 -0.7808180 -0.8974941 0.0000000 0.00000000 0.00000000
## N.G -1.6678461 0.0000000 -0.1188129 -0.2177189 -0.24585769 -0.08829377
## N.T 0.0000000 -0.1491417 -0.5138710 -0.2599724 -0.07777757 0.07168990
## 19 20
## N.A -0.06183264 -0.03187252
## N.C 0.00000000 0.00000000
## N.G -0.10639138 -0.07169272
## N.T 0.10133614 0.06853261
##
## Nucleotide beta errors:
## 1 2 3 4 5
## N.A 0.001227526 0.001023691 0.0008736130 0.0007863773 0.0000000000
## N.C 0.001367240 0.001155174 0.0010592226 0.0009717609 0.0016132812
## N.G 0.000000000 0.000000000 0.0000000000 0.0000000000 0.0006824038
## N.T 0.001247467 0.001062414 0.0009308357 0.0007986143 0.0007490782
## 6 7 8 9 10
## N.A 0.001461145 0.0008213274 0.00000000 0.003810101 0.004359167
## N.C 0.007912005 0.0861170085 0.02184313 0.012526982 0.025191209
## N.G 0.012720213 0.0000000000 0.01725742 0.003614000 0.021294860
## N.T 0.000000000 0.0018224720 0.01689473 0.000000000 0.000000000
## 11 12 13 14 15
## N.A 0.002090092 0.00000000 0.013772455 0.0011131499 0.0000000000
## N.C 0.009461385 0.04518967 0.001116882 0.0017852495 0.0021448480
## N.G 0.002164582 0.01874735 0.010022326 0.0000000000 0.0005639128
## N.T 0.000000000 0.04286689 0.000000000 0.0005437987 0.0008735590
## 16 17 18 19 20
## N.A 0.0009959992 0.0008796166 0.0010676227 0.001230316 0.001523172
## N.C 0.0000000000 0.0000000000 0.0000000000 0.000000000 0.000000000
## N.G 0.0007480350 0.0009933683 0.0011187333 0.001341108 0.001622686
## N.T 0.0007152181 0.0007804453 0.0009333569 0.001082688 0.001385530
##
##
## An object of class 'Intercept'
## Fits 14 views and 2 round(s) (round = 2, 3).
## Intercept beta values:
## Round.2:
## View.1 View.2 View.3 View.4 View.5 View.6 View.7
## Strand.F 25.17758 25.38401 25.33073 25.27564 25.31044 25.30643 25.24917
## Strand.R 25.24820 25.36891 25.33289 25.25954 25.29223 25.33597 25.26338
##
## Round.3:
## View.1 View.2 View.3 View.4 View.5 View.6 View.7
## Strand.F 26.38231 26.38231 26.38231 26.38231 26.38231 26.38231 26.38231
## Strand.R 26.38231 26.38231 26.38231 26.38231 26.38231 26.38231 26.38231
##
## Intercept beta errors:
## Round.2:
## View.1 View.2 View.3 View.4 View.5
## Strand.F 0.008330632 0.007964043 0.008284932 0.008350361 0.008324955
## Strand.R 0.008438430 0.008085123 0.008353942 0.008436572 0.008410352
## View.6 View.7
## Strand.F 0.008290659 0.008298572
## Strand.R 0.008352454 0.008346759
##
## Round.3:
## View.1 View.2 View.3 View.4 View.5
## Strand.F 0.007450878 0.007450878 0.007450878 0.007450878 0.007450878
## Strand.R 0.007450878 0.007450878 0.007450878 0.007450878 0.007450878
## View.6 View.7
## Strand.F 0.007450878 0.007450878
## Strand.R 0.007450878 0.007450878
##
##
##
## An object of class 'Shape'
## Fits 0 shape coefficients for 0 kinds of shape parameter(s) (shape = ) for a feature model of length 20.
## No shape parameters included in fit.
## [1] "Number of Observations in Design Matrix: 833892"
## [1] "i = 4"
## No shape parameters included in fit.
## [1] "Round summary: "
## 2 3 Total
## Round 374939 458953 833892
## [1] "Mono-nucleotide summary: "
## N.A N.C N.G N.T
## 1 71711 194700 321757 245724
## 2 106594 169264 327359 230675
## 3 148155 91370 391146 203221
## 4 160915 110253 394966 167758
## 5 362783 61109 270644 139356
## 6 96098 20313 15852 701629
## 7 169705 1895 593488 68804
## 8 796171 11023 13447 13251
## 9 34214 13153 36634 749891
## 10 33108 7794 10246 782744
## 11 50937 12658 54698 715599
## 12 810623 6365 11402 5502
## 13 9493 105795 12487 706117
## 14 102578 46749 427316 257249
## 15 355324 49732 290903 137933
## 16 101292 383463 169434 179703
## 17 130302 428484 103953 171153
## 18 246205 338316 95664 153707
## 19 199505 306802 206226 121359
## 20 221393 377322 162516 72661
## [1] "View/strand orientation summary: "
## View.1 View.2 View.3 View.4 View.5 View.6 View.7 StrandTotal
## Strand.F 51871 86016 78416 72813 72605 73416 85516 520653
## Strand.R 37550 53342 49614 38514 39583 42181 52455 313239
## [1] "Regression Formula: "
## [1] "ObservedCount ~ offset(logProb)+Round.2+N.A1+N.C1+N.T1+N.A2+N.C2+N.T2+N.A3+N.C3+N.T3+N.A4+N.C4+N.T4+N.C5+N.G5+N.T5+N.A6+N.C6+N.G6+N.A7+N.C7+N.T7+N.C8+N.G8+N.T8+N.A9+N.C9+N.G9+N.A10+N.C10+N.G10+N.A11+N.C11+N.G11+N.C12+N.G12+N.T12+N.A13+N.C13+N.G13+N.A14+N.C14+N.T14+N.C15+N.G15+N.T15+N.A16+N.G16+N.T16+N.A17+N.G17+N.T17+N.A18+N.G18+N.T18+N.A19+N.G19+N.T19+N.A20+N.G20+N.T20+Strand.F1+Strand.R1+Strand.R2+Strand.F3+Strand.R3+Strand.F4+Strand.R4+Strand.F5+Strand.R5+Strand.F6+Strand.R6+Strand.F7+Strand.R7"
## No shape parameters included in fit.
## An object of class 'model'
##
## Slot "name": HM-Exd-Ubx4a R2+R3 Nucleotide+View Model
## Slot "varRegLen": 16
## Slot "leftFixedSeq": GTTCAGAGTTCTACAGTCCGACGATCTGG
## Slot "rightFixedSeq": CCAGCTGTCGTATGCCGTCTTCTGCTTG
## Slot "leftFixedSeqOverlap": 5
## Slot "rightFixedSeqOverlap": 5
## Slot "confidenceLevel": 0.95
## Slot "minAffinity": 0
## Slot "missingValueSuppression": 1
## Slot "minSeedValue": 0.001
## Slot "seedLen": 12
## Slot "consensusSeq": [ACGT]TGA[CT][ACGT][ACGT]A[CT][ACGT][ACGT][ACGT]
## Slot "upFootprintExtend": 4
## Slot "downFootprintExtend": 4
## Slot "fpLen": 20
##
## Fits a model of footprint length 20 for mono-nucleotide features with 7 view(s) per strand of DNA and 2 round(s) of data (round = 2, 3) without reverse complement symmetry.
##
## Slot "regressionFormula": ObservedCount ~ offset(logProb)+Round.2+Round.3+N.A1+N.C1+N.G1+N.T1+N.A2+N.C2+N.G2+N.T2+N.A3+N.C3+N.G3+N.T3+N.A4+N.C4+N.G4+N.T4+N.A5+N.C5+N.G5+N.T5+N.A6+N.C6+N.G6+N.T6+N.A7+N.C7+N.G7+N.T7+N.A8+N.C8+N.G8+N.T8+N.A9+N.C9+N.G9+N.T9+N.A10+N.C10+N.G10+N.T10+N.A11+N.C11+N.G11+N.T11+N.A12+N.C12+N.G12+N.T12+N.A13+N.C13+N.G13+N.T13+N.A14+N.C14+N.G14+N.T14+N.A15+N.C15+N.G15+N.T15+N.A16+N.C16+N.G16+N.T16+N.A17+N.C17+N.G17+N.T17+N.A18+N.C18+N.G18+N.T18+N.A19+N.C19+N.G19+N.T19+N.A20+N.C20+N.G20+N.T20+Strand.F1+Strand.R1+Strand.F2+Strand.R2+Strand.F3+Strand.R3+Strand.F4+Strand.R4+Strand.F5+Strand.R5+Strand.F6+Strand.R6+Strand.F7+Strand.R7
##
##
## Includes the following feature sub-classes:
## An object of class 'N'
## Fits 20 nucleotides for a feature model of length 20.
## Nucleotide beta values:
## 1 2 3 4 5 6
## N.A 0.02161878 0.04117861 0.04967106 0.009710873 0.0000000 -0.8703706
## N.C -0.03078533 -0.03188463 -0.09706984 -0.153367766 -0.7902677 -1.6003030
## N.G 0.00000000 0.00000000 0.00000000 0.000000000 -0.2769090 -1.9035339
## N.T -0.04744182 -0.05350018 -0.07060485 -0.071122836 -0.4209594 0.0000000
## 7 8 9 10 11 12
## N.A -0.6417498 0.000000 -1.276432 -1.422912 -1.0157506 0.000000
## N.C -2.5768151 -2.121421 -1.789558 -2.073903 -1.3633770 -2.334183
## N.G 0.0000000 -2.099419 -1.275491 -1.952249 -0.9780042 -2.097381
## N.T -1.1222202 -2.155700 0.000000 0.000000 0.0000000 -2.459204
## 13 14 15 16 17 18
## N.A -1.8946760 -0.6256280 0.0000000 -0.4558732 -0.17954842 -0.08371902
## N.C -0.5631074 -0.7808113 -0.8974931 0.0000000 0.00000000 0.00000000
## N.G -1.6678462 0.0000000 -0.1188133 -0.2177190 -0.24585968 -0.08829375
## N.T 0.0000000 -0.1491395 -0.5138794 -0.2599719 -0.07778302 0.07168998
## 19 20
## N.A -0.06183268 -0.03187245
## N.C 0.00000000 0.00000000
## N.G -0.10639137 -0.07169273
## N.T 0.10133631 0.06853280
##
## Nucleotide beta errors:
## 1 2 3 4 5
## N.A 0.001227530 0.001023696 0.0008736138 0.0007863803 0.0000000000
## N.C 0.001367242 0.001155174 0.0010592224 0.0009717629 0.0016132808
## N.G 0.000000000 0.000000000 0.0000000000 0.0000000000 0.0006824041
## N.T 0.001247469 0.001062416 0.0009308394 0.0007986175 0.0007490784
## 6 7 8 9 10
## N.A 0.001461144 0.0008213357 0.00000000 0.003810345 0.004359166
## N.C 0.007912002 0.0883528511 0.02184309 0.012526978 0.025191202
## N.G 0.012720207 0.0000000000 0.01725711 0.003613999 0.021294855
## N.T 0.000000000 0.0018224688 0.01689473 0.000000000 0.000000000
## 11 12 13 14 15
## N.A 0.002090083 0.00000000 0.013772451 0.0011131499 0.0000000000
## N.C 0.009461380 0.04518965 0.001116881 0.0017852463 0.0021448475
## N.G 0.002164582 0.01874736 0.010022322 0.0000000000 0.0005639128
## N.T 0.000000000 0.04286688 0.000000000 0.0005437994 0.0008735694
## 16 17 18 19 20
## N.A 0.0009960150 0.0008796163 0.0010676224 0.001230315 0.001523171
## N.C 0.0000000000 0.0000000000 0.0000000000 0.000000000 0.000000000
## N.G 0.0007480348 0.0009933679 0.0011187330 0.001341108 0.001622686
## N.T 0.0007152178 0.0007804473 0.0009333566 0.001082687 0.001385529
##
##
## An object of class 'Intercept'
## Fits 14 views and 2 round(s) (round = 2, 3).
## Intercept beta values:
## Round.2:
## View.1 View.2 View.3 View.4 View.5 View.6 View.7
## Strand.F 25.17759 25.38401 25.33073 25.27565 25.31045 25.30643 25.24918
## Strand.R 25.24821 25.36892 25.33289 25.25954 25.29221 25.33597 25.26338
##
## Round.3:
## View.1 View.2 View.3 View.4 View.5 View.6 View.7
## Strand.F 26.38233 26.38233 26.38233 26.38233 26.38233 26.38233 26.38233
## Strand.R 26.38233 26.38233 26.38233 26.38233 26.38233 26.38233 26.38233
##
## Intercept beta errors:
## Round.2:
## View.1 View.2 View.3 View.4 View.5
## Strand.F 0.008330637 0.007964048 0.008284937 0.008350367 0.008324960
## Strand.R 0.008438435 0.008085128 0.008353947 0.008436578 0.008410366
## View.6 View.7
## Strand.F 0.008290664 0.008298577
## Strand.R 0.008352459 0.008346764
##
## Round.3:
## View.1 View.2 View.3 View.4 View.5
## Strand.F 0.007450883 0.007450883 0.007450883 0.007450883 0.007450883
## Strand.R 0.007450883 0.007450883 0.007450883 0.007450883 0.007450883
## View.6 View.7
## Strand.F 0.007450883 0.007450883
## Strand.R 0.007450883 0.007450883
##
##
##
## An object of class 'Shape'
## Fits 0 shape coefficients for 0 kinds of shape parameter(s) (shape = ) for a feature model of length 20.
## No shape parameters included in fit.
## [1] "Number of Observations in Design Matrix: 833864"
## [1] "i = 5"
## No shape parameters included in fit.
## [1] "Round summary: "
## 2 3 Total
## Round 374925 458939 833864
## [1] "Mono-nucleotide summary: "
## N.A N.C N.G N.T
## 1 71711 194695 321746 245712
## 2 106592 169257 327349 230666
## 3 148149 91369 391131 203215
## 4 160914 110251 394951 167748
## 5 362774 61108 270633 139349
## 6 96093 20312 15851 701608
## 7 169705 1867 593488 68804
## 8 796146 11021 13447 13250
## 9 34208 13151 36633 749872
## 10 33108 7793 10245 782718
## 11 50937 12657 54695 715575
## 12 810600 6365 11398 5501
## 13 9492 105791 12483 706098
## 14 102573 46749 427301 257241
## 15 355316 49729 290889 137930
## 16 101286 383450 169429 179699
## 17 130296 428470 103952 171146
## 18 246197 338303 95662 153702
## 19 199499 306790 206223 121352
## 20 221383 377311 162513 72657
## [1] "View/strand orientation summary: "
## View.1 View.2 View.3 View.4 View.5 View.6 View.7 StrandTotal
## Strand.F 51866 86013 78415 72810 72600 73413 85515 520632
## Strand.R 37549 53340 49610 38514 39583 42181 52455 313232
## [1] "Regression Formula: "
## [1] "ObservedCount ~ offset(logProb)+Round.2+N.A1+N.C1+N.T1+N.A2+N.C2+N.T2+N.A3+N.C3+N.T3+N.A4+N.C4+N.T4+N.C5+N.G5+N.T5+N.A6+N.C6+N.G6+N.A7+N.C7+N.T7+N.C8+N.G8+N.T8+N.A9+N.C9+N.G9+N.A10+N.C10+N.G10+N.A11+N.C11+N.G11+N.C12+N.G12+N.T12+N.A13+N.C13+N.G13+N.A14+N.C14+N.T14+N.C15+N.G15+N.T15+N.A16+N.G16+N.T16+N.A17+N.G17+N.T17+N.A18+N.G18+N.T18+N.A19+N.G19+N.T19+N.A20+N.G20+N.T20+Strand.F1+Strand.R1+Strand.R2+Strand.F3+Strand.R3+Strand.F4+Strand.R4+Strand.F5+Strand.R5+Strand.F6+Strand.R6+Strand.F7+Strand.R7"
## No shape parameters included in fit.
## An object of class 'model'
##
## Slot "name": HM-Exd-Ubx4a R2+R3 Nucleotide+View Model
## Slot "varRegLen": 16
## Slot "leftFixedSeq": GTTCAGAGTTCTACAGTCCGACGATCTGG
## Slot "rightFixedSeq": CCAGCTGTCGTATGCCGTCTTCTGCTTG
## Slot "leftFixedSeqOverlap": 5
## Slot "rightFixedSeqOverlap": 5
## Slot "confidenceLevel": 0.95
## Slot "minAffinity": 0
## Slot "missingValueSuppression": 1
## Slot "minSeedValue": 0.001
## Slot "seedLen": 12
## Slot "consensusSeq": [ACGT]TGA[CT][ACGT][ACGT]A[CT][ACGT][ACGT][ACGT]
## Slot "upFootprintExtend": 4
## Slot "downFootprintExtend": 4
## Slot "fpLen": 20
##
## Fits a model of footprint length 20 for mono-nucleotide features with 7 view(s) per strand of DNA and 2 round(s) of data (round = 2, 3) without reverse complement symmetry.
##
## Slot "regressionFormula": ObservedCount ~ offset(logProb)+Round.2+Round.3+N.A1+N.C1+N.G1+N.T1+N.A2+N.C2+N.G2+N.T2+N.A3+N.C3+N.G3+N.T3+N.A4+N.C4+N.G4+N.T4+N.A5+N.C5+N.G5+N.T5+N.A6+N.C6+N.G6+N.T6+N.A7+N.C7+N.G7+N.T7+N.A8+N.C8+N.G8+N.T8+N.A9+N.C9+N.G9+N.T9+N.A10+N.C10+N.G10+N.T10+N.A11+N.C11+N.G11+N.T11+N.A12+N.C12+N.G12+N.T12+N.A13+N.C13+N.G13+N.T13+N.A14+N.C14+N.G14+N.T14+N.A15+N.C15+N.G15+N.T15+N.A16+N.C16+N.G16+N.T16+N.A17+N.C17+N.G17+N.T17+N.A18+N.C18+N.G18+N.T18+N.A19+N.C19+N.G19+N.T19+N.A20+N.C20+N.G20+N.T20+Strand.F1+Strand.R1+Strand.F2+Strand.R2+Strand.F3+Strand.R3+Strand.F4+Strand.R4+Strand.F5+Strand.R5+Strand.F6+Strand.R6+Strand.F7+Strand.R7
##
##
## Includes the following feature sub-classes:
## An object of class 'N'
## Fits 20 nucleotides for a feature model of length 20.
## Nucleotide beta values:
## 1 2 3 4 5 6
## N.A 0.02161999 0.04117954 0.04967045 0.009710779 0.0000000 -0.8703704
## N.C -0.03078413 -0.03188370 -0.09706996 -0.153367846 -0.7902675 -1.6003027
## N.G 0.00000000 0.00000000 0.00000000 0.000000000 -0.2769088 -1.9035337
## N.T -0.04744057 -0.05349907 -0.07060494 -0.071123369 -0.4209592 0.0000000
## 7 8 9 10 11 12
## N.A -0.6417498 0.000000 -1.276431 -1.422912 -1.0157504 0.000000
## N.C -2.5870079 -2.121420 -1.789557 -2.073903 -1.3633767 -2.334182
## N.G 0.0000000 -2.099419 -1.275491 -1.952248 -0.9780041 -2.097380
## N.T -1.1222200 -2.155699 0.000000 0.000000 0.0000000 -2.459204
## 13 14 15 16 17 18
## N.A -1.8946757 -0.6256278 0.0000000 -0.4558727 -0.17954837 -0.08371896
## N.C -0.5631072 -0.7808110 -0.8974931 0.0000000 0.00000000 0.00000000
## N.G -1.6678459 0.0000000 -0.1188135 -0.2177187 -0.24585970 -0.08829378
## N.T 0.0000000 -0.1491393 -0.5138793 -0.2599715 -0.07778303 0.07169001
## 19 20
## N.A -0.06183269 -0.03187242
## N.C 0.00000000 0.00000000
## N.G -0.10639136 -0.07169273
## N.T 0.10133642 0.06853291
##
## Nucleotide beta errors:
## 1 2 3 4 5
## N.A 0.001227531 0.001023697 0.0008736141 0.0007863802 0.0000000000
## N.C 0.001367243 0.001155175 0.0010592223 0.0009717629 0.0016132807
## N.G 0.000000000 0.000000000 0.0000000000 0.0000000000 0.0006824041
## N.T 0.001247470 0.001062416 0.0009308394 0.0007986178 0.0007490784
## 6 7 8 9 10
## N.A 0.001461144 0.0008213357 0.00000000 0.003810345 0.004359165
## N.C 0.007912002 0.0899421774 0.02184309 0.012526976 0.025191201
## N.G 0.012720206 0.0000000000 0.01725711 0.003613999 0.021294854
## N.T 0.000000000 0.0018224687 0.01689473 0.000000000 0.000000000
## 11 12 13 14 15
## N.A 0.002090083 0.00000000 0.013772451 0.0011131499 0.0000000000
## N.C 0.009461380 0.04518965 0.001116881 0.0017852463 0.0021448474
## N.G 0.002164582 0.01874735 0.010022322 0.0000000000 0.0005639130
## N.T 0.000000000 0.04286688 0.000000000 0.0005437995 0.0008735694
## 16 17 18 19 20
## N.A 0.0009960150 0.0008796162 0.0010676224 0.001230315 0.001523171
## N.C 0.0000000000 0.0000000000 0.0000000000 0.000000000 0.000000000
## N.G 0.0007480349 0.0009933678 0.0011187330 0.001341108 0.001622686
## N.T 0.0007152179 0.0007804473 0.0009333566 0.001082687 0.001385529
##
##
## An object of class 'Intercept'
## Fits 14 views and 2 round(s) (round = 2, 3).
## Intercept beta values:
## Round.2:
## View.1 View.2 View.3 View.4 View.5 View.6 View.7
## Strand.F 25.17758 25.38401 25.33073 25.27565 25.31045 25.30642 25.24917
## Strand.R 25.24820 25.36891 25.33289 25.25954 25.29221 25.33597 25.26337
##
## Round.3:
## View.1 View.2 View.3 View.4 View.5 View.6 View.7
## Strand.F 26.38232 26.38232 26.38232 26.38232 26.38232 26.38232 26.38232
## Strand.R 26.38232 26.38232 26.38232 26.38232 26.38232 26.38232 26.38232
##
## Intercept beta errors:
## Round.2:
## View.1 View.2 View.3 View.4 View.5
## Strand.F 0.008330640 0.007964051 0.00828494 0.008350370 0.008324964
## Strand.R 0.008438438 0.008085131 0.00835395 0.008436581 0.008410370
## View.6 View.7
## Strand.F 0.008290667 0.008298580
## Strand.R 0.008352462 0.008346768
##
## Round.3:
## View.1 View.2 View.3 View.4 View.5
## Strand.F 0.007450886 0.007450886 0.007450886 0.007450886 0.007450886
## Strand.R 0.007450886 0.007450886 0.007450886 0.007450886 0.007450886
## View.6 View.7
## Strand.F 0.007450886 0.007450886
## Strand.R 0.007450886 0.007450886
##
##
##
## An object of class 'Shape'
## Fits 0 shape coefficients for 0 kinds of shape parameter(s) (shape = ) for a feature model of length 20.
## No shape parameters included in fit.
## [1] "Number of Observations in Design Matrix: 833852"
## [1] "i = 6"
## No shape parameters included in fit.
## [1] "Round summary: "
## 2 3 Total
## Round 374921 458931 833852
## [1] "Mono-nucleotide summary: "
## N.A N.C N.G N.T
## 1 71709 194693 321741 245709
## 2 106589 169255 327345 230663
## 3 148146 91368 391127 203211
## 4 160911 110250 394947 167744
## 5 362770 61108 270627 139347
## 6 96092 20312 15851 701597
## 7 169705 1855 593488 68804
## 8 796135 11021 13447 13249
## 9 34208 13151 36632 749861
## 10 33108 7793 10245 782706
## 11 50935 12656 54694 715567
## 12 810589 6364 11398 5501
## 13 9491 105788 12483 706090
## 14 102572 46749 427295 257236
## 15 355311 49729 290884 137928
## 16 101284 383443 169427 179698
## 17 130293 428463 103951 171145
## 18 246191 338300 95662 153699
## 19 199498 306785 206217 121352
## 20 221378 377306 162511 72657
## [1] "View/strand orientation summary: "
## View.1 View.2 View.3 View.4 View.5 View.6 View.7 StrandTotal
## Strand.F 51865 86012 78415 72810 72598 73412 85513 520625
## Strand.R 37549 53340 49610 38512 39583 42181 52452 313227
## [1] "Regression Formula: "
## [1] "ObservedCount ~ offset(logProb)+Round.2+N.A1+N.C1+N.T1+N.A2+N.C2+N.T2+N.A3+N.C3+N.T3+N.A4+N.C4+N.T4+N.C5+N.G5+N.T5+N.A6+N.C6+N.G6+N.A7+N.C7+N.T7+N.C8+N.G8+N.T8+N.A9+N.C9+N.G9+N.A10+N.C10+N.G10+N.A11+N.C11+N.G11+N.C12+N.G12+N.T12+N.A13+N.C13+N.G13+N.A14+N.C14+N.T14+N.C15+N.G15+N.T15+N.A16+N.G16+N.T16+N.A17+N.G17+N.T17+N.A18+N.G18+N.T18+N.A19+N.G19+N.T19+N.A20+N.G20+N.T20+Strand.F1+Strand.R1+Strand.R2+Strand.F3+Strand.R3+Strand.F4+Strand.R4+Strand.F5+Strand.R5+Strand.F6+Strand.R6+Strand.F7+Strand.R7"
## No shape parameters included in fit.
## An object of class 'model'
##
## Slot "name": HM-Exd-Ubx4a R2+R3 Nucleotide+View Model
## Slot "varRegLen": 16
## Slot "leftFixedSeq": GTTCAGAGTTCTACAGTCCGACGATCTGG
## Slot "rightFixedSeq": CCAGCTGTCGTATGCCGTCTTCTGCTTG
## Slot "leftFixedSeqOverlap": 5
## Slot "rightFixedSeqOverlap": 5
## Slot "confidenceLevel": 0.95
## Slot "minAffinity": 0
## Slot "missingValueSuppression": 1
## Slot "minSeedValue": 0.001
## Slot "seedLen": 12
## Slot "consensusSeq": [ACGT]TGA[CT][ACGT][ACGT]A[CT][ACGT][ACGT][ACGT]
## Slot "upFootprintExtend": 4
## Slot "downFootprintExtend": 4
## Slot "fpLen": 20
##
## Fits a model of footprint length 20 for mono-nucleotide features with 7 view(s) per strand of DNA and 2 round(s) of data (round = 2, 3) without reverse complement symmetry.
##
## Slot "regressionFormula": ObservedCount ~ offset(logProb)+Round.2+Round.3+N.A1+N.C1+N.G1+N.T1+N.A2+N.C2+N.G2+N.T2+N.A3+N.C3+N.G3+N.T3+N.A4+N.C4+N.G4+N.T4+N.A5+N.C5+N.G5+N.T5+N.A6+N.C6+N.G6+N.T6+N.A7+N.C7+N.G7+N.T7+N.A8+N.C8+N.G8+N.T8+N.A9+N.C9+N.G9+N.T9+N.A10+N.C10+N.G10+N.T10+N.A11+N.C11+N.G11+N.T11+N.A12+N.C12+N.G12+N.T12+N.A13+N.C13+N.G13+N.T13+N.A14+N.C14+N.G14+N.T14+N.A15+N.C15+N.G15+N.T15+N.A16+N.C16+N.G16+N.T16+N.A17+N.C17+N.G17+N.T17+N.A18+N.C18+N.G18+N.T18+N.A19+N.C19+N.G19+N.T19+N.A20+N.C20+N.G20+N.T20+Strand.F1+Strand.R1+Strand.F2+Strand.R2+Strand.F3+Strand.R3+Strand.F4+Strand.R4+Strand.F5+Strand.R5+Strand.F6+Strand.R6+Strand.F7+Strand.R7
##
##
## Includes the following feature sub-classes:
## An object of class 'N'
## Fits 20 nucleotides for a feature model of length 20.
## Nucleotide beta values:
## 1 2 3 4 5 6
## N.A 0.02161825 0.04117977 0.04966963 0.009709965 0.0000000 -0.8703704
## N.C -0.03078405 -0.03188357 -0.09706995 -0.153367863 -0.7902674 -1.6003029
## N.G 0.00000000 0.00000000 0.00000000 0.000000000 -0.2769086 -1.9035342
## N.T -0.04744063 -0.05350064 -0.07060499 -0.071123372 -0.4209590 0.0000000
## 7 8 9 10 11 12
## N.A -0.6417498 0.000000 -1.276431 -1.422912 -1.0157504 0.000000
## N.C -2.6097849 -2.121420 -1.789557 -2.073903 -1.3633767 -2.334183
## N.G 0.0000000 -2.099419 -1.275491 -1.952249 -0.9780041 -2.097380
## N.T -1.1222204 -2.155699 0.000000 0.000000 0.0000000 -2.459204
## 13 14 15 16 17 18
## N.A -1.8946757 -0.6256280 0.0000000 -0.4558727 -0.17954842 -0.08371897
## N.C -0.5631071 -0.7808113 -0.8974934 0.0000000 0.00000000 0.00000000
## N.G -1.6678460 0.0000000 -0.1188141 -0.2177187 -0.24585972 -0.08829387
## N.T 0.0000000 -0.1491400 -0.5138796 -0.2599716 -0.07778299 0.07169009
## 19 20
## N.A -0.06183273 -0.03187236
## N.C 0.00000000 0.00000000
## N.G -0.10639137 -0.07169273
## N.T 0.10133660 0.06853307
##
## Nucleotide beta errors:
## 1 2 3 4 5
## N.A 0.001227533 0.001023697 0.0008736147 0.0007863807 0.0000000000
## N.C 0.001367243 0.001155175 0.0010592224 0.0009717629 0.0016132808
## N.G 0.000000000 0.000000000 0.0000000000 0.0000000000 0.0006824042
## N.T 0.001247471 0.001062418 0.0009308394 0.0007986178 0.0007490785
## 6 7 8 9 10
## N.A 0.001461145 0.0008213358 0.00000000 0.003810345 0.004359166
## N.C 0.007912002 0.0925527845 0.02184309 0.012526977 0.025191202
## N.G 0.012720207 0.0000000000 0.01725711 0.003613999 0.021294855
## N.T 0.000000000 0.0018224689 0.01689473 0.000000000 0.000000000
## 11 12 13 14 15
## N.A 0.002090083 0.00000000 0.013772452 0.0011131500 0.0000000000
## N.C 0.009461380 0.04518965 0.001116881 0.0017852465 0.0021448476
## N.G 0.002164582 0.01874735 0.010022323 0.0000000000 0.0005639132
## N.T 0.000000000 0.04286688 0.000000000 0.0005437997 0.0008735694
## 16 17 18 19 20
## N.A 0.0009960150 0.0008796162 0.0010676224 0.001230315 0.001523171
## N.C 0.0000000000 0.0000000000 0.0000000000 0.000000000 0.000000000
## N.G 0.0007480349 0.0009933678 0.0011187330 0.001341108 0.001622686
## N.T 0.0007152179 0.0007804473 0.0009333565 0.001082687 0.001385529
##
##
## An object of class 'Intercept'
## Fits 14 views and 2 round(s) (round = 2, 3).
## Intercept beta values:
## Round.2:
## View.1 View.2 View.3 View.4 View.5 View.6 View.7
## Strand.F 25.17758 25.38401 25.33073 25.27565 25.31045 25.30643 25.24918
## Strand.R 25.24820 25.36892 25.33289 25.25955 25.29221 25.33597 25.26338
##
## Round.3:
## View.1 View.2 View.3 View.4 View.5 View.6 View.7
## Strand.F 26.38233 26.38233 26.38233 26.38233 26.38233 26.38233 26.38233
## Strand.R 26.38233 26.38233 26.38233 26.38233 26.38233 26.38233 26.38233
##
## Intercept beta errors:
## Round.2:
## View.1 View.2 View.3 View.4 View.5
## Strand.F 0.008330642 0.007964053 0.008284942 0.008350372 0.008324965
## Strand.R 0.008438440 0.008085132 0.008353952 0.008436583 0.008410371
## View.6 View.7
## Strand.F 0.008290669 0.008298582
## Strand.R 0.008352464 0.008346770
##
## Round.3:
## View.1 View.2 View.3 View.4 View.5
## Strand.F 0.007450887 0.007450887 0.007450887 0.007450887 0.007450887
## Strand.R 0.007450887 0.007450887 0.007450887 0.007450887 0.007450887
## View.6 View.7
## Strand.F 0.007450887 0.007450887
## Strand.R 0.007450887 0.007450887
##
##
##
## An object of class 'Shape'
## Fits 0 shape coefficients for 0 kinds of shape parameter(s) (shape = ) for a feature model of length 20.
## No shape parameters included in fit.
## [1] "Number of Observations in Design Matrix: 833824"
## [1] "i = 7"
## No shape parameters included in fit.
## [1] "Round summary: "
## 2 3 Total
## Round 374910 458914 833824
## [1] "Mono-nucleotide summary: "
## N.A N.C N.G N.T
## 1 71706 194686 321727 245705
## 2 106586 169248 327335 230655
## 3 148138 91364 391117 203205
## 4 160909 110246 394930 167739
## 5 362755 61106 270617 139346
## 6 96083 20310 15849 701582
## 7 169705 1827 593488 68804
## 8 796110 11021 13447 13246
## 9 34208 13149 36630 749837
## 10 33108 7793 10245 782678
## 11 50933 12656 54686 715549
## 12 810565 6364 11395 5500
## 13 9490 105781 12481 706072
## 14 102570 46746 427279 257229
## 15 355307 49726 290868 137923
## 16 101278 383435 169419 179692
## 17 130286 428451 103949 171138
## 18 246183 338288 95658 153695
## 19 199489 306772 206214 121349
## 20 221370 377295 162505 72654
## [1] "View/strand orientation summary: "
## View.1 View.2 View.3 View.4 View.5 View.6 View.7 StrandTotal
## Strand.F 51863 86007 78415 72805 72596 73408 85512 520606
## Strand.R 37547 53339 49609 38511 39581 42180 52451 313218
## [1] "Regression Formula: "
## [1] "ObservedCount ~ offset(logProb)+Round.2+N.A1+N.C1+N.T1+N.A2+N.C2+N.T2+N.A3+N.C3+N.T3+N.A4+N.C4+N.T4+N.C5+N.G5+N.T5+N.A6+N.C6+N.G6+N.A7+N.C7+N.T7+N.C8+N.G8+N.T8+N.A9+N.C9+N.G9+N.A10+N.C10+N.G10+N.A11+N.C11+N.G11+N.C12+N.G12+N.T12+N.A13+N.C13+N.G13+N.A14+N.C14+N.T14+N.C15+N.G15+N.T15+N.A16+N.G16+N.T16+N.A17+N.G17+N.T17+N.A18+N.G18+N.T18+N.A19+N.G19+N.T19+N.A20+N.G20+N.T20+Strand.F1+Strand.R1+Strand.R2+Strand.F3+Strand.R3+Strand.F4+Strand.R4+Strand.F5+Strand.R5+Strand.F6+Strand.R6+Strand.F7+Strand.R7"
## No shape parameters included in fit.
## An object of class 'model'
##
## Slot "name": HM-Exd-Ubx4a R2+R3 Nucleotide+View Model
## Slot "varRegLen": 16
## Slot "leftFixedSeq": GTTCAGAGTTCTACAGTCCGACGATCTGG
## Slot "rightFixedSeq": CCAGCTGTCGTATGCCGTCTTCTGCTTG
## Slot "leftFixedSeqOverlap": 5
## Slot "rightFixedSeqOverlap": 5
## Slot "confidenceLevel": 0.95
## Slot "minAffinity": 0
## Slot "missingValueSuppression": 1
## Slot "minSeedValue": 0.001
## Slot "seedLen": 12
## Slot "consensusSeq": [ACGT]TGA[CT][ACGT][ACGT]A[CT][ACGT][ACGT][ACGT]
## Slot "upFootprintExtend": 4
## Slot "downFootprintExtend": 4
## Slot "fpLen": 20
##
## Fits a model of footprint length 20 for mono-nucleotide features with 7 view(s) per strand of DNA and 2 round(s) of data (round = 2, 3) without reverse complement symmetry.
##
## Slot "regressionFormula": ObservedCount ~ offset(logProb)+Round.2+Round.3+N.A1+N.C1+N.G1+N.T1+N.A2+N.C2+N.G2+N.T2+N.A3+N.C3+N.G3+N.T3+N.A4+N.C4+N.G4+N.T4+N.A5+N.C5+N.G5+N.T5+N.A6+N.C6+N.G6+N.T6+N.A7+N.C7+N.G7+N.T7+N.A8+N.C8+N.G8+N.T8+N.A9+N.C9+N.G9+N.T9+N.A10+N.C10+N.G10+N.T10+N.A11+N.C11+N.G11+N.T11+N.A12+N.C12+N.G12+N.T12+N.A13+N.C13+N.G13+N.T13+N.A14+N.C14+N.G14+N.T14+N.A15+N.C15+N.G15+N.T15+N.A16+N.C16+N.G16+N.T16+N.A17+N.C17+N.G17+N.T17+N.A18+N.C18+N.G18+N.T18+N.A19+N.C19+N.G19+N.T19+N.A20+N.C20+N.G20+N.T20+Strand.F1+Strand.R1+Strand.F2+Strand.R2+Strand.F3+Strand.R3+Strand.F4+Strand.R4+Strand.F5+Strand.R5+Strand.F6+Strand.R6+Strand.F7+Strand.R7
##
##
## Includes the following feature sub-classes:
## An object of class 'N'
## Fits 20 nucleotides for a feature model of length 20.
## Nucleotide beta values:
## 1 2 3 4 5 6
## N.A 0.02161840 0.04117965 0.04966979 0.009709798 0.0000000 -0.8703708
## N.C -0.03078414 -0.03188381 -0.09707008 -0.153368116 -0.7902676 -1.6004906
## N.G 0.00000000 0.00000000 0.00000000 0.000000000 -0.2769084 -1.9035352
## N.T -0.04744066 -0.05350078 -0.07060502 -0.071123473 -0.4209590 0.0000000
## 7 8 9 10 11 12
## N.A -0.6417501 0.00000 -1.276431 -1.422913 -1.0157509 0.000000
## N.C -2.6318832 -2.12142 -1.789557 -2.073904 -1.3633770 -2.334183
## N.G 0.0000000 -2.09942 -1.275492 -1.952249 -0.9780044 -2.097380
## N.T -1.1222210 -2.15570 0.000000 0.000000 0.0000000 -2.459205
## 13 14 15 16 17 18
## N.A -1.8946764 -0.6256285 0.0000000 -0.4558724 -0.17954756 -0.08371728
## N.C -0.5631074 -0.7808119 -0.8974942 0.0000000 0.00000000 0.00000000
## N.G -1.6678466 0.0000000 -0.1188147 -0.2177183 -0.24585878 -0.08829211
## N.T 0.0000000 -0.1491407 -0.5138800 -0.2599711 -0.07778197 0.07169193
## 19 20
## N.A -0.06183278 -0.03186858
## N.C 0.00000000 0.00000000
## N.G -0.10639140 -0.07168890
## N.T 0.10133573 0.06853711
##
## Nucleotide beta errors:
## 1 2 3 4 5
## N.A 0.001227533 0.001023697 0.0008736147 0.0007863807 0.0000000000
## N.C 0.001367243 0.001155175 0.0010592224 0.0009717630 0.0016132810
## N.G 0.000000000 0.000000000 0.0000000000 0.0000000000 0.0006824043
## N.T 0.001247471 0.001062418 0.0009308394 0.0007986178 0.0007490786
## 6 7 8 9 10
## N.A 0.001461145 0.0008213359 0.00000000 0.003810345 0.004359167
## N.C 0.007913761 0.0953633815 0.02184309 0.012526979 0.025191206
## N.G 0.012720209 0.0000000000 0.01725711 0.003614000 0.021294857
## N.T 0.000000000 0.0018224692 0.01689473 0.000000000 0.000000000
## 11 12 13 14 15
## N.A 0.002090083 0.00000000 0.013772454 0.0011131501 0.0000000000
## N.C 0.009461381 0.04518965 0.001116882 0.0017852467 0.0021448479
## N.G 0.002164582 0.01874735 0.010022325 0.0000000000 0.0005639135
## N.T 0.000000000 0.04286689 0.000000000 0.0005437999 0.0008735695
## 16 17 18 19 20
## N.A 0.0009960152 0.0008796167 0.0010676236 0.001230315 0.001523176
## N.C 0.0000000000 0.0000000000 0.0000000000 0.000000000 0.000000000
## N.G 0.0007480351 0.0009933682 0.0011187341 0.001341108 0.001622689
## N.T 0.0007152181 0.0007804478 0.0009333579 0.001082688 0.001385534
##
##
## An object of class 'Intercept'
## Fits 14 views and 2 round(s) (round = 2, 3).
## Intercept beta values:
## Round.2:
## View.1 View.2 View.3 View.4 View.5 View.6 View.7
## Strand.F 25.17758 25.38401 25.33073 25.27565 25.31045 25.30642 25.24917
## Strand.R 25.24820 25.36891 25.33289 25.25954 25.29220 25.33597 25.26337
##
## Round.3:
## View.1 View.2 View.3 View.4 View.5 View.6 View.7
## Strand.F 26.38231 26.38231 26.38231 26.38231 26.38231 26.38231 26.38231
## Strand.R 26.38231 26.38231 26.38231 26.38231 26.38231 26.38231 26.38231
##
## Intercept beta errors:
## Round.2:
## View.1 View.2 View.3 View.4 View.5
## Strand.F 0.008330653 0.007964064 0.008284954 0.008350384 0.008324976
## Strand.R 0.008438451 0.008085144 0.008353964 0.008436594 0.008410382
## View.6 View.7
## Strand.F 0.008290680 0.008298593
## Strand.R 0.008352475 0.008346781
##
## Round.3:
## View.1 View.2 View.3 View.4 View.5
## Strand.F 0.007450898 0.007450898 0.007450898 0.007450898 0.007450898
## Strand.R 0.007450898 0.007450898 0.007450898 0.007450898 0.007450898
## View.6 View.7
## Strand.F 0.007450898 0.007450898
## Strand.R 0.007450898 0.007450898
##
##
##
## An object of class 'Shape'
## Fits 0 shape coefficients for 0 kinds of shape parameter(s) (shape = ) for a feature model of length 20.
## No shape parameters included in fit.
## [1] "Number of Observations in Design Matrix: 833789"
## [1] "i = 8"
## No shape parameters included in fit.
## [1] "Round summary: "
## 2 3 Total
## Round 374895 458894 833789
## [1] "Mono-nucleotide summary: "
## N.A N.C N.G N.T
## 1 71700 194679 321717 245693
## 2 106582 169242 327321 230644
## 3 148132 91359 391100 203198
## 4 160901 110242 394914 167732
## 5 362740 61105 270608 139336
## 6 96076 20309 15847 701557
## 7 169704 1793 593488 68804
## 8 796079 11019 13447 13244
## 9 34207 13147 36625 749810
## 10 33108 7792 10243 782646
## 11 50931 12655 54680 715523
## 12 810531 6364 11394 5500
## 13 9490 105773 12481 706045
## 14 102565 46745 427261 257218
## 15 355292 49725 290854 137918
## 16 101273 383420 169410 179686
## 17 130282 428434 103941 171132
## 18 246172 338274 95656 153687
## 19 199482 306760 206207 121340
## 20 221362 377278 162499 72650
## [1] "View/strand orientation summary: "
## View.1 View.2 View.3 View.4 View.5 View.6 View.7 StrandTotal
## Strand.F 51861 86003 78412 72802 72593 73405 85509 520585
## Strand.R 37546 53337 49604 38509 39580 42179 52449 313204
## [1] "Regression Formula: "
## [1] "ObservedCount ~ offset(logProb)+Round.2+N.A1+N.C1+N.T1+N.A2+N.C2+N.T2+N.A3+N.C3+N.T3+N.A4+N.C4+N.T4+N.C5+N.G5+N.T5+N.A6+N.C6+N.G6+N.A7+N.C7+N.T7+N.C8+N.G8+N.T8+N.A9+N.C9+N.G9+N.A10+N.C10+N.G10+N.A11+N.C11+N.G11+N.C12+N.G12+N.T12+N.A13+N.C13+N.G13+N.A14+N.C14+N.T14+N.C15+N.G15+N.T15+N.A16+N.G16+N.T16+N.A17+N.G17+N.T17+N.A18+N.G18+N.T18+N.A19+N.G19+N.T19+N.A20+N.G20+N.T20+Strand.F1+Strand.R1+Strand.R2+Strand.F3+Strand.R3+Strand.F4+Strand.R4+Strand.F5+Strand.R5+Strand.F6+Strand.R6+Strand.F7+Strand.R7"
## No shape parameters included in fit.
## An object of class 'model'
##
## Slot "name": HM-Exd-Ubx4a R2+R3 Nucleotide+View Model
## Slot "varRegLen": 16
## Slot "leftFixedSeq": GTTCAGAGTTCTACAGTCCGACGATCTGG
## Slot "rightFixedSeq": CCAGCTGTCGTATGCCGTCTTCTGCTTG
## Slot "leftFixedSeqOverlap": 5
## Slot "rightFixedSeqOverlap": 5
## Slot "confidenceLevel": 0.95
## Slot "minAffinity": 0
## Slot "missingValueSuppression": 1
## Slot "minSeedValue": 0.001
## Slot "seedLen": 12
## Slot "consensusSeq": [ACGT]TGA[CT][ACGT][ACGT]A[CT][ACGT][ACGT][ACGT]
## Slot "upFootprintExtend": 4
## Slot "downFootprintExtend": 4
## Slot "fpLen": 20
##
## Fits a model of footprint length 20 for mono-nucleotide features with 7 view(s) per strand of DNA and 2 round(s) of data (round = 2, 3) without reverse complement symmetry.
##
## Slot "regressionFormula": ObservedCount ~ offset(logProb)+Round.2+Round.3+N.A1+N.C1+N.G1+N.T1+N.A2+N.C2+N.G2+N.T2+N.A3+N.C3+N.G3+N.T3+N.A4+N.C4+N.G4+N.T4+N.A5+N.C5+N.G5+N.T5+N.A6+N.C6+N.G6+N.T6+N.A7+N.C7+N.G7+N.T7+N.A8+N.C8+N.G8+N.T8+N.A9+N.C9+N.G9+N.T9+N.A10+N.C10+N.G10+N.T10+N.A11+N.C11+N.G11+N.T11+N.A12+N.C12+N.G12+N.T12+N.A13+N.C13+N.G13+N.T13+N.A14+N.C14+N.G14+N.T14+N.A15+N.C15+N.G15+N.T15+N.A16+N.C16+N.G16+N.T16+N.A17+N.C17+N.G17+N.T17+N.A18+N.C18+N.G18+N.T18+N.A19+N.C19+N.G19+N.T19+N.A20+N.C20+N.G20+N.T20+Strand.F1+Strand.R1+Strand.F2+Strand.R2+Strand.F3+Strand.R3+Strand.F4+Strand.R4+Strand.F5+Strand.R5+Strand.F6+Strand.R6+Strand.F7+Strand.R7
##
##
## Includes the following feature sub-classes:
## An object of class 'N'
## Fits 20 nucleotides for a feature model of length 20.
## Nucleotide beta values:
## 1 2 3 4 5 6
## N.A 0.02161860 0.04117961 0.04967003 0.009709794 0.0000000 -0.8703707
## N.C -0.03078417 -0.03188383 -0.09707003 -0.153368139 -0.7902676 -1.6004530
## N.G 0.00000000 0.00000000 0.00000000 0.000000000 -0.2769084 -1.9035350
## N.T -0.04744019 -0.05350029 -0.07060498 -0.071123275 -0.4209590 0.0000000
## 7 8 9 10 11 12
## N.A -0.6417497 0.000000 -1.276431 -1.422913 -1.0157509 0.000000
## N.C -2.6252853 -2.121421 -1.789557 -2.073904 -1.3633771 -2.334183
## N.G 0.0000000 -2.099420 -1.275492 -1.952249 -0.9780044 -2.097381
## N.T -1.1222210 -2.155700 0.000000 0.000000 0.0000000 -2.459205
## 13 14 15 16 17 18
## N.A -1.8946765 -0.6256284 0.0000000 -0.4558724 -0.17954758 -0.08371732
## N.C -0.5631074 -0.7808118 -0.8974941 0.0000000 0.00000000 0.00000000
## N.G -1.6678467 0.0000000 -0.1188147 -0.2177183 -0.24585878 -0.08829214
## N.T 0.0000000 -0.1491405 -0.5138800 -0.2599711 -0.07778201 0.07169187
## 19 20
## N.A -0.06183277 -0.03186843
## N.C 0.00000000 0.00000000
## N.G -0.10639139 -0.07168888
## N.T 0.10133575 0.06853708
##
## Nucleotide beta errors:
## 1 2 3 4 5
## N.A 0.001227533 0.001023697 0.0008736146 0.0007863807 0.0000000000
## N.C 0.001367243 0.001155175 0.0010592224 0.0009717630 0.0016132810
## N.G 0.000000000 0.000000000 0.0000000000 0.0000000000 0.0006824043
## N.T 0.001247470 0.001062418 0.0009308395 0.0007986177 0.0007490786
## 6 7 8 9 10
## N.A 0.001461145 0.0008213358 0.00000000 0.003810345 0.004359167
## N.C 0.007913704 0.0954336610 0.02184309 0.012526979 0.025191206
## N.G 0.012720209 0.0000000000 0.01725711 0.003614000 0.021294858
## N.T 0.000000000 0.0018224692 0.01689473 0.000000000 0.000000000
## 11 12 13 14 15
## N.A 0.002090083 0.00000000 0.013772454 0.0011131501 0.0000000000
## N.C 0.009461382 0.04518965 0.001116882 0.0017852467 0.0021448479
## N.G 0.002164582 0.01874736 0.010022325 0.0000000000 0.0005639135
## N.T 0.000000000 0.04286689 0.000000000 0.0005437999 0.0008735695
## 16 17 18 19 20
## N.A 0.0009960152 0.0008796168 0.001067624 0.001230315 0.001523176
## N.C 0.0000000000 0.0000000000 0.000000000 0.000000000 0.000000000
## N.G 0.0007480352 0.0009933682 0.001118734 0.001341108 0.001622689
## N.T 0.0007152181 0.0007804478 0.000933358 0.001082688 0.001385534
##
##
## An object of class 'Intercept'
## Fits 14 views and 2 round(s) (round = 2, 3).
## Intercept beta values:
## Round.2:
## View.1 View.2 View.3 View.4 View.5 View.6 View.7
## Strand.F 25.17758 25.38401 25.33073 25.27565 25.31044 25.30642 25.24917
## Strand.R 25.24820 25.36891 25.33289 25.25954 25.29220 25.33596 25.26337
##
## Round.3:
## View.1 View.2 View.3 View.4 View.5 View.6 View.7
## Strand.F 26.38231 26.38231 26.38231 26.38231 26.38231 26.38231 26.38231
## Strand.R 26.38231 26.38231 26.38231 26.38231 26.38231 26.38231 26.38231
##
## Intercept beta errors:
## Round.2:
## View.1 View.2 View.3 View.4 View.5
## Strand.F 0.008330653 0.007964064 0.008284954 0.008350384 0.008324977
## Strand.R 0.008438451 0.008085144 0.008353964 0.008436595 0.008410383
## View.6 View.7
## Strand.F 0.008290680 0.008298594
## Strand.R 0.008352475 0.008346781
##
## Round.3:
## View.1 View.2 View.3 View.4 View.5
## Strand.F 0.007450899 0.007450899 0.007450899 0.007450899 0.007450899
## Strand.R 0.007450899 0.007450899 0.007450899 0.007450899 0.007450899
## View.6 View.7
## Strand.F 0.007450899 0.007450899
## Strand.R 0.007450899 0.007450899
##
##
##
## An object of class 'Shape'
## Fits 0 shape coefficients for 0 kinds of shape parameter(s) (shape = ) for a feature model of length 20.
## No shape parameters included in fit.
## [1] "Number of Observations in Design Matrix: 833789"
## [1] "Stability Reached after 8 iterations."
ModelTest <- finalizeFeatureBetas(ModelTest)
pM <- plot(ModelTest, plotTitle = "HM-Ubx4a-Exd R2+R3 Nucleotide+View Fit", Nplot.ddG = TRUE, verticalPlots = TRUE)
ggplot2::ggsave(pM, file = paste(selexDir, saveDir, "/modelPlot.pdf", sep = ""), height = vPheight, width = 6)
save(ModelTest, file = paste(selexDir, saveDir, "/model.RData",sep = ""))
saveRDS(ModelTest, file = paste(selexDir, saveDir, "/model.rds",sep = ""))