Christian,
I finished a round of changes to the subscript replacement operators in IRanges, which will be available on bioconductor.org in BioC 2.5 after the Wednesday builds have been pushed, and I should be able to meet your needs. Just to be sure, can you provide a larger context what what operation you are trying to perform? Some questions I have are:

1) What is the class and content of the replacement value?
2) How many columns in the RangedData values table are you looking to replace? 3) What determines which rows within each of the spaces you are looking to replace?

If you provide me with this information, I can let you know what the most efficient way you can perform the replacement. Some example subset replacement operations in place are:

values(x)[[i]][[j]] <- value # replace the jth column in the ith space with value values(x)[[i]][k,j] <- value # replace the (k,j) selection in the ith space with value values(x)[,j] <- value # replace columns denoted by j across all the spaces with value values(x)[i,j] <- value # using LogicalList, IntegerList, or RangesList i, replace the selected rows within each of the spaces for columns denoted by j with value

What I'm not sure of at this point is how flexible I should allow the replacement value to be. Your feedback would be very helpful.


Cheers,
Patrick



Patrick Aboyoun wrote:
Christian,
Thanks for bringing this issue up. I have been meaning to improve the subscript replacement functions in IRanges for some time and this gives me a reason to make some improvements now. I need to put some testing infrastructure in place to ensure the software is behaving as expected, but the current solution I am working on for your problem would look like

values(x)[[i]][[j]] <- value    # set the jth column in the ith space

As this operation shows, I am working on the values table of the RangedData object and not the whole object. This will complement the current method of selecting the jth column in the ith space

values(x)[[i]][[j]]    # get the jth column in the ith space

I'll let you know when this enhancement has been check-in.


Patrick



Christian Ruckert wrote:
I am missing a method to update only specific spaces of a RangedData object.

Let 'x' be a 'RangedData' object.

The two existing methods are:

'x[i]': Subsets 'x' by indexing into its spaces, so the result is
          of the same class, with a different set of spaces.

'x[[j]] <- value': Sets value as column 'j' in 'x', where 'j' can
          be a character, numeric, or logical scalar that indexes into
          the columns. The length of 'value' should equal 'nrow(x)'.

I am looking for a mixture of both, something like:

x[i][[j]] <- value

which actually doesn't work this way.

Any help would be appreciated,
Christian

_______________________________________________
Bioc-sig-sequencing mailing list
[email protected]
https://stat.ethz.ch/mailman/listinfo/bioc-sig-sequencing

_______________________________________________
Bioc-sig-sequencing mailing list
[email protected]
https://stat.ethz.ch/mailman/listinfo/bioc-sig-sequencing

_______________________________________________
Bioc-sig-sequencing mailing list
[email protected]
https://stat.ethz.ch/mailman/listinfo/bioc-sig-sequencing

Reply via email to