copyCat icon indicating copy to clipboard operation
copyCat copied to clipboard

Suggestion for warning if invalid annotation directory is passed

Open zlskidmore opened this issue 7 years ago • 2 comments

If an incorrect annotation dir is given the getAnnoDir() function will first attempt to see if an ideal directory exist, if it doesn't it will look for additional directories annodir/readlength.* however if no readlength.* is present the code will fail with an uninformative error message along the lines of:

Error in dirs - readlength : non-numeric argument to binary operator

The offending line of code is: https://github.com/chrisamiller/copyCat/blob/1bbbf5b0bdf9d7e5f2977687607b22143e79f01e/R/functions.R#L451

and occurs because dirs is an empty list. It might be helpfull to add a line of code before this checking that annodir/readlength exists

zlskidmore avatar Oct 12 '18 20:10 zlskidmore

I'll add it to my list - PRs welcome! ;)

chrisamiller avatar Oct 12 '18 20:10 chrisamiller

sounds good! more of a note more than anything but happy to make a PR

zlskidmore avatar Oct 12 '18 20:10 zlskidmore