"Illegal characters found in URL" in updated blastSequences
2
1
Entering edit mode
dansmaynard ▴ 10
@dansmaynard-12052
Last seen 8.0 years ago

I recently updated R and blastSequences. Now when running the script on multiple concatenated sequences, I get the error "Illegal characters found in URL". I've traced the error back to this line of the function: post <- htmlParse(getURL(url0, followlocation = TRUE)), which seems to have been modified with the inclusion of the getURL call to handle https. It looks as though the getURL function doesn't handle the \n character in the same way. Thoughts on how to fix this?

A quick way to reproduce the error:

> blastSequences(x = ">ID-1\nACATGCTA\n>ID-2\nAAACCACTT",as="data.frame")

Error in function (type, msg, asError = TRUE)  : 

  Illegal characters found in URL

 

For reference, I'm using R v 3.3.2, 64 bit on Ubuntu 16.04.1 LTS, and have Bioconductor 3.4 installed.

blastsequences getURL • 2.7k views
ADD COMMENT
0
Entering edit mode
dansmaynard ▴ 10
@dansmaynard-12052
Last seen 8.0 years ago

Found a workaround. If I wrap the sequence string with URLencode() and then pass this to blastSequences, everything works fine. That is:

> x = ">ID-1\nACATGCTA\n>ID-2\nAAACCACTT"

> blastSequences(x = URLencode(x),as="data.frame")

estimated response time 47 seconds

Success!

I think this could also be done by substituting %3E for the ">" symbols and %0A for the "\n" symbol when formatting the original sequence string, but just as easy to do this.

ADD COMMENT
0
Entering edit mode
@martin-morgan-1513
Last seen 5 months ago
United States

Thanks for the bug report. I added URLencode() to blastSequences, hopefully addressing your problem. This is in the release version 1.52.1 (devel version 1.53.1), which should be available in a couple of days via biocLite().

ADD COMMENT

Login before adding your answer.

Traffic: 548 users visited in the last hour
Help About
FAQ
Access RSS
API
Stats

Use of this site constitutes acceptance of our User Agreement and Privacy Policy.

Powered by the version 2.3.6