[Bioc-devel] 'GRangesList' does not keep metadata of items

Julian Gehring julian.gehring at embl.de
Mon Sep 2 09:38:28 CEST 2013


It seems to me that constructing a 'GRangesList' object containing 
'GRanges' with metadata does not keep the metadata.  As an example:

* Example 1

gr = GRanges()
metadata(gr) = list(a = "1")
metadata(gr) ## the metadata was stored
grl = GRangesList(gr, gr) ## put it in a 'GRangesList
metadata(grl[[1]]) ## no metadata anymore

Also, concaternating 'GRangesList's seem to keep them:

Example 2:

grl = GRangesList(gr, gr)
metadata(grl) = list(b = "2")
metadata(grl) ## it's there
grlc = c(grl, grl)
metadata(grlc) ## now it's gone

The second case would be hard to handle in a general way since it is not 
clear how to combine different metadata list.  However, the first case 
looks not like a expected behavior.

Best wishes

More information about the Bioc-devel mailing list