-
Notifications
You must be signed in to change notification settings - Fork 0
Review cdhit_wrapper.R and reduce_sequence.R #25
Comments
I tried running your script without optparse installed. |
Tried breaking the script further but everything seems fine. |
Quick and easy! |
While checking reduce_sequence.R I found a few more things.
Is it possible to throw an error instead of a warning? Edit: Going to do the review on reduce_sequence.R on this issue. Should be easier for you. |
One example: if (motif_occurrence <= 0) {
stop("Motif_occurrence must be a numeric value above 0!")
} You should/could check if motif _occurrence is numeric. ("asdasdasdfasf" <= 0) equals false Would be solved by changing the Warnings from optparse to errors (if possible). If not you should check every parameter on its type at the beginning of the script. |
So far I haven't found an optparse solution for this. And I also cannot suppress the type warning. In fact at least for cdhit_wrapper.R and all it's cdhit related arguments I would say this isn't necessary as cdhit aborts with an error message. (Also it would be really cumbersome to add all those checks.) For all the other parameter I agree there should be at least a type check. What do you think should I add argument checks only for arguments that are not forwarded to tools or to everything? |
It should be enough to do it only for the arguments, which are not forwarded to the tools. |
Code:
Functionality:
The text was updated successfully, but these errors were encountered: