public static List < String > getVariantSetIds ( String datasetId , OfflineAuth auth ) throws IOException { List < String > output = Lists . newArrayList ( ) ; Genomics genomics = GenomicsFactory . builder ( ) . build ( ) . fromOfflineAuth ( auth ) ; Iterable < VariantSet > vs = Paginator . Variantsets . create ( genomics ) . search ( new SearchVariantSetsRequest ( ) . setDatasetIds ( Lists . newArrayList ( datasetId ) ) , "variantSets(id),nextPageToken" ) ; for ( VariantSet v : vs ) { output . add ( v . getId ( ) ) ; } if ( output . isEmpty ( ) ) { throw new IOException ( "Dataset " + datasetId + " does not contain any VariantSets" ) ; } return output ; }
Gets VariantSetIds from a given datasetId using the Genomics API .