The GRanges class from Bioconductor provides for a optimized way to store sequence information and also extends the usage by accommodating further information if required, i.e. via mcols. But the restriction here is addition in terms of column-only format. What if I am looking to extend the profile of the GRanges object by including a character attribute. eg.
temp <- GRanges(seqnames= . . . , ranges = . . .)
temp$name <- "ABC"
Here I want to have a character variable (accessible from the object), name that holds some textual information. Would it be possible by overriding the constructor of GRanges or am I going too far with this.
Thanks in advance.
Best,
Shaurya.
Maybe you are looking for
metadata(temp)$name <- "ABC"
?