mdozmorov / TCGAsurvival

Scripts to analyze TCGA data
GNU General Public License v3.0
115 stars 41 forks source link

KMplot function doesn't work #17

Closed thesimranvenkat closed 1 year ago

thesimranvenkat commented 1 year ago

Sorry to disturb you again with this. Thanks a ton for sharing the data you had earlier downloaded, I was able to get further along in the script until I got stuck at the kmplot function.

  1. It couldn't identify the function kmplot. I looked around for Rdocumentation of the function, and found the package 'hdnom' that has this function. I could be wrong?
  2. After running the line of kmplot in Analysis 2 chunk, it yields an error: > kmplot(expr, clin, event_index=2, time_index=3, affyid = selected_genes, auto_cutoff="true", transform_to_log2 = TRUE, cancer_type = cancer_type, fileType = "png", use_survminer = TRUE)

Error in kmplot(expr, clin, event_index = 2, time_index = 3, affyid = selected_genes, : unused arguments (event_index = 2, time_index = 3, affyid = selected_genes, auto_cutoff = "true", transform_to_log2 = TRUE, cancer_type = cancer_type, fileType = "png", use_survminer = TRUE)

How can i overcome this?

mdozmorov commented 1 year ago

The kmplot function is in the https://github.com/mdozmorov/TCGAsurvival/blob/master/Supplemental_R_script_1.R file. Note the packages it loads - they should be installed. I'm using this version of survplot, install from source, survplot_0.0.7.tar.gz

thesimranvenkat commented 1 year ago

Thank you so much for replying on a Sunday. I was able to get further down in the script, with a new error :(
Error in paste0("Automatic cutoff at ", m) : cannot coerce type 'closure' to vector of type 'character' In addition: Warning message: In if (affyid != "") { : the condition has length > 1 and only the first element will be used

I got around the above error by setting auto_cutoff to false, and the script ran until it hit a snag at HNSC cancer, with the error Error in 4:ncol(mtx$merged.dat) : argument of length 0 In addition: There were 11 warnings (use warnings() to see them)

mdozmorov commented 1 year ago

This needs manual debugging.

thesimranvenkat commented 1 year ago

Thank you so much for your help so far. I am able to run the analysis (it's still running).