camwebb / phylomatic-ws

Improved web service for phylomatic
10 stars 1 forks source link

Why failure on taxa too big when using locally? #3

Closed sckott closed 8 years ago

sckott commented 8 years ago

Using this tool locally on my machine, and when passing in a long list of taxa (using slashpath format), in one example passed in 6000 taxa, and got out Trees/taxa lists over 200kB must be passed by URI - I assume this means the taxauri parameter?

However, it doesn't seem to make sense to then require a taxa list to be stored in a file on the web when using locally. Could taxauri just be a file path?

camwebb commented 8 years ago

Hi Scott - The app is definitely a webservice that can also be run locally. If people use it locally (clearly now at least one person does!) we could make it dual purpose. For the moment, please just disable the size test. I just pushed a change with the location flagged.

sckott commented 8 years ago

thanks Cam. Note that these lines https://github.com/camwebb/phylomatic-ws/blob/master/lib/phylomatic.awk#L15-L16 also cause a problem with long taxa lists, so I had to comment those out as well for it to work

I'm interested in letting users use this locally from within R - I have a package for interacting with your webservice, but doesn't work for large taxon lists. There's no clean way to bind to awk scripts in R, so I just need to get users to download this repo, then my package can take care of the rest.

Works nicely though after https://github.com/camwebb/phylomatic-ws/blob/master/pmws#L49-L50 and https://github.com/camwebb/phylomatic-ws/blob/master/lib/phylomatic.awk#L15-L16 commented out

Any chance you could allow passing option to the pmws script to toggle those two checks? e.g., --local wherein those checks aren't run

sckott commented 8 years ago

If there's not a flag to toggle, i'd need to comment out those lines programatically after the user downloads this repo, which is kinda messy - but of course I don't want to ask you to make a change that's annoying to you

camwebb commented 8 years ago

Added a 'local' switch. Call by sending ...&local=1&... as part of the query string. Check the code (same two places) to make sure it's doing what you want.

sckott commented 8 years ago

Thanks, will do

sckott commented 8 years ago

I'm still getting the error Trees/taxa lists over 200kB must be passed by URI on large trees, the eg I tried had 6000 taxa

camwebb commented 8 years ago

Hmm.

awk code is dead easy. Can you try to diagnose/fix this matter? No time right now, or for ~4 days.

sckott commented 8 years ago

awk code is dead easy

not when you don't really use awk :) I tried, can't figure it out, i cant figure out where variables are coming from and how e.g., ! should behave when given a number (you said to use local=1)

i'll try again later perhaps

camwebb commented 8 years ago

Fixed. I hope.

sckott commented 8 years ago

thx, i'll give it a spin

sckott commented 8 years ago

works nicely, thanks!