GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — GitHub - johntbates/api-client-java: Provides a command line interface for API queries in Java.

BranchesTags
Open more actions menu
 
 

Latest commit

 

History

418 Commits
418 Commits

Folders and files

NameName
Last commit message
Last commit date
src
src
 
 
.gitignore
.gitignore
 
 
.travis.yml
.travis.yml
 
 
CONTRIBUTING.rst
CONTRIBUTING.rst
 
 
LICENSE
LICENSE
 
 
README.rst
README.rst
 
 
genomics-tools-client-java-v1beta.jar
genomics-tools-client-java-v1beta.jar
 
 
genomics-tools-client-java-v1beta2.jar
genomics-tools-client-java-v1beta2.jar
 
 
pom.xml
pom.xml
 
 

Repository files navigation

api-client-java Build Status Build Coverage

Getting started

This Java client allows users to call the Google Genomics API through the command line.

  • To use, first build the client using Apache Maven:

    cd api-client-java
    mvn package
    
  • Then, follow the sign up instructions to generate a valid client_secrets.json file.

  • Move the client_secrets.json file into the api-client-java directory. (Authentication will take place the first time you make an API call.)

  • You can then perform API queries like fetching readsets or reads:

    java -jar target/genomics-tools-client-java-v1beta2.jar searchreadgroupsets --dataset_id 10473108253681171589 --fields "readGroupSets(id,name)"
    
    java -jar target/genomics-tools-client-java-v1beta2.jar searchreads --id "CMvnhpKTFhD04eLE-q2yxnU" --reference_name 1 --start 10000 --end 10001
    

Troubleshooting

  • You can get a list of valid commands by running:

    java -jar target/genomics-tools-client-java-v1beta2.jar
    
  • Or get help on a specific command with:

    java -jar target/genomics-tools-client-java-v1beta2.jar searchreadgroupsets
    
  • If your environment isn’t capable of running a local server, and then seeing that server on localhost with a browser, then you can use the --nolocalserver flag to go back to the more manual auth process:

    java -jar target/genomics-tools-client-java-v1beta2.jar listjobs --nolocalserver
    
  • Note that not all of Google's APIs are callable at this time. The docs have a list of which APIs are available.

  • If you wish to call an API that has not yet been fully integrated into the command line, use the custom command.

Code layout

CommandLine.java:
sets up the command line options using the jcommander library.
GenomicsSample.java:
uses the GenomicsFactory from utils-java to set up a valid Genomics object. It then dispatches to one of the command classes to handle the user's request.
commands:
This directory contains one java file for each command line option, which translates the user's command line arguments into API calls.

Updating the prebuilt jar

The prebuilt jar is currently generated by hand, whenever the code seems stable and has enough new features to warrant the effort.

To update the jar, we use a different set of maven commands:

cd api-client-java
mvn clean
mvn assembly:assembly
cp target/genomics-tools-client-java-v1beta2-jar-with-dependencies.jar genomics-tools-client-java-v1beta2.jar

Project status

Goals

  • Provide a command line interface to the Google Genomics APIs (to make importing, querying, and other methods more accessible)
  • Provide an example of how to use the generated Java client library.

Current status

Please file feature requests for additional things the command line can do to make your life easier!

The mailing list

The Google Genomics Discuss mailing list is a good way to sync up with other people who use genomics-tools including the core developers. You can subscribe by sending an email to [email protected] or just post using the web forum page.

About

Provides a command line interface for API queries in Java.

Resources

Readme
Apache-2.0 license

Contributing

Contributing
Activity

Stars

0 stars

Watchers

1 watching

Forks

0 forks
Report repository

Releases

Packages

Contributors

Languages

You are visitor 01402503 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.