GenomeHubs
  • Introduction
  • Introduction
    • GenomeHubs
    • Files and containers
    • Demo
  • Quick Start
    • 1. Prepare
    • 2. Setup MySQL database server
    • (optional) Test Ensembl browser
    • 3. Import assembly and gene models
    • 4. Export files
    • 5. Run analyses
    • 6. Import analysis results
    • 7. Update meta
    • 8. Start download site
    • 9. Start BLAST server
    • 10. Start search container
    • 11. Edit Ensembl plugin
    • 12. Start Ensembl browser
  • Next Steps
    • Setup with multiple hosts
    • Understand the GFF parser
    • Import additional assemblies
    • Run comparative analyses
    • Import variation data
    • Add track hubs
    • Connect using Perl API
    • Set up REST API
Powered by GitBook
On this page

Was this helpful?

  1. Next Steps

Connect using Perl API

PreviousAdd track hubsNextSet up REST API

Last updated 4 years ago

Was this helpful?

The EasyImport container can be used to run scripts to query databases programmatically. To do this, mount a directory containing your API script onto an EasyImport container and run the script by passing a perl command after the container image name:

Create a hub.txt file with a description of the data available in the track hub:

$ docker run --rm \
             -u $UID:$GROUPS \
             --name perl-api-exampl \
             --link genomehubs-mysql \
             -v /pat/to/api/srcipt/dir:/import/api/scripts \
             genomehubs/easy-import:17.03 \
             perl /import/api/scripts/example-api-script.pl
$ docker run --rm \
             -u $UID:$GROUPS \
             --name perl-api-exampl \
             --link genomehubs-mysql \
             -v /pat/to/api/srcipt/dir:/import/api/scripts \
             genomehubs/easy-import:17.06 \
             perl /import/api/scripts/example-api-script.pl
Ensembl API