diff --git a/INSTALL.sh b/INSTALL.sh index 46f1088..f3ee7f6 100755 --- a/INSTALL.sh +++ b/INSTALL.sh @@ -30,6 +30,23 @@ fi sed -i 's#^FILE_PREFIX.*$#FILE_PREFIX = "/var/www"#' plotter/db.py sudo python setup.py install +if [ "$TRAVIS" = "true" ]; then + cd $TRAVIS_BUILD_DIR +else + cd +fi +mkdir kent +cd kent +if [ uname != "Darwin" ]; then + rsync -a -P rsync://hgdownload.soe.ucsc.edu/genome/admin/exe/linux.x86_64/bedToBigBed ./ + rsync -a -P rsync://hgdownload.soe.ucsc.edu/genome/admin/exe/linux.x86_64/bedGraphToBigWig ./ +else + rsync -a -P rsync://hgdownload.soe.ucsc.edu/genome/admin/exe/macOSX.x86_64/bedToBigBed ./ + rsync -a -P rsync://hgdownload.soe.ucsc.edu/genome/admin/exe/macOSX.x86_64/bedGraphToBigWig ./ +fi +sudo cp bedToBigBed /usr/local/bin/ +sudo cp bedGraphToBigWig /usr/local/bin/ + # for an apache web server sudo apt-get install apache2 libapache2-mod-wsgi cd /var/www diff --git a/plotter/__init__.py b/plotter/__init__.py index 8c0d03f..fd43e9d 100644 --- a/plotter/__init__.py +++ b/plotter/__init__.py @@ -29,6 +29,10 @@ def main(global_config, **settings): config.add_route('add_region', '/add_region/{name}/{chr}/{trackType}/{annotation}/{min}/{max}/') config.add_route("export","/export/{user}/{name}/{what}/{format}/") + config.add_route('trackhub_export', '/trackhub_init/') + config.add_route('trackhub_details', '/trackhub_details/{short_name}/') + config.add_route('trackhub_file', '/trackhub/{short_name}/*file') + config.add_route('trackhub_list', '/trackhub_list/') name_regex = db.HEADER_PATTERNS["name"] # config.add_route("secret","/secret/{name:%s}{suffix}"%name_regex) config.add_route("secret","/secret/{profile_name}/{name:%s}{suffix}"%name_regex) diff --git a/plotter/db.py b/plotter/db.py index b6703f7..c65b162 100644 --- a/plotter/db.py +++ b/plotter/db.py @@ -855,6 +855,20 @@ def process(self): # print time.time()-before, "seconds elapsed" +class Trackhub(Resource): + keys = ("short_name",) + + def make_details(self): + return {} + + +class UserTrackhubs(Resource): + keys = ("trackhubs",) + + def make_details(self): + return [] + + class Models(Resource): keys = ("name", "chr") diff --git a/plotter/templates/export_table.pt b/plotter/templates/export_table.pt new file mode 100644 index 0000000..cc7b6ab --- /dev/null +++ b/plotter/templates/export_table.pt @@ -0,0 +1,42 @@ +
| db | +Uploaded by | +on | +Probes | +Copy# | +Bkpt | +Annotations | +Segmentation | +Breakpoints | +Links | +||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| + + ${p.name} + + | ++ ${p.name} + | +${p.db} | ++ you [Delete] + | ++ ${p.uploader} + | +${p.uploaded_on.strftime("%d-%b-%Y")} | +${p.share} | +${p.probes} | +
+ ${p.copies}
+ |
+
+ ${p.breakpoints}
+ |
+ ||||