Skip to content

Commit

Permalink
Remove obsolete references to Google Genomics API (#1858)
Browse files Browse the repository at this point in the history
* The Google Genomics API was turned off years ago. This removes a global
argument (GA4GH_CLIENT_SECRETS) which was used with it and several initialization
steps in CommandLineProgram which are no longer meaningful.
  • Loading branch information
lbergelson authored Feb 9, 2023
1 parent 54eb14a commit 7ff09b8
Showing 1 changed file with 0 additions and 20 deletions.
20 changes: 0 additions & 20 deletions src/main/java/picard/cmdline/CommandLineProgram.java
Original file line number Diff line number Diff line change
Expand Up @@ -131,9 +131,6 @@ public abstract class CommandLineProgram {
// after argument parsing using the value established by the user in the referenceSequence argument collection.
protected File REFERENCE_SEQUENCE = Defaults.REFERENCE_FASTA;

@Argument(doc="Google Genomics API client_secrets.json file path.", common = true)
public String GA4GH_CLIENT_SECRETS="client_secrets.json";

@ArgumentCollection(doc="Special Arguments that have meaning to the argument parsing system. " +
"It is unlikely these will ever need to be accessed by the command line program")
public Object specialArgumentsCollection = useLegacyParser() ?
Expand All @@ -148,20 +145,6 @@ public abstract class CommandLineProgram {

private static final String[] PACKAGES_WITH_WEB_DOCUMENTATION = {"picard"};

static {
// Register custom reader factory for reading data from Google Genomics
// implementation of GA4GH API.
// With this it will be possible to pass these urls as INPUT params.
// E.g. java -jar dist/picard.jar ViewSam \
// INPUT=https://www.googleapis.com/genomics/v1beta2/readgroupsets/CK256frpGBD44IWHwLP22R4/ \
// GA4GH_CLIENT_SECRETS=../client_secrets.json
if (System.getProperty("samjdk.custom_reader") == null) {
System.setProperty("samjdk.custom_reader",
"https://www.googleapis.com/genomics," +
"com.google.cloud.genomics.gatk.htsjdk.GA4GHReaderFactory");
}
}

/**
* Initialized in parseArgs. Subclasses may want to access this to do their
* own validation, and then print usage using commandLineParser.
Expand Down Expand Up @@ -235,9 +218,6 @@ public int instanceMain(final String[] argv) {
this.defaultHeaders.add(new StringHeader("Started on: " + startDate));

Log.setGlobalLogLevel(VERBOSITY);
if (System.getProperty("ga4gh.client_secrets") == null) {
System.setProperty("ga4gh.client_secrets", GA4GH_CLIENT_SECRETS);
}
SamReaderFactory.setDefaultValidationStringency(VALIDATION_STRINGENCY);

// Set the compression level everywhere we can think of
Expand Down

0 comments on commit 7ff09b8

Please sign in to comment.