private String getReadsetCount(Genomics genomics, String datasetId) throws IOException {
SearchReadGroupSetsRequest readsetSearch = new SearchReadGroupSetsRequest()
.setDatasetIds(com.google.common.collect.Lists.newArrayList(datasetId))
.setPageSize(100);
SearchReadGroupSetsResponse readGroupSets = genomics.readgroupsets()
.search(readsetSearch).setFields("nextPageToken,readGroupSets(id)").execute();
if (readGroupSets.getReadGroupSets() == null) {
return "0";
}
if (Strings.isNullOrEmpty(readGroupSets.getNextPageToken())) {
return String.valueOf(readGroupSets.getReadGroupSets().size());
} else {
return "More than 100";
}
}