PoisonAlien / maftools

Summarize, Analyze and Visualize MAF files from TCGA or in-house studies.
http://bioconductor.org/packages/release/bioc/html/maftools.html
MIT License
450 stars 222 forks source link

Can't add clinical data to maf file #873

Closed eibol1 closed 1 year ago

eibol1 commented 2 years ago

Hi,

I can read and work with a maf file but when I try to add external clinical data to it, I get this error:

Error in gsub(pattern = " ", replacement = "_", x = colnames(sample.anno),  : 
string de entrada 23 es inválida en este locale

What I am trying is this:

clinic <- '/Users/abelgd/Desktop/training_bioinfo/POSTPIPELINE/clinicopatologicas_ptes.txt'
c <- read.delim(clinica, sep="\t", header=T,check.names = F)  
c <- as.data.frame(c)

Where c is finally a df containing different columns with clinical data of the samples. First column name of c is Tumor_Sample_Barcode with exactly the names of the tumor_sample_barcodes from maf file.

merged_maf2 <- read.maf(maf = '/Users/abelgd/Desktop/training_bioinfo/Maftools/maf_files_indels_filt/merged', clinicalData = c, removeDuplicatedVariants = F,
                         vc_nonSyn = c("Frame_Shift_Del", "Frame_Shift_Ins", "Splice_Site", "Translation_Start_Site","Nonsense_Mutation", "Nonstop_Mutation", "In_Frame_Del","In_Frame_Ins", "Missense_Mutation", "intron_variant",
                                       "3_prime_UTR_variant", "5_prime_UTR_variant", "synonymous_variant", "upstream_gene_variant",
                                       "intron_variant,splice_polypyrimidine_tract_variant", "splice_region_variant,synonymous_variant",
                                       "downstream_gene_variant","Intron","3'UTR", "5'UTR","5'Flank", "Silent", "Splice_Region", "3'Flank" ))
ShixiangWang commented 1 year ago

@eibol1 Hi, try reading with isTCGA = FALSE

read.maf(maf = laml.maf, clinicalData = laml.clin, isTCGA = FALSE)
github-actions[bot] commented 1 year ago

This issue is stale because it has been open for 60 days with no activity.

github-actions[bot] commented 1 year ago

This issue was closed because it has been inactive for 14 days since being marked as stale.