griffithlab / GenVisR

Genome data visualizations
Creative Commons Zero v1.0 Universal
210 stars 62 forks source link

When Will Lolliplot be functional and what should i do in the meanwhile? #394

Open jon4thin opened 1 year ago

jon4thin commented 1 year ago

I was interested in using GenVisR for the lolliplot(), now Lolliplot() function.

Older versions of GenVisR have the FField dependency, whereby FField is no longer supported by bioconductor. As such, as recommended by this post by a dev of GenVisR, I got the most up to date dev version of GenVisR using the procedure on the github page:

# load devtools package
library(devtools)

# install GenVisR from github
install_github("griffithlab/GenVisR")

Unfortunately, now with this new GenVisR version, lolliplot() no longer functions and Lolliplot(), the replacement, is in development and non-functional. When I try the example under lolliplot() in the manual:

# Load a pre-existing data set
dataset <- PIK3CA # a table 19 columns and 361 rows

# mode 1, amino acid changes are not present
library(TxDb.Hsapiens.UCSC.hg38.knownGene)
library(BSgenome.Hsapiens.UCSC.hg38)
txdb <- TxDb.Hsapiens.UCSC.hg38.knownGene
BSgenome <- BSgenome.Hsapiens.UCSC.hg38
keep <- c("Chromosome", "Start_Position", "End_Position", "Reference_Allele",
"Tumor_Seq_Allele2", "Tumor_Sample_Barcode", "Gene", "Variant_Classification")
dataset.mode1 <- dataset[,keep]
colnames(dataset.mode1) <- c("chromosome", "start", "stop", "reference", "variant",
"sample", "gene", "consequence")

# mode 2, amino acid changes are present
keep <- c("Chromosome", "Start_Position", "End_Position", "Reference_Allele",
"Tumor_Seq_Allele2", "Tumor_Sample_Barcode", "Gene", "Variant_Classification",
"Transcript_ID", "HGVSp")
dataset.mode2 <- dataset[,keep]
colnames(dataset.mode2) <- c("chromosome", "start", "stop", "reference", "variant",
"sample", "gene", "consequence", "transcript", "proteinCoord")

# run Lolliplot
object <- Lolliplot(dataset.mode1, transcript="ENST00000263967",
species="hsapiens", txdb=txdb, BSgenome=BSgenome)
object <- Lolliplot(dataset.mode2, transcript="ENST00000263967",
species="hsapiens")

I get the error:

Error in `collect()`:
! Failed to collect lazy table.
Caused by error in `db_collect()`:
! Arguments in `...` must be used.
✖ Problematic argument:
• ..1 = Inf
ℹ Did you misspell an argument name?
Run `rlang::last_trace()` to see where the error occurred.

for both the mode1 and mode2 runs of Lolliplot()

Session Info: setting value version R version 4.1.2 (2021-11-01) os macOS Big Sur 10.16 system x86_64, darwin17.0 ui RStudio language (EN) collate en_US.UTF-8 ctype en_US.UTF-8 tz America/New_York date 2023-11-08 rstudio 1.4.1106 Tiger Daylily (desktop) pandoc NA

zlskidmore commented 1 year ago

Hi @jon4thin

The original lolliplot() function had to be removed due to a package dependency issue. I did re-write the function which is now called Lolliplot() as you noticed. Both function pull from biomart for protein domains. It appears however that the mirror sites for ensembl have changed without me noticing.

To fix this please try altering the host param.

object <- Lolliplot(dataset.mode1, transcript="ENST00000263967",
                    species="hsapiens", txdb=txdb, BSgenome=BSgenome, host="https://useast.ensembl.org")

That should resolve the issue you are having. I'll update the default host in the next release.