RTCGA
package to estimate a frequency of MDM2 duplications based on CNV dataYou need RTCGA.cnv package to use CNV scores.
if (!requireNamespace("BiocManager", quietly=TRUE))
install.packages("BiocManager")
::install("RTCGA.cnv") BiocManager
To get scores for all cancers for selected gene or region one should use the get.region.cnv.score() function.
For example, MDM2 is located on chromosome 12 positions 69240000-69200000.
function(chr="12", start=69240000, stop=69200000) {
get.region.cnv.score <- data(package="RTCGA.cnv")
list_cnv <- list_cnv$results[,"Item"]
datasets <-
lapply(datasets, function(dataname) {
filtered <- get(dataname)
tmp <- tmp[tmp$Chromosome == chr,]
tmp <- tmp[pmin(tmp$Start, tmp$End) <= pmax(stop, start) & pmax(tmp$Start, tmp$End) >= pmin(stop, start),]
tmp <-data.frame(tmp, cohort=dataname)
})
do.call(rbind, filtered)
} get.region.cnv.score(chr="12", start=69240000, stop=69200000)
MDM2.scores <-
# only one per patient
$Sample <- substr(MDM2.scores$Sample, 1, 12)
MDM2.scores MDM2.scores[!duplicated(MDM2.scores$Sample),] MDM2.scores <-
Let’s see where there are more than 3 copies of MDM2
log(3)/log(2)-1
cutoff <- cut(MDM2.scores$Segment_Mean, c(0, cutoff, Inf), labels = c("<= 3", "> 3")) MDM2cuted <-
And now we can calculate number of cases with <= or >3 copies od MDM2 in each cancer type.
table(MDM2.scores$cohort, MDM2cuted)