[Bioc-devel] RangedData objects deprecated

Vincent Carey @tvjc @end|ng |rom ch@nn|ng@h@rv@rd@edu
Thu Dec 5 02:39:53 CET 2019


The RangedData objects are still viable with the software you are using,
but trying
to set colnames will trigger an error.  In Bioc 3.11 you won't even be able
to use
the RangedData class at all.  So an intervention is needed now.

The RangedData objects that were serialized or created in your workflow
should
be converted to GRanges or GRangesList as appropriate, using as(...,
"GRanges")

Code that attempts to set the column names can be changed to use
colnames(mcols(...))

The ichorCNA package man pages don't include examples and I see no example
data with the package.

You might get a sense of what needs to be done in the following.

library(GenomicRanges)

ranges <- IRanges(c(1,2,3),c(4,5,6))

filter <- c(1L, 0L, 1L)

score <- c(10L, 2L, NA)


## constructing RangedData instances

## no variables

rd <- RangedData(ranges, filter, vals = score) # will not work at all

                           # in Bioc 3.11

gr = as(rd, "GRanges")

colnames(mcols(gr))




On Wed, Dec 4, 2019 at 7:34 PM Brent O'Carrigan <
Brent.OCarrigan using cruk.cam.ac.uk> wrote:

> Dear Bioc devel team,
>
> Can you advise how to amend the following code to update references to
> RangedData objects?
>
> I’m running the Broad ichorCNA, which had a similar issue described in the
> package internal code, which I gather has been addressed
> https://github.com/broadinstitute/ichorCNA/issues/50
>
> A colleague has written a wrapper script in part of our shared pipeline,
> which I think was under R 3.5.3, and I think the RangedData references in
> this script may need updating  - which I have not been able to do.
>
> Kind regards,
>
> Dr Brent O'Carrigan
> Clinical Research Training Fellow | PhD candidate
> CRUK Cambridge Institute | Caldas Group
> Li Ka Shing Centre, Robinson Way, Cambridge, CB2 0RE
> E: Brent.OCarrigan using cruk.cam.ac.uk<mailto:Brent.OCarrigan using cruk.cam.ac.uk>
> | T: (+44) 01223 769500
>
> > source('make.ichor.summary.R')
> data.table 1.12.6 using 10 threads (see ?getDTthreads).  Latest news:
> r-datatable.com
> Loading required package: HMMcopy
> Loading required package: IRanges
> Loading required package: BiocGenerics
> Loading required package: parallel
>
> Attaching package: ‘BiocGenerics’
>
> The following objects are masked from ‘package:parallel’:
>
>     clusterApply, clusterApplyLB, clusterCall, clusterEvalQ,
>     clusterExport, clusterMap, parApply, parCapply, parLapply,
>     parLapplyLB, parRapply, parSapply, parSapplyLB
>
> The following objects are masked from ‘package:stats’:
>
>     IQR, mad, sd, var, xtabs
>
> The following objects are masked from ‘package:base’:
>
>     anyDuplicated, append, as.data.frame, basename, cbind, colnames,
>     dirname, do.call, duplicated, eval, evalq, Filter, Find, get, grep,
>     grepl, intersect, is.unsorted, lapply, Map, mapply, match, mget,
>     order, paste, pmax, pmax.int, pmin, pmin.int, Position, rank,
>     rbind, Reduce, rownames, sapply, setdiff, sort, table, tapply,
>     union, unique, unsplit, which, which.max, which.min
>
> Loading required package: S4Vectors
> Loading required package: stats4
>
> Attaching package: ‘S4Vectors’
>
> The following objects are masked from ‘package:data.table’:
>
>     first, second
>
> The following object is masked from ‘package:base’:
>
>     expand.grid
>
>
> Attaching package: ‘IRanges’
>
> The following object is masked from ‘package:data.table’:
>
>     shift
>
> Loading required package: geneplotter
> Loading required package: Biobase
> Welcome to Bioconductor
>
>     Vignettes contain introductory material; view with
>     'browseVignettes()'. To cite Bioconductor, see
>     'citation("Biobase")', and for packages 'citation("pkgname")'.
>
> Loading required package: lattice
> Loading required package: annotate
> Loading required package: AnnotationDbi
> Loading required package: XML
> Loading required package: ichorCNA
>
> Attaching package: ‘ichorCNA’
>
> The following object is masked from ‘package:HMMcopy’:
>
>     HMMsegment
>
> Loading required package: GenomicRanges
> Loading required package: GenomeInfoDb
> [1] "./ichor/ichor.default/raw/041V10.sorted.dedupped.RDS"
> [1] "Running ichorCNA"
> Error: RangedData objects are deprecated and the colnames setter for
>   RangedData objects is now defunct. Please migrate your code to use
>   GRanges or GRangesList objects instead. See IMPORTANT NOTE in
>   ?RangedData
> In addition: Warning messages:
> 1:   RangedData objects are deprecated. Please migrate your code to use
>   GRanges or GRangesList objects instead. See IMPORTANT NOTE in
>   ?RangedData
> 2:   RangedData objects are deprecated. Please migrate your code to use
>   GRanges or GRangesList objects instead. See IMPORTANT NOTE in
>   ?RangedData
> 3:   RangedData objects are deprecated. Please migrate your code to use
>   GRanges or GRangesList objects instead. See IMPORTANT NOTE in
>   ?RangedData
> 4:   RangedData objects are deprecated. Please migrate your code to use
>   GRanges or GRangesList objects instead. See IMPORTANT NOTE in
>   ?RangedData
> 5:   RangedData objects are deprecated. Please migrate your code to use
>   GRanges or GRangesList objects instead. See IMPORTANT NOTE in
>   ?RangedData
> 6:   RangedData objects are deprecated. Please migrate your code to use
>   GRanges or GRangesList objects instead. See IMPORTANT NOTE in
>   ?RangedData
> 7:   RangedData objects are deprecated. Please migrate your code to use
>   GRanges or GRangesList objects instead. See IMPORTANT NOTE in
>   ?RangedData
> 8:   RangedData objects are deprecated. Please migrate your code to use
>   GRanges or GRangesList objects instead. See IMPORTANT NOTE in
>   ?RangedData
>
>
> > sessionInfo()
> R version 3.6.1 (2019-07-05)
> Platform: x86_64-pc-linux-gnu (64-bit)
> Running under: CentOS Linux 7 (Core)
>
> Matrix products: default
> BLAS:   /home/bioinformatics/software/R/R-3.6.1/lib64/R/lib/libRblas.so
> LAPACK: /home/bioinformatics/software/R/R-3.6.1/lib64/R/lib/libRlapack.so
>
> locale:
> [1] LC_CTYPE=en_GB.UTF-8       LC_NUMERIC=C
>  [3] LC_TIME=en_GB.UTF-8        LC_COLLATE=en_GB.UTF-8
>  [5] LC_MONETARY=en_GB.UTF-8    LC_MESSAGES=en_GB.UTF-8
>  [7] LC_PAPER=en_GB.UTF-8       LC_NAME=C
>  [9] LC_ADDRESS=C               LC_TELEPHONE=C
> [11] LC_MEASUREMENT=en_GB.UTF-8 LC_IDENTIFICATION=C
>
> attached base packages:
> [1] stats4    parallel  stats     graphics  grDevices utils     datasets
> [8] methods   base
>
> other attached packages:
> [1] GenomicRanges_1.38.0 GenomeInfoDb_1.22.0  ichorCNA_0.3.2
>  [4] HMMcopy_1.26.0       geneplotter_1.64.0   annotate_1.64.0
>  [7] XML_3.98-1.20        AnnotationDbi_1.48.0 lattice_0.20-38
> [10] Biobase_2.46.0       IRanges_2.20.0       S4Vectors_0.24.0
> [13] BiocGenerics_0.32.0  data.table_1.12.6
>
> loaded via a namespace (and not attached):
> [1] Rcpp_1.0.3             pillar_1.4.2           compiler_3.6.1
>  [4] RColorBrewer_1.1-2     plyr_1.8.4             XVector_0.26.0
>  [7] zlibbioc_1.32.0        bitops_1.0-6           zeallot_0.1.0
> [10] digest_0.6.23          bit_1.1-14             RSQLite_2.1.3
> [13] memoise_1.1.0          tibble_2.1.3           pkgconfig_2.0.3
> [16] rlang_0.4.2            DBI_1.0.0              GenomeInfoDbData_1.2.2
> [19] vctrs_0.2.0            bit64_0.9-7            grid_3.6.1
> [22] blob_1.2.0             backports_1.1.5        xtable_1.8-4
> [25] RCurl_1.95-4.12        crayon_1.3.4
>
>
>
> _______________________________________________
> Bioc-devel using r-project.org mailing list
> https://stat.ethz.ch/mailman/listinfo/bioc-devel
>

-- 
The information in this e-mail is intended only for the ...{{dropped:18}}



More information about the Bioc-devel mailing list