-
Notifications
You must be signed in to change notification settings - Fork 27
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
Rsamtools::indexTabix
: Capture console output
#32
Comments
Rsamtools::indexTabix
: Capture console output
These errors are written to C language 'stderr' but unfortunately this is not directly available within R. From the command line, on Linux, one could run a script
but probably your intention is something different. Previously, Rsamtools used a 'hack' to remap
This would have captured samtools errors as R warnings, but unfortunately this functionality was lost when we shifted to using Rhtslib quite some time ago; perhaps @hpages has additional comment. I don't think there's an easy way to capture what you'd like to do. |
Hi Martin, HTSlib uses a more sophisticated mechanism than Samtools for logging events: now everything goes thru the Note that Anyways, this new mechanism and its implementation differ substantially from the plain Ideas, suggestions, patches are welcome. Thanks, |
Personally I'm not planning to tweak Rhtslib to make the low-level C code in htslib spit output that is capturable from R but maybe someone else wants to give it a shot? If not, we can close this. Thanks, |
I recently posted an error I've been encountering with seqminer (here) but realized it seems to trace all the way back to tabix itself.
Regardless, in cases where I get the following kind of error...
...I'd like to wrap the function in a
tryCatch
and capture the messages so that I rerun it with the offending lines in theskip
argument. Something like:However, I can't seem to get the output into R. I've tried:
tryCatch
(above)capture.output
sink()
Do you know a way to extract this info?
Thanks,
Brian
Session info
The text was updated successfully, but these errors were encountered: