This is a test version of Biostars. For the public version, visit https://www.biostars.org.
Are there services/java libs I can use to upload files automatically for UCSC display?

I want to create a script that lets users get pdfs of a bunch of regions from the UCSC genome browser.

I want to allow users to give custom bigwigs as arguments on the command line and have them displayed by UCSC. Problem is, the bigwigs need to be stored online somewhere. Therefore I want to upload them programmatically for the user.

Are there services that lets me do this easily, preferably with a java library (I am using clojure)?

java ucsc genome browser

If you have a Galaxy instance then it can do this. You then don't need to deal with anything else yourself.

Thanks for your answer.

I do not know galaxy yet. What exactly described above can a galaxy instance help with? Upload files for me or get a bunch of pdfs from UCSC?

And I want to make it easy for other users to use too, so something that does not require galaxy would be nice.

It allows users to upload files to a place you control (and therefore provide space for) and then view the files remotely in UCSC. They can do this with other file types, like BAM files too and aren't limited to just UCSC (they can also use IGV and similar desktop genome browsers with their files in Galaxy).

2 answers

If you're willing to use Python, you could use my soda.py script, which creates a folder of PDF-formatted browser shots from a UCSC browser instance. Ultimately, its purpose is to make a PNG-based web gallery from those PDFs, but you could modify your copy to exit after making all the PDFs, or just use the subfolder containing the PDFs. Cf. https://github.com/alexpreynolds/soda

Neat. Did not know you could set psOutput in the link.

Yes. soda.py also has some annotation options that place an interval rectangle underneath the PDF output. This highlights the input intervals in each plot, without having to create a track hub or upload tracks to the UCSC browser instance.

trackhub (https://github.com/daler/trackhub) doesn't do the PDF snapshots, but you can use it for configuring and setting up the bigWigs into a UCSC track hub (Python 2.7-only due to the dependency on fabric).

Nice. I guess you do more with fabric than just subprocess.call("scp ...", shell=True)

Log in to answer this question.