-
Notifications
You must be signed in to change notification settings - Fork 15
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Refactor Example Data: R-CMD check error #118
Comments
@jananiravi @the-mayer Can I be assigned to this issue? I want to give it a try. |
Sure, @Joiejoie1! |
Thanks @jananiravi |
@jananiravi @the-mayer This is how I intend to Refactor Example Data: R-CMD check error
reverseOperonSeq processes a data frame with a GenContext column, splits it and manipulates genomic context strings.
The error message (subscript out of bounds) suggests that ge is empty or not structured as expected at the lapply() call.
Insert print() statements before the problematic line (line 137) to output the contents of ge, te, and witheq: This will allow to see if ge is empty or incorrectly structured before it’s processed with lapply.
Execute the code in sections (or line by line) up to line 137 to isolate where ge might become empty or miss elements.
Define example input data and run it with reverseOperonSeq() to observe how it handles the input and where it fails. Use the example from the documentation:
Consider if certain patterns in the GenContext column could lead to "ge" becoming empty, such as missing certain characters or symbols.
If identified that ge can be empty, modify the code to handle this case before applying lapply(): if (length(ge) > 0) {
Save the modified file and run the code from start to finish to confirm that it executes without errors.
If the function works as expected, run devtools::check() to ensure the package passes R CMD check without errors. |
@jananiravi @the-mayer I have created a PR to this issue. |
An R-CMD check error occurs when running this example code for
reverseOperonSeq()
:Using the example data defined in
prot
the error occurs during the lapply operation @line 137 asge
has length 0 due to the previous subset operation.Originally posted by @the-mayer in #97 (comment)
The text was updated successfully, but these errors were encountered: