Ok thank you for your reply. I will try this.
Good afternoon,
I am trying to read a maf file with a clinical data file (from TCGA) via
maf <- read.maf(maf = maf_file, clinicalData = clinical_data)
The issue is that in the clinical data file the tumor sample barcode name is short (12 character, e.g.
TCGA-3L-AA1B), while in the maf file the tumor sample barcode name is much longer (e.g. TCGA-3L-AA1B-01A-11D-A36X-10).
I tried to modify the tumor sample barcode via
maf@data$Tumor_Sample_Barcode<-substr(maf@data$Tumor_Sample_Barcode,1,12)
However, this only modifies the name in maf@data, but the tumor sample barcode can also be found e.g. in maf@variants.per.sample or maf@variant.type.summary. And this way it is only updated in maf@data.
Any idea?
Thanks so much!!
1 answer
the short answer is that you need to make the same change everywhere, either before or after loading the data
in practice this probably means that the simplest solution might be to modify the barcodes in the maf file and also change the barcodes in the clinical data before applying the read.maf function
Log in to answer this question.