Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Error in .f(.x[[i]], ...) : object 'ts_oncogene' not found #53

Closed
vladsavelyev opened this issue Oct 29, 2018 · 5 comments
Closed

Error in .f(.x[[i]], ...) : object 'ts_oncogene' not found #53

vladsavelyev opened this issue Oct 29, 2018 · 5 comments

Comments

@vladsavelyev
Copy link
Contributor

Hey Sigve,

Testing the most recent codebase (normal dockerized install). I updated the dev image and downloaded the most recent data bundle, running an example and getting this errror:

python pcgr.py --input_vcf examples/tumor_sample.COAD.vcf.gz --input_cna examples/tumor_sample.COAD.cna.tsv . examples grch37 examples/pcgr_conf.COAD.toml tumor_sample.COAD
...
2018-10-29 03:28:57 [INFO] Calculating tumor mutational burden
2018-10-29 03:28:58 [INFO] Number of variants for mutational burden analysis: 2709
2018-10-29 03:28:58 [INFO] Estimated mutational burden: 75.25 mutations/Mb
2018-10-29 03:28:58 [INFO] Mutational burden tertile: TMB - High ( > 20 mutations/Mb)
2018-10-29 03:28:58 [INFO] ------
2018-10-29 03:28:58 [INFO] ------
2018-10-29 03:28:58 [INFO] Generating report data for copy number segment file /workdir/input_cna/tumor_sample.COAD.cna.tsv
Error in .f(.x[[i]], ...) : object 'ts_oncogene' not found
Calls: <Anonymous> ... <Anonymous> -> vars_select_eval -> map_if -> map -> .Call -> .f
Execution halted
@pdiakumis
Copy link
Collaborator

pdiakumis commented Oct 29, 2018

Debugging the pcgrr::generate_report_data_cna function, it looks like the ts_oncogene column isn't in the pcgr_data$gencode_genes_gr list, so it can't find it when doing dplyr::select so errors out. Not sure if we need that column. There are two similarly named columns, tsgene and p_oncogene in the ranges object:

  ranges <- pcgr_data$gencode_genes_gr[subjectHits(hits)]
  mcols(ranges) <- c(mcols(ranges),mcols(cna_gr[queryHits(hits)]))

  local_df <- as.data.frame(mcols(ranges))
  local_df$segment_start <- start(ranges(cna_gr[queryHits(hits)]))
  local_df$segment_end <- end(ranges(cna_gr[queryHits(hits)]))
  local_df$segment_length_Mb <- round((as.numeric((local_df$segment_end - local_df$segment_start)/1000000)),digits = 4)

  local_df$transcript_start <- start(ranges)
  local_df$transcript_end <- end(ranges)
  local_df$chrom <- as.character(seqnames(ranges))
  local_df <- as.data.frame(local_df %>% dplyr::rowwise() %>% dplyr::mutate(transcript_overlap_percent = round(as.numeric((min(transcript_end,segment_end) - max(segment_start,transcript_start)) / (transcript_end - transcript_start)) * 100, digits = 2)))
  local_df$segment_link <- paste0("<a href='",paste0(ucsc_browser_prefix,paste0(local_df$chrom,':',local_df$segment_start,'-',local_df$segment_end)),"' target=\"_blank\">",paste0(local_df$chrom,':',local_df$segment_start,'-',local_df$segment_end),"</a>")

  local_df_print <- local_df
  local_df_print <- dplyr::select(local_df_print,chrom,segment_start,segment_end,segment_length_Mb,
                                  event_type,cytoband,LogR,ensembl_gene_id,symbol,ensembl_transcript_id,
                                  transcript_start,transcript_end,transcript_overlap_percent,name,biotype,
                                  disgenet_cui,tsgene,intogen_drivers,chembl_compound_id,
                                  gencode_gene_biotype,gencode_tag,gencode_release)
...
...
object 'ts_oncogene' not found

> names(mcols(ranges))
 [1] "ensembl_gene_id"            "symbol"                     "gencode_gene_biotype"       "gencode_tag"                "biotype"
 [6] "ensembl_transcript_id"      "ensembl_transcript_id_full" "gencode_release"            "name"                       "entrezgene"
[11] "principal_isoform_flag"     "uniprot_acc"                "uniprot_id"                 "corum_id"                   "MIM_id"
[16] "MIM_phenotype_id"           "tsgene"                     "p_oncogene"                 "disgenet_cui"               "predisp_source"
[21] "predisp_cancer_cui"         "predisp_cancer_moi"         "predisp_syndrome_cui"       "intogen_drivers"            "tcga_driver"
[26] "chembl_compound_id"         "oncoscore"                  "ncg"                        "Sample"                     "Num_Probes"
[31] "LogR"                       "segmentID"                  "cytoband"                   "event_type"

@sigven
Copy link
Owner

sigven commented Oct 29, 2018

Hi Peter and Vlad,
Thanks, forgot testing this. You are correct, Peter. It's the oncogene that has been changed. I'll fix this asap.

@sigven
Copy link
Owner

sigven commented Oct 29, 2018

You can re-try now.

@vladsavelyev
Copy link
Contributor Author

Awesome, thanks Sigve, it works now! PCGR creates the report even though it prints some errors in the end which I'm not sure if affect anything:

2018-10-30 21:40:11 [INFO] Rendering HTML report with rmarkdown
Warning messages:
1: In instance$preRenderHook(instance) :
  It seems your data is too big for client-side DataTables. You may consider server-side processing: https://rstudio.github.io/DT/server.html
2: In replayPlot(x) : graphical parameter "cin" cannot be set
3: In replayPlot(x) : graphical parameter "cra" cannot be set
4: In replayPlot(x) : graphical parameter "csi" cannot be set
5: In replayPlot(x) : graphical parameter "cxy" cannot be set
6: In replayPlot(x) : graphical parameter "din" cannot be set
7: In replayPlot(x) : graphical parameter "page" cannot be set
8: In file.rename(from, to) :
  cannot rename file '/data/cephfs/punim0010/extras/vlad/synced/pcgr/examples/output/tumor_sample.COAD.pcgr_acmg.grch37_files/figure-html' to '/data/cephfs/punim0010/extras/vlad/synced/pcgr/examples/output//data/cephfs/punim0010/extras/
vlad/synced/pcgr/examples/output/tumor_sample.COAD.pcgr_acmg.grch37_files/figure-html', reason 'No such file or directory'
9: In file.rename(from, to) :
  cannot rename file '/data/cephfs/punim0010/extras/vlad/synced/pcgr/examples/output//data/cephfs/punim0010/extras/vlad/synced/pcgr/examples/output/tumor_sample.COAD.pcgr_acmg.grch37_files/figure-html' to '/data/cephfs/punim0010/extras/
vlad/synced/pcgr/examples/output/tumor_sample.COAD.pcgr_acmg.grch37_files/figure-html', reason 'No such file or directory'
2018-10-30 21:41:10 - pcgr-writer - INFO - Finished

This is the no-docker version, so might have something to do with the installation? But the report looks good.

@sigven
Copy link
Owner

sigven commented Oct 30, 2018

I actually see the same errors (warnings actually) when I run the report generation locally, I believe the graphical stuff comes from deconstructSigs, while the latter comes from the markdown report engine. Report is always generated, but one day I'll have to try getting rid of these warnings :-)

@sigven sigven closed this as completed Oct 30, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants