Closed dansteiert closed 9 months ago
Something similar also applies for the maf object:
rename_Tumor_Sample_Barcode_mafObj = function(maf, rename_func){
maf@clinical.data$Tumor_Sample_Barcode = as.factor(rename_func(maf@clinical.data$Tumor_Sample_Barcode))
maf@variants.per.sample$Tumor_Sample_Barcode = as.factor(rename_func(maf@variants.per.sample$Tumor_Sample_Barcode))
maf@variant.classification.summary$Tumor_Sample_Barcode = as.factor(rename_func(maf@variant.classification.summary$Tumor_Sample_Barcode))
maf@maf.silent$Tumor_Sample_Barcode = as.factor(rename_func(maf@maf.silent$Tumor_Sample_Barcode))
maf@data$Tumor_Sample_Barcode = as.factor(rename_func(maf@data$Tumor_Sample_Barcode))
return (maf)
}
Hi all,
I had an issue, where I wanted to change the Tumor_Sample_Barcode of my gistic object for the gisticOncoPlot.
I found after a look into the code, that it is not like in a maf object the
maf@data$Tumor_Sample_Barcode
which needs changing but the column names ofgistic@numericMatrix
andgistic@cnMatrix
. One of the two might also work -> better safe then sorry though.Here I wrote a function in case somebody else runs into a similar problem and does not know where to look for an awnser.
My rename_func is quite ugly and needs the respectiv customization, but for me it looked like this: