Closed weishwu closed 2 years ago
Hi there, thank you for using riboWaltz and for the well-described issue.
I run the following code, based on the data you attached above and on the latest riboWaltz version in GitHub:
annotation_dt <- readRDS("PATH/annotation_dt.rds")
reads_psite_list <- readRDS("PATH/reads_psite_list_test.rds")
test <- region_psite(reads_psite_list, annotation_dt)
Aside from a warning ggplot-related, I obtained this:
> test
$plot
$dt
region count sample percentage class
1: 5' UTR 4 SRR619082 33.333333 mapped
2: 5' UTR 2 SRR619083 10.000000 mapped
3: 5' UTR 17132481 RNAs 7.612826 rna
4: CDS 8 SRR619082 66.666667 mapped
5: CDS 18 SRR619083 90.000000 mapped
6: CDS 106949646 RNAs 47.523129 rna
7: 3' UTR 100965443 RNAs 44.864045 rna
and the following plot:
This is exactly what i would expect from the region_psite function. I was not able to replicate the error you reported, even unloading some packages.
Did you try to run region_psite separately on the two samples? Did the error pop up every time? If so, the only option is for you to send me the whole reads_psite_list
so I can try again, see if I get the same error and, in case, proceed step by step to find out the reason of it.
Here info on my R version
> sessionInfo()
R version 4.0.3 (2020-10-10)
Platform: x86_64-w64-mingw32/x64 (64-bit)
Running under: Windows 10 x64 (build 19045)
Matrix products: default
locale:
[1] LC_COLLATE=Italian_Italy.1252 LC_CTYPE=Italian_Italy.1252 LC_MONETARY=Italian_Italy.1252 LC_NUMERIC=C LC_TIME=Italian_Italy.1252
attached base packages:
[1] stats graphics grDevices utils datasets methods base
other attached packages:
[1] ggplot2_3.4.0 data.table_1.14.2
loaded via a namespace (and not attached):
[1] fansi_0.4.1 withr_2.5.0 dplyr_1.0.2 utf8_1.1.4 crayon_1.3.4 grid_4.0.3 R6_2.5.0 lifecycle_1.0.3 gtable_0.3.0
[10] magrittr_2.0.1 scales_1.2.1 pillar_1.7.0 rlang_1.0.6 cli_3.4.1 farver_2.0.3 rstudioapi_0.13 generics_0.1.0 vctrs_0.5.1
[19] ellipsis_0.3.2 labeling_0.4.2 tools_4.0.3 glue_1.4.2 purrr_0.3.4 munsell_0.5.0 compiler_4.0.3 pkgconfig_2.0.3 colorspace_2.0-0
[28] tidyselect_1.1.2 tibble_3.0.4
Best Fabio
Thanks for looking into this @fabiolauria I tried it in R and it works! Don't know why it doesn't work in Rstudio.
I'm getting an error with
region_psite
:Other functions, such as
codon_coverage
,rlength_distr
andframe_psite_length
worked.I ran
psite_info
to generatereads_psite_list
. The top lines ofreads_psite_list
andannotation_dt
are:annotation_dt
was generated from Gencode GTF and subsetted to protein-coding transcripts:reads_psite_list
and the fullannotation_dt
, are attached (in 2 rds and then zipped).data.zip