本文整理匯總了Java中com.google.genomics.v1.Reference.getName方法的典型用法代碼示例。如果您正苦於以下問題:Java Reference.getName方法的具體用法?Java Reference.getName怎麽用?Java Reference.getName使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在類com.google.genomics.v1.Reference
的用法示例。
在下文中一共展示了Reference.getName方法的1個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的Java代碼示例。
示例1: getReferences
import com.google.genomics.v1.Reference; //導入方法依賴的package包/類
private static List<ReferenceInfo> getReferences(Channel channel, ReadGroupSet readGroupSet) {
Set<String> referenceSetIds = Sets.newHashSet();
if (readGroupSet.getReferenceSetId() != null && !readGroupSet.getReferenceSetId().isEmpty()) {
LOG.fine("Found reference set from read group set " +
readGroupSet.getReferenceSetId());
referenceSetIds.add(readGroupSet.getReferenceSetId());
}
if (readGroupSet.getReadGroupsCount() > 0) {
LOG.fine("Found read groups");
for (ReadGroup readGroup : readGroupSet.getReadGroupsList()) {
if (readGroup.getReferenceSetId() != null && !readGroup.getReferenceSetId().isEmpty()) {
LOG.fine("Found reference set from read group: " +
readGroup.getReferenceSetId());
referenceSetIds.add(readGroup.getReferenceSetId());
}
}
}
ReferenceServiceV1BlockingStub referenceSetStub =
ReferenceServiceV1Grpc.newBlockingStub(channel);
List<ReferenceInfo> references = Lists.newArrayList();
for (String referenceSetId : referenceSetIds) {
LOG.fine("Getting reference set " + referenceSetId);
GetReferenceSetRequest getReferenceSetRequest = GetReferenceSetRequest
.newBuilder().setReferenceSetId(referenceSetId).build();
ReferenceSet referenceSet =
referenceSetStub.getReferenceSet(getReferenceSetRequest);
if (referenceSet == null || referenceSet.getReferenceIdsCount() == 0) {
continue;
}
for (String referenceId : referenceSet.getReferenceIdsList()) {
LOG.fine("Getting reference " + referenceId);
GetReferenceRequest getReferenceRequest = GetReferenceRequest
.newBuilder().setReferenceId(referenceId).build();
Reference reference = referenceSetStub.getReference(getReferenceRequest);
if (reference.getName() != null && !reference.getName().isEmpty()) {
references.add(new ReferenceInfo(reference, referenceSet));
LOG.fine("Adding reference " + reference.getName());
}
}
}
return references;
}