This is a test version of Biostars. For the public version, visit https://www.biostars.org.
Ucsc Genome Browser Automation: Command Line Scripting.

Hi,

I'm trying to write a command line script that sends a query to the Table Browser and retrieves the results, but I cannot trick the Table Browser making it think that I pressed the "get output" button (the submit type input at the end of the form). The page I get as HTTP response is not the result page, but the Table Browser page.

I've found this wiki, but it seems a bit outdated because adding this variables

submit=submit&hgta_doTopSubmit=1
to the POST request doesn't change the response I get.

Does some kind of "Genome Browser URL API", or other documented URL-method exists?

scripting genome ucsc

What type of data do you want to retrieve? UCSC has >200 tools to work with their data, so usually there is a command line tool...

3 answers

Does some kind of "Genome Browser URL API", or other documented URL-method exists?

Yes it's called, mysql

or DAS

:-)

Thanks, but what I'm trying to do is to eventually use all the options of the Table Browser (like intersection) just sending one or more HTTP request by a script.

It seems that DAS does not provide all the features I need.

Any other idea?

Thanks Pierre, but i was searching for a URL-based solution.

I found that [?]the link I posted in the question[?] was not outdated, its method actually works.

I was trying to send a POST request and I get back the Table Browser page, but if I send a GET request with those variables [?]submit=submit&hgta_doTopSubmit=1[?] it works with no problems.

Thank you anyway.

With curl you can send post variables with the -F argument.

See for details man curl:

curl -F "web=@index.html;type=text/html" url.com

Log in to answer this question.