Skip to content
This repository has been archived by the owner on Jan 20, 2021. It is now read-only.

Commit

Permalink
Merge pull request #69 from cdejonge/FT-1813/aCGH-add-homozygous_loss
Browse files Browse the repository at this point in the history
FT-1813 aCGH add homozygous-loss
  • Loading branch information
forus committed Mar 10, 2016
2 parents 1af79e6 + 70b55bd commit cd10a79
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 6 deletions.
5 changes: 3 additions & 2 deletions web-app/Rscripts/aCGH/acgh-frequency-plot.R
Original file line number Diff line number Diff line change
Expand Up @@ -39,8 +39,9 @@ acgh.frequency.plot <- function
highdimColumnsMatchingGroupIds <- highdimColumnsMatchingGroupIds[which(!is.na(highdimColumnsMatchingGroupIds))]
group.calls <- calls[ , highdimColumnsMatchingGroupIds, drop=FALSE]

data.info[, paste('gain.freq.', group, sep='')] <- rowSums(group.calls > 0) / ncol(group.calls)
data.info[, paste('loss.freq.', group, sep='')] <- rowSums(group.calls < 0) / ncol(group.calls)
# We only use the values we know (hom.del, loss, gain, ampl)
data.info[, paste('gain.freq.', group, sep='')] <- rowSums(group.calls==1 | group.calls==2 ) / ncol(group.calls)
data.info[, paste('loss.freq.', group, sep='')] <- rowSums(group.calls==-1 | group.calls==-2) / ncol(group.calls)
}

# Replace chromosome X with number 23 to get only integer column values
Expand Down
7 changes: 3 additions & 4 deletions web-app/Rscripts/aCGH/acgh-group-test.R
Original file line number Diff line number Diff line change
Expand Up @@ -61,10 +61,9 @@ acgh.group.test <- function
datacgh <- cbind(datacgh, group.calls)
}
group.sizes <- c(group.sizes, length(highdimColumnsMatchingGroupIds))
data.info[,paste('loss.freq.', group, sep='')] <- round(rowMeans(group.calls == -1), digits=3)
data.info[,paste('gain.freq.', group, sep='')] <- round(rowMeans(group.calls == 1), digits=3)
if (2 %in% calls)
data.info[,paste('amp.freq.', group, sep='')] <- round(rowMeans(group.calls == 2), digits=3)
# We only use known values (-2:hom.los, -1:loss, 1:gain, 2:ampl)
data.info[,paste('loss.freq.', group, sep='')] <- round(rowMeans(group.calls==-1 | group.calls==-2), digits=3)
data.info[,paste('gain.freq.', group, sep='')] <- round(rowMeans(group.calls==1 | group.calls==2 ), digits=3)
}

nrcpus=0
Expand Down
3 changes: 3 additions & 0 deletions web-app/Rscripts/aCGH/acgh-plot-survival.R
Original file line number Diff line number Diff line change
Expand Up @@ -69,6 +69,9 @@ acgh.plot.survival <- function

s <- Surv(phenodata[,survival], phenodata[,status])
reg <- as.matrix(dat[, grep('^flag\\.', colnames(dat))])
# we map the the values -2 and 2 on -1 and 1 respectively
reg[reg[] == 2] <- 1
reg[reg[] == -2] <- -1
if (aberrations == 'gains') {
reg[reg > 0] <- 1
reg[reg < 0] <- 0
Expand Down

0 comments on commit cd10a79

Please sign in to comment.