Closed rareaquaticbadger closed 8 years ago
Happy to take on 5, 11 and 14.
Re 6: I'd be inclined to do what the reviewer said -- setClass("ChrTable", contains="GRanges")
. The only trick would be ensuring that it stays a ChrTable object whenever it's returned from methods (since, unless we define the various subset operators, they'll turn it back into a GRanges).
Re: 10: This is my reading as well. I think the only reason we had those as separate functions was because they were used more than once, but if they are only called from one place, and we're not exporting them, then there's no reason not to just roll them into the main function.
I can possibly have a go at 13; on the one hand it's pretty simple to just replace data.frame
with matrix
, but on the other hand it may break things all over the place.
UPDATE from latest pull request. (REMOVED CLOSED ISSUES FROM PREVIOUS MESSAGE)
biocLite("BiocCheck")
, R CMD BiocCheck contiBAIT_0.99.0.tar.gz
suggests import'ing grDevices::pdf, grDevices::dev.off, stats::runif.
STATUS- OPENnew()
directly.
STATUS- OPEN KIERAN TO DOChrTable
class looks like a GRanges()
; why not re-use it, perhaps as a simple extension setClass("ChrTable", contains="GRanges")
?
STATUS- OPEN. Will do once constructors (item 5) completeseq_len(N)
or seq_along(x)
instead of 1:N or 1:length(x), to
avoid problems when N or length(x) == 0.
STATUS- CLOSED. See latest pull requestmatrix()
instead of `data.frame()'
STATUS- OPENHi Kieran,
Great that you're taking on the constructrs, copy&append of clusterContig list and using biocParallel.
I'm going to try and fix plotIdeogram, then tackle remaking a ChrTable object, and if I have time I'll play around with matrix() forms of our current data.frames. I agree that the behaviour of a matrix may screw up downstream code, but it's probably worth a check. Who knows, R might surprise us and it'll work first time for a change!
I plan to create pull requests for each, so hopefully you won't be inundated. The only potential conflict might be the ChrTable object while you're working on constructors, but I think it'll be fine.
That only leaves the import of grDevices issue. Any ideas about that?
Hmmm ... just to warn you, I'm almost done with the BiocParallel thing (11), and it is requiring changes in a lot of files (including NAMESPACE and DESCRIPTION), so may require some merging.
It will also definitely break your analysis code, since I've standardised mergeContigs
, clusterContigs
and contiBAIT
to all accept a parameter called clusterParam, of type BiocParallelParam
. This is actually more powerful and allows for logging, so is better in the long run.
No problem. I can handle it.
I'm having issues with ChrTable classes at the moment though. I'm having the opposite problem of what you said. I made a class as suggested (setClass("ChrTable", contains="GRanges")
), but now every time something happens in GRanges (for example chrTable <- disjoin(chrTable)
, or append(chrTable, segs)
) I get an invalid class error, because GRanges wants an object of class GRanges, not ChrTable. Any fixes, or shall I just abandon making this new class?
I can't see where the build bug with ideogramPlot is happening. I've removed a line which I think is redundant, but other than that I don't see why it's not building in the reviewers hands. I'm running "Wooden Christmas Tree", which is the latest version of R. I might not have updated all my dependencies though. Will try that and see if I can recreate the error.
UPDATE from latest commits. (REMOVED CLOSED ISSUES FROM PREVIOUS MESSAGE)
biocLite("BiocCheck")
, R CMD BiocCheck contiBAIT_0.99.0.tar.gz
suggests import'ing grDevices::pdf, grDevices::dev.off, stats::runif.
STATUS- CLOSEDnew()
directly.
STATUS- OPEN KIERAN TO DOChrTable
class looks like a GRanges()
; why not re-use it, perhaps as a simple extension setClass("ChrTable", contains="GRanges")
?
STATUS- OPEN. Will do once constructors (item 5) completematrix()
instead of `data.frame()'
STATUS- OPENHmm ... I started working on constructors, then realised I should wait until you've converted the classes to using matrix()
, since that impacts on all the constructor (and class) code.
Or, rather, I can do all of the ones except the two data.frame()
based classes that need to change to matrices (StrandStateMatrix
and RawReadStrands
)
UPDATE from latest commits. (REMOVED CLOSED ISSUES FROM PREVIOUS MESSAGE)
new()
directly.
STATUS- HALF CLOSED done for non-data.frame
classes, waiting on 13 for remainderChrTable
class looks like a GRanges()
; why not re-use it, perhaps as a simple extension setClass("ChrTable", contains="GRanges")
?
STATUS- OPEN. Will do once constructors (item 5) completematrix()
instead of `data.frame()'
STATUS- OPENUPDATE from latest commits (please see pull request). (REMOVED CLOSED ISSUES FROM PREVIOUS MESSAGE)
And finished!
Thought it would be good to take stock of what needs to be done. Not sure if they should be separate issues or a list, but here goes:
new()
directly. STATUS- OPENChrTable
class looks like aGRanges()
; why not re-use it, perhaps as a simple extensionsetClass("ChrTable", contains="GRanges")
? STATUS- MOSTLY CLOSED. Keiran, should I keep this as a GRanges, or make a new class that incorporates GRanges? Not sure what the best approach is...setGeneric()
it's usually very desirable to limit dispatch to the arguments for which methods are defined with, e.g.,signature="strandTable"
. This avoids a combinatorial proliferation of implied methods. STATUS- CLOSEDseq_len(N)
orseq_along(x)
instead of 1:N or 1:length(x), to avoid problems when N or length(x) == 0. STATUS- OPEN.m Hope to finish this by the end of the dayclusNum = 1
, somakeCluster(clusNum)
makes a cluster of size 1. STATUS- CLOSEDmatrix()
instead of `data.frame()' STATUS- OPEN