DiogoVeiga / maser

Mapping Alternative Splicing Events to pRoteins
Other
18 stars 14 forks source link

mapProteinFeaturesToEvents not working #32

Closed carynhale closed 2 years ago

carynhale commented 2 years ago

Hello- I'm some issues with the mapProteinFeaturesToEvents function. I cannot get this function to work. I get this error:

Error in names(x) <- value : 'names' attribute [6] must be the same length as the vector [1]

I encountered this issue when running some older code that used to work just fine, but I also get this error when I run code from the vignette:


library(maser)
library(rtracklayer)
path <- system.file("extdata", file.path("MATS_output"),
                    package = "maser")
hypoxia <- maser(path, c("Hypoxia 0h", "Hypoxia 24h"))
hypoxia_filt <- filterByCoverage(hypoxia, avg_reads = 5)
gtf_path <- system.file("extdata", file.path("GTF","Ensembl85_examples.gtf.gz"),
                        package = "maser")
ens_gtf <- rtracklayer::import.gff(gtf_path)
srsf6_events <- geneEvents(hypoxia_filt, "SRSF6")
srsf6_events
srsf6_mapped <- mapTranscriptsToEvents(srsf6_events, ens_gtf)
head(annotation(srsf6_mapped, "SE"))
srsf6_annot <- mapProteinFeaturesToEvents(srsf6_mapped, c("Domain_and_Sites", "Topology"), by="category")

Any idea what the issue could be?

groy87 commented 2 years ago

Hi @carynhale Did you manage to solve this error? I am having the same issue

carynhale commented 2 years ago

No, I dug into the code as much as I could; it's something with the new version of UniProt, I think, but I have no clue how to fix it.

DiogoVeiga commented 2 years ago

Hello, I released a new version to fix this issue caused by changes in UniProt. Please update the package from Bioconductor.

if (!require("BiocManager", quietly = TRUE)) install.packages("BiocManager") BiocManager::install("maser")

groy87 commented 2 years ago

Hi @DiogoVeiga

I installed the package just today and after seeing your reply reinstalled it again. But the problem still persists:

knitr::kable( head(availableFeaturesUniprotKB(), 10) )

gtf_path <- system.file("extdata", file.path("GTF","Ensembl85_examples.gtf.gz"), package = "maser") ens_gtf <- rtracklayer::import.gff(gtf_path)

srsf6_events <- geneEvents(hypoxia_filt, "SRSF6") srsf6_mapped <- mapTranscriptsToEvents(srsf6_events, ens_gtf)

> srsf6_annot <- mapProteinFeaturesToEvents(srsf6_mapped, c("Domain_and_Sites", "Topology"), by="category") Error in names(x) <- value : 'names' attribute [6] must be the same length as the vector [1]

> srsf6_annot <- mapProteinFeaturesToEvents(srsf6_mapped, tracks = "domain") Error in names(x) <- value : 'names' attribute [6] must be the same length as the vector [1]

sessionInfo() R version 4.0.5 (2021-03-31) Platform: x86_64-pc-linux-gnu (64-bit) Running under: Ubuntu 20.04.3 LTS

Matrix products: default BLAS: /usr/lib/x86_64-linux-gnu/openblas-pthread/libblas.so.3 LAPACK: /usr/lib/x86_64-linux-gnu/openblas-pthread/liblapack.so.3

locale: [1] LC_CTYPE=en_US.UTF-8 LC_NUMERIC=C LC_TIME=en_US.UTF-8 LC_COLLATE=en_US.UTF-8 LC_MONETARY=en_US.UTF-8 LC_MESSAGES=en_US.UTF-8
[7] LC_PAPER=en_US.UTF-8 LC_NAME=C LC_ADDRESS=C LC_TELEPHONE=C LC_MEASUREMENT=en_US.UTF-8 LC_IDENTIFICATION=C

attached base packages: [1] grid parallel stats4 stats graphics grDevices utils datasets methods base

other attached packages: [1] BiocFileCache_1.14.0 dbplyr_2.1.1 rtracklayer_1.50.0 maser_1.8.0 GenomicRanges_1.42.0 GenomeInfoDb_1.26.7 BiocManager_1.30.14
[8] biomartr_1.0.2 biomaRt_2.46.3 cowplot_1.1.1 gridExtra_2.3 lattice_0.20-44 rio_0.5.29 readxl_1.3.1
[15] org.Mm.eg.db_3.12.0 AnnotationDbi_1.52.0 IRanges_2.24.1 S4Vectors_0.28.1 Biobase_2.50.0 BiocGenerics_0.36.1 clusterProfiler_3.18.1 [22] pheatmap_1.0.12 RColorBrewer_1.1-2 reshape2_1.4.4 forcats_0.5.1 stringr_1.4.0 purrr_0.3.4 readr_2.1.2
[29] tidyr_1.1.3 tibble_3.1.1 ggplot2_3.3.3 tidyverse_1.3.1 dplyr_1.0.6

loaded via a namespace (and not attached): [1] utf8_1.2.1 tidyselect_1.1.1 RSQLite_2.2.7 htmlwidgets_1.5.4 BiocParallel_1.24.1 scatterpie_0.1.6
[7] munsell_0.5.0 DT_0.21 withr_2.4.2 colorspace_2.0-1 GOSemSim_2.16.1 highr_0.9
[13] knitr_1.37 rstudioapi_0.13 DOSE_3.16.0 labeling_0.4.2 MatrixGenerics_1.2.1 GenomeInfoDbData_1.2.4
[19] polyclip_1.10-0 bit64_4.0.5 farver_2.1.0 downloader_0.4 vctrs_0.3.8 generics_0.1.0
[25] xfun_0.30 biovizBase_1.38.0 R6_2.5.0 graphlayouts_0.7.1 AnnotationFilter_1.14.0 bitops_1.0-7
[31] cachem_1.0.4 fgsea_1.16.0 DelayedArray_0.16.3 assertthat_0.2.1 scales_1.1.1 ggraph_2.0.5
[37] nnet_7.3-16 enrichplot_1.10.2 gtable_0.3.0 tidygraph_1.2.0 ensembldb_2.14.1 rlang_0.4.11
[43] splines_4.0.5 lazyeval_0.2.2 dichromat_2.0-0 broom_0.7.12 checkmate_2.0.0 yaml_2.3.5
[49] modelr_0.1.8 GenomicFeatures_1.42.3 crosstalk_1.2.0 backports_1.4.1 qvalue_2.22.0 Hmisc_4.6-0
[55] tools_4.0.5 ellipsis_0.3.2 jquerylib_0.1.4 Rcpp_1.0.6 plyr_1.8.6 base64enc_0.1-3
[61] progress_1.2.2 zlibbioc_1.36.0 RCurl_1.98-1.3 prettyunits_1.1.1 rpart_4.1-15 openssl_1.4.4
[67] viridis_0.6.0 SummarizedExperiment_1.20.0 haven_2.4.3 ggrepel_0.9.1 cluster_2.1.2 fs_1.5.2
[73] tinytex_0.37 magrittr_2.0.1 data.table_1.14.0 DO.db_2.9 openxlsx_4.2.5 reprex_2.0.1
[79] ProtGenerics_1.22.0 matrixStats_0.58.0 hms_1.1.1 XML_3.99-0.6 jpeg_0.1-9 compiler_4.0.5
[85] crayon_1.4.1 shadowtext_0.0.8 htmltools_0.5.2 Formula_1.2-4 lubridate_1.8.0 DBI_1.1.1
[91] tweenr_1.0.2 MASS_7.3-54 rappdirs_0.3.3 Matrix_1.3-3 cli_2.5.0 Gviz_1.34.1
[97] igraph_1.2.6 pkgconfig_2.0.3 rvcheck_0.1.8 GenomicAlignments_1.26.0 foreign_0.8-81 xml2_1.3.3
[103] XVector_0.30.0 rvest_1.0.2 VariantAnnotation_1.36.0 digest_0.6.27 Biostrings_2.58.0 cellranger_1.1.0
[109] fastmatch_1.1-0 htmlTable_2.4.0 curl_4.3.1 Rsamtools_2.6.0 lifecycle_1.0.0 jsonlite_1.7.2
[115] viridisLite_0.4.0 askpass_1.1 BSgenome_1.58.0 fansi_0.4.2 pillar_1.6.0 fastmap_1.1.0
[121] httr_1.4.2 survival_3.2-11 GO.db_3.12.1 glue_1.4.2 zip_2.2.0 png_0.1-7
[127] BiocVersion_3.12.0 bit_4.0.4 ggforce_0.3.3 stringi_1.6.1 blob_1.2.1 latticeExtra_0.6-29
[133] memoise_2.0.0

DiogoVeiga commented 2 years ago

Please try installing from Github using devtools::install_github("DiogoVeiga/maser", force = TRUE)