Hi folks, I'm working on a package that does some trivial GRanges position classifications; primarily to standardize nomenclature according to the literature in workflows.
The API for S4Vectors::Hits() generally doesn't seem amenable to modify Hits objects, except for the remapHits() feature (which I see underneath the covers really generates a new Hits object). I was hoping someone could take a quick look at a short function I'm using to subset and reindex Hits in the da_tss() function: https://github.com/coregenomics/nascentrna/blob/a2d9d10564c3a88759237b56ec49d0d3e73f6d16/R/classify.R#L70 Yes, to illustrate the problem I'm having, I've directly used the @-style S4 access which is, of course, a terrible thing to do because it defeats the purpose of S4 object validation, which is why I'm e-mailing the list for an alternative. I feel like casting to something like a data.frame, changing the indices, and changing back to Hits would be wasteful and improperly using the Bioconductor framework? Here are the corresponding tests that run the da_tss() function: https://github.com/coregenomics/nascentrna/blob/a2d9d10564c3a88759237b56ec49d0d3e73f6d16/tests/testthat/test-classifiers.R What it comes down to is this: I want to compare a subset of GRanges for hits, but revert to the original GRanges indices when returning the results. Thanks for any advice! Pariksheet [[alternative HTML version deleted]] _______________________________________________ Bioc-devel@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/bioc-devel