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

[BUG] Unexpected result reduce_ranges #92

Open
ConYel opened this issue Oct 18, 2021 · 0 comments
Open

[BUG] Unexpected result reduce_ranges #92

ConYel opened this issue Oct 18, 2021 · 0 comments

Comments

@ConYel
Copy link

ConYel commented Oct 18, 2021

Context

I try to use reduce_ranges on the example found in https://bioconductor.github.io/BiocWorkshops/fluent-genomic-data-analysis-with-plyranges.html but I get a strange output:

Code

library(plyranges, quietly = TRUE)
genes <- data.frame(seqnames = "VI", 
                    start = c(3322, 3030, 1437,  5066, 6426, 836),
                    end = c(3846, 3338, 2615, 5521, 7565, 1363),
                    strand = c("-", "-", "-", "+", "+", "+"),
                    gene_id=c("YFL064C", "YFL065C", "YFL066C", 
                              "YFL063W", "YFL062W", "YFL067W"),
                    stringsAsFactors = FALSE)
gr <- as_granges(genes)
gr %>% reduce_ranges(gene_id = List(gene_id))
GRanges object with 5 ranges and 1 metadata column:
      seqnames    ranges strand |                     gene_id
         <Rle> <IRanges>  <Rle> |                      <List>
  [1]       VI  836-1363      + | YFL067W,YFL063W,YFL062W,...
  [2]       VI 5066-5521      + | YFL067W,YFL063W,YFL062W,...
  [3]       VI 6426-7565      + | YFL067W,YFL063W,YFL062W,...
  [4]       VI 1437-2615      - | YFL067W,YFL063W,YFL062W,...
  [5]       VI 3030-3846      - | YFL067W,YFL063W,YFL062W,...
  -------
  seqinfo: 1 sequence from an unspecified genome; no seqlengths

R session information

options(width = 120)
sessioninfo::session_info()
─ Session info 
 setting  value                       
 version  R version 4.1.0 (2021-05-18)
 os       Ubuntu 20.04.2 LTS          
 system   x86_64, linux-gnu           
 ui       RStudio                     
 language (EN)                        
 collate  en_US.UTF-8                 
 ctype    en_US.UTF-8                 
 tz       Etc/UTC                     
 date     2021-10-18                  

─ Packages 
 package              * version  date       lib source        
 assertthat             0.2.1    2019-03-21 [1] RSPM (R 4.1.0)
 backports              1.2.1    2020-12-09 [1] RSPM (R 4.1.0)
 Biobase                2.53.0   2021-05-19 [1] Bioconductor  
 BiocGenerics         * 0.39.1   2021-06-08 [1] Bioconductor  
 BiocIO                 1.3.0    2021-05-19 [1] Bioconductor  
 BiocParallel           1.27.2   2021-07-12 [1] Bioconductor  
 Biostrings             2.61.1   2021-06-04 [1] Bioconductor  
 bit                    4.0.4    2020-08-04 [1] RSPM (R 4.1.0)
 bit64                  4.0.5    2020-08-30 [1] RSPM (R 4.1.0)
 bitops                 1.0-7    2021-04-24 [1] RSPM (R 4.1.0)
 broom                  0.7.9    2021-07-27 [1] RSPM (R 4.1.0)
 cellranger             1.1.0    2016-07-27 [1] RSPM (R 4.1.0)
 cli                    3.0.1    2021-07-17 [1] RSPM (R 4.1.0)
 colorspace             2.0-2    2021-06-24 [1] RSPM (R 4.1.0)
 crayon                 1.4.1    2021-02-08 [1] RSPM (R 4.1.0)
 DBI                    1.1.1    2021-01-15 [1] RSPM (R 4.1.0)
 dbplyr                 2.1.1    2021-04-06 [1] RSPM (R 4.1.0)
 DelayedArray           0.19.1   2021-06-25 [1] Bioconductor  
 digest                 0.6.27   2020-10-24 [1] RSPM (R 4.1.0)
 dplyr                * 1.0.7    2021-06-18 [1] RSPM (R 4.1.0)
 ellipsis               0.3.2    2021-04-29 [1] RSPM (R 4.1.0)
 evaluate               0.14     2019-05-28 [1] RSPM (R 4.1.0)
 fansi                  0.5.0    2021-05-25 [1] RSPM (R 4.1.0)
 forcats              * 0.5.1    2021-01-27 [1] RSPM (R 4.1.0)
 fs                     1.5.0    2020-07-31 [1] RSPM (R 4.1.0)
 generics               0.1.0    2020-10-31 [1] RSPM (R 4.1.0)
 GenomeInfoDb         * 1.29.3   2021-07-01 [1] Bioconductor  
 GenomeInfoDbData       1.2.6    2021-08-04 [1] Bioconductor  
 GenomicAlignments      1.29.0   2021-05-19 [1] Bioconductor  
 GenomicRanges        * 1.45.0   2021-05-19 [1] Bioconductor  
 ggplot2              * 3.3.5    2021-06-25 [1] RSPM (R 4.1.0)
 glue                   1.4.2    2020-08-27 [1] RSPM (R 4.1.0)
 gtable                 0.3.0    2019-03-25 [1] RSPM (R 4.1.0)
 haven                  2.4.1    2021-04-23 [1] RSPM (R 4.1.0)
 hms                    1.1.0    2021-05-17 [1] RSPM (R 4.1.0)
 htmltools              0.5.1.1  2021-01-22 [1] RSPM (R 4.1.0)
 httr                   1.4.2    2020-07-20 [1] RSPM (R 4.1.0)
 IRanges              * 2.27.0   2021-05-19 [1] Bioconductor  
 jsonlite               1.7.2    2020-12-09 [1] RSPM (R 4.1.0)
 knitr                  1.33     2021-04-24 [1] RSPM (R 4.1.0)
 lattice                0.20-44  2021-05-02 [2] CRAN (R 4.1.0)
 lifecycle              1.0.0    2021-02-15 [1] RSPM (R 4.1.0)
 lubridate              1.7.10   2021-02-26 [1] RSPM (R 4.1.0)
 magrittr               2.0.1    2020-11-17 [1] RSPM (R 4.1.0)
 Matrix                 1.3-4    2021-06-01 [1] RSPM (R 4.1.0)
 MatrixGenerics         1.5.2    2021-08-02 [1] Bioconductor  
 matrixStats            0.60.0   2021-07-26 [1] RSPM (R 4.1.0)
 modelr                 0.1.8    2020-05-19 [1] RSPM (R 4.1.0)
 munsell                0.5.0    2018-06-12 [1] RSPM (R 4.1.0)
 pillar                 1.6.2    2021-07-29 [1] RSPM (R 4.1.0)
 pkgconfig              2.0.3    2019-09-22 [1] RSPM (R 4.1.0)
 plyranges            * 1.13.1   2021-06-28 [1] Bioconductor  
 purrr                * 0.3.4    2020-04-17 [1] RSPM (R 4.1.0)
 R6                     2.5.0    2020-10-28 [1] RSPM (R 4.1.0)
 Rcpp                   1.0.7    2021-07-07 [1] RSPM (R 4.1.0)
 RCurl                  1.98-1.3 2021-03-16 [1] RSPM (R 4.1.0)
 readr                * 2.0.0    2021-07-20 [1] RSPM (R 4.1.0)
 readxl                 1.3.1    2019-03-13 [1] RSPM (R 4.1.0)
 reprex                 2.0.0    2021-04-02 [1] RSPM (R 4.1.0)
 restfulr               0.0.13   2017-08-06 [1] RSPM (R 4.1.0)
 rjson                  0.2.20   2018-06-08 [1] RSPM (R 4.1.0)
 rlang                  0.4.11   2021-04-30 [1] RSPM (R 4.1.0)
 rmarkdown              2.9      2021-06-15 [1] RSPM (R 4.1.0)
 Rsamtools              2.9.1    2021-06-17 [1] Bioconductor  
 rstudioapi             0.13     2020-11-12 [1] RSPM (R 4.1.0)
 rtracklayer            1.53.0   2021-05-19 [1] Bioconductor  
 rvest                  1.0.1    2021-07-26 [1] RSPM (R 4.1.0)
 S4Vectors            * 0.31.0   2021-05-19 [1] Bioconductor  
 scales                 1.1.1    2020-05-11 [1] RSPM (R 4.1.0)
 sessioninfo            1.1.1    2018-11-05 [1] RSPM (R 4.1.0)
 stringi                1.7.3    2021-07-16 [1] RSPM (R 4.1.0)
 stringr              * 1.4.0    2019-02-10 [1] RSPM (R 4.1.0)
 SummarizedExperiment   1.23.1   2021-06-24 [1] Bioconductor  
 tibble               * 3.1.3    2021-07-23 [1] RSPM (R 4.1.0)
 tidyr                * 1.1.3    2021-03-03 [1] RSPM (R 4.1.0)
 tidyselect             1.1.1    2021-04-30 [1] RSPM (R 4.1.0)
 tidyverse            * 1.3.1    2021-04-15 [1] RSPM (R 4.1.0)
 tzdb                   0.1.2    2021-07-20 [1] RSPM (R 4.1.0)
 utf8                   1.2.2    2021-07-24 [1] RSPM (R 4.1.0)
 vctrs                  0.3.8    2021-04-29 [1] RSPM (R 4.1.0)
 vroom                * 1.5.3    2021-07-14 [1] RSPM (R 4.1.0)
 withr                  2.4.2    2021-04-18 [1] RSPM (R 4.1.0)
 xfun                   0.24     2021-06-15 [1] RSPM (R 4.1.0)
 XML                    3.99-0.6 2021-03-16 [1] RSPM (R 4.1.0)
 xml2                   1.3.2    2020-04-23 [1] RSPM (R 4.1.0)
 XVector                0.33.0   2021-05-19 [1] Bioconductor  
 yaml                   2.2.1    2020-02-01 [1] RSPM (R 4.1.0)
 zlibbioc               1.39.0   2021-05-19 [1] Bioconductor  

[1] /usr/local/lib/R/site-library
[2] /usr/local/lib/R/library

The output of sessioninfo::session_info() includes relevant GitHub installation information and other details that are missed by sessionInfo().

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

1 participant