-
Notifications
You must be signed in to change notification settings - Fork 1
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
function saveXML error #6
Comments
Thanks for the reproducible bug report. It seems to be working for me. Here is what I ran. What versions of paxtoolsr and XML are you running?
|
I have this : Matrix products: default locale: attached base packages: other attached packages: loaded via a namespace (and not attached): When i try your code i get this :
|
I also noticed that this error appear when i try to get BioPax from Reactome and SMPDB, it works with Panther and PathwaysCommon |
I updated my XML package (XML_3.99-0.3) without new problems and I don't think my small update to paxtoolsr would have affected XML. This is a strange error because getPc() should give you an XML package object so saving it shouldn't be a problem. Can you do any of the above to try to see what is in the variable returned from getPc?
|
The issue is the same, as i have an error with getPc it doesn't create the xml variable, so the rest of the code doesn't work either.. |
What about this? The package functions do various routine things to generate the link below and then read in the XML. Below we get to the main thing that happens.
|
It worked ! I think i understood where the issue was, the biopax file contained a lot of european chars (à,é,è) so i had to remove them to make the function toSif work. So I just have to change the Reactome identifier in the url of the GET function if i want to do some analysis with an other pathway ? |
Short answer: Okay. Yes, you can change the URL and only use the parts of paxtoolsr that you need. Ultimately, paxtoolsr functions are a set of "opinions" and "helpers" for how to best use the underlying API that you are accessing with that URL within R. Longer answer: Can you paste the "bad" XML you get as a Gist (https://gist.github.com/)? There might be a simple solution for Windows, but I don't have easy access to a Windows machine. It might be as easy as an additional parameter I need to add to one function. |
Hello, |
Thanks. What do you see if you run this: Sys.getlocale('LC_CTYPE') for me, the return value is "en_US.UTF-8" Does this message about parsing XML in R with non-Latin characters help? https://stackoverflow.com/questions/38612603/encoding-issue-when-parsing-xml-in-r for the original getPc command? Here is more information on locales: https://www.rdocumentation.org/packages/base/versions/3.6.2/topics/locales |
I got this :
The function "stringi::stri_conv()" didn't help, and when i try to use Sys.setlocale('LC_CTYPE', 'en_US.UTF-8) there's a warning... |
If it helps, i used this : iconv(text, from = 'UTF-8', to = 'ASCII//TRANSLIT') and it seems to fix most characters issues ! I use to get that mistake thought (independant i think) :
Is that a problem ? I get sif files even with this issue. |
Hello,
When trying to get Biopax file of the pathway R-HSA-1369062 i got this error :
`
The text was updated successfully, but these errors were encountered: