Skip to content

Commit faf31ea

Browse files
committed
smaller bugfixes
1 parent b0c2f84 commit faf31ea

7 files changed

Lines changed: 16 additions & 12 deletions

File tree

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
miracle*
12
.Rproj.user
23
.Rhistory
34
.RData

HuNonParam.R

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
rppa.nonparam <- function(spots, nrep=1, ...){
2+
require(cobs)
23

34
spots <- subset(spots, SpotClass=="Sample")
45

@@ -11,10 +12,10 @@ rppa.nonparam <- function(spots, nrep=1, ...){
1112
#calculate matrix of dilutions
1213
spots.m <- rppa.serialDilution.dilutionMatrix(spots.c, numOfDilutions, highestDilutionFirst=F)
1314

14-
nonpa <- getnonpest(spots.m,3);
15+
nonpa <- getnonpest(spots.m,3)
1516

1617
#combine estimates with signal information
17-
spots.result <- cbind(spots.c[,1:(ncol(spots.c)-numOfDilutions)], x.weighted.mean=tabus$pass2, x.err=NA)
18+
spots.result <- cbind(spots.c[,1:(ncol(spots.c)-numOfDilutions)], x.weighted.mean=nonpa$x0new, x.err=NA)
1819

1920
spots.summarize <- rppa.serialDilution.summarize(spots.result, ...)
2021
spots.summarize$concentrations <- 2^spots.summarize$x.weighted.mean

JSON.R

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -43,6 +43,9 @@ rppa.load <- function (barcode=NA, slideIndex=NA, baseUrl = "http://localhost:80
4343
spots$SampleType <- as.factor(spots$SampleType)
4444
spots$TargetGene <- as.factor(spots$TargetGene)
4545
spots$DilutionFactor <- as.double(spots$DilutionFactor)
46+
spots$PlateCol <- as.integer(spots$PlateCol)
47+
spots$PlateRow <- as.integer(spots$PlateRow)
48+
spots$PlateLayout <- as.integer(spots$PlateLayout)
4649

4750
#add shifts
4851
if (length(fromJSON(paste(baseUrl, "exportShiftsAsJSON/",

miracle_0.6.3.tar.gz

-30.6 KB
Binary file not shown.

serialDilution.R

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,7 @@ rppa.serialDilution <- function(spots, initial.dilution.estimate=2, sensible.min
4141
spots.c <- rppa.serialDilution.format(spots)
4242

4343
#extract number of different dilutions that are not NA
44-
numOfDilutions <- length(unique(spots$DilutionFactor[!is.na(spots$DilutionFactor)]))
44+
numOfDilutions <- length(unique(spots$DilutionFactor[!is.na(spots$DilutionFactor)]))
4545

4646
#calculate matrix of dilutions
4747
spots.m <- rppa.serialDilution.dilutionMatrix(spots.c, numOfDilutions)
@@ -93,7 +93,7 @@ rppa.serialDilution.format <- function(spots, inducerOnlyName=T) {
9393
#if(inducerOnlyName==T) spots$Inducer <- gsub(" [0-9]+[.][0-9] mM", "", spots$Inducer )
9494

9595
#cast into table
96-
spots.c <- cast(spots, CellLine + NumberOfCellsSeeded + SampleName + SampleType + TargetGene + SpotType + SpotClass + Deposition + Treatment + LysisBuffer + Inducer + Replicate ~ DilutionFactor, value="Signal", add.missing=TRUE, fun.aggregate="median", na.rm=T)
96+
spots.c <- cast(spots, CellLine + NumberOfCellsSeeded + SampleName + SampleType + TargetGene + SpotType + SpotClass + Deposition + Treatment + LysisBuffer + Inducer + Replicate ~ DilutionFactor, value="Signal", add.missing=FALSE, fun.aggregate="median", na.rm=T)
9797

9898
return(spots.c)
9999
}

serialDilution.summarize.R

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
rppa.serialDilution.summarize <-
22
function(data.protein.conc, method="mean",
33
select.columns.sample=c("SampleName"),
4-
select.columns.A=c("LysisBuffer"),
5-
select.columns.B=c("CellLine"), select.columns.fill=c("Deposition"))
4+
select.columns.A=c("Treatment"),
5+
select.columns.B=c("CellLine"), select.columns.fill=c("NumberOfCellsSeeded"))
66
{
77
data.protein.conc$x.err.percent <- data.protein.conc$x.err / data.protein.conc$x.weighted.mean
88

@@ -37,12 +37,12 @@ function(data.protein.conc, method="mean",
3737
fillAttribute <- paste(select.columns.fill, collapse=" | ")
3838
}
3939
else{
40-
cat("Fill attribute cannot be empty in the current version, using Depositions per default.")
41-
Fill <- data.protein.conc[,"Deposition"]
40+
cat("Fill attribute cannot be empty in the current version, using NumberOfCellsSeeded per default.")
41+
Fill <- data.protein.conc[,"NumberOfCellsSeeded"]
4242
newColumns <- cbind(newColumns, Fill)
43-
fillAttribute <- "Deposition"
43+
fillAttribute <- "NumberOfCellsSeeded"
4444
}
45-
45+
4646
result <- cbind(newColumns, data.protein.conc[,c("Deposition", "x.weighted.mean", "x.err.percent")])
4747

4848
if(!is.na(select.columns.A) && !is.na(select.columns.B))
@@ -55,7 +55,7 @@ function(data.protein.conc, method="mean",
5555
result <- ddply(result, .(Sample, B, Fill, Deposition), summarise, x.weighted.mean=mean(x.weighted.mean, na.rm=T), x.err=sum(x.err.percent), sem=sqrt(var(x.weighted.mean,na.rm=TRUE)/length(na.omit(x.weighted.mean))))
5656

5757
else result <- ddply(result, .(Sample, Fill, Deposition), summarise, x.weighted.mean=mean(x.weighted.mean, na.rm=T), x.err=sum(x.err.percent), sem=sqrt(var(x.weighted.mean,na.rm=TRUE)/length(na.omit(x.weighted.mean))))
58-
58+
5959
result$x.err <- result$x.weighted.mean * result$x.err
6060

6161
#make sure A, B and sample are factors

tabus.R

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,6 @@ rppa.tabus <- function(spots, nrep=1, ...){
77

88
#extract number of different dilutions that are not NA
99
numOfDilutions <- length(unique(spots$DilutionFactor[!is.na(spots$DilutionFactor)]))
10-
1110
#calculate matrix of dilutions
1211
spots.m <- rppa.serialDilution.dilutionMatrix(spots.c, numOfDilutions, highestDilutionFirst=F)
1312

0 commit comments

Comments
 (0)