diff --git a/docs/npgraph.gif b/docs/npgraph.gif new file mode 100644 index 0000000..0fecbef Binary files /dev/null and b/docs/npgraph.gif differ diff --git a/docs/npgraph.md b/docs/npgraph.md index aab4783..cade03e 100644 --- a/docs/npgraph.md +++ b/docs/npgraph.md @@ -1,10 +1,8 @@ -# *npGraph* - Resolve assemblgraph in real-time using nanopore data +# *npGraph* - Resolve assembly graph in real-time using nanopore data This is another real-time scaffolder beside [npScarf](https://github.com/mdcao/npScarf). Instead of using contig sequences as pre-assemblies, this tool is able to work on assembly graph (from [SPAdes](http://cab.spbu.ru/software/spades/)). The batch algorithm has been implemented in hybrid assembler module of [Unicycler](https://github.com/rrwick/Unicycler) and others. -
- -
+![npGraph GUI](npgraph.gif) ## Introduction *npScarf* is the real-time hybrid assembler that use the stream of long reads to bridge the Illumina contigs together, expecting to give more complete genome sequences while the sequencing process is still ongoing. The pipeline has been applied sucessfully for microbial genomics and even bigger data sets. However, due to its greedy approach over the noisy data, it is difficult to eliminate all mis-assemblies without further pre-processing and parameter tuning. To help prevent this issue, the assembly graph - bulding block graph structure for the contigs - should be used as the source for bridging algorithm. @@ -83,7 +81,7 @@ More features would be added later to the GUI but it's not the focus of this pro All settings from the GUI can be set beforehand via commandline interface. Without using GUI, the mandatory inputs are assembly graph file (*-si*) and long-read data (*-li*). The assembly graph must be output from SPAdes in either FASTG or GFA format (normally *assembly_graph.fastg* or *assembly_graph.gfa*). -From new version of SPAdes, the output GFA file is *assembly_graph_with_scaffolds.gfa* which includes SPAdes path finding and scaffolding results. Sometimes, this might give additional mis-assemblies so the original graph of the building-block contigs (fastg file) is preferred. +From new version of SPAdes, the output GFA file is *assembly_graph_with_scaffolds.gfa* which includes SPAdes path finding and scaffolding results. Sometimes, this might give additional mis-assemblies so the original graph of the building-block contigs is preferred. The long-read data will be used for bridging and can be given as DNA sequences (FASTA/FASTQ format, possible .gz) or alignment records (SAM/BAM) as mentioned above. *npGraph* will try to guess the format of the inputs based on the extensions, but sometimes you'll have to specify it yourself (e.g. when "-" is provided to read from *stdin*). If the sequences are given, then it's mandatory to have either minimap2 (recommended) or BWA-MEM installed in your system to do the alignment between long reads and the pre-assemblies. @@ -96,7 +94,7 @@ or if the graph file is GFA v1 we can use ``` awk '/^S/{print ">"$2; print $3;}' assembly_graph.gfa | fold > assembly_graph.fasta ``` -Note that GFA file from SPAdes is preferred over FASTG since the former gives hint about the k-mer parameter and others, also it is becoming the standard for assembly graph that adapted by many other software. +Note that GFA format from SPAdes is preferred over FASTG since the former gives hint about the k-mer parameter and others, also it is becoming the standard for assembly graph that adapted by many other software. And then you can generate SAM/BAM file with our recommended parameters: ``` minimap2 -t16 -k15 -w5 -a assembly_graph.fasta nnp.fastq ... @@ -150,9 +148,7 @@ awk -F'[:;]' -v q="'" '/^>/{if(index($1,q) ==0 ) flag=1; else flag=0;} {if(flag) Below is how it looked like using *npGraph* with a mock community of 11 species from PoreCamp. -- -
+![Metagenomics](npgraph_pc.gif) ### Note diff --git a/docs/npgraph_pc.gif b/docs/npgraph_pc.gif new file mode 100644 index 0000000..9aa1a2d Binary files /dev/null and b/docs/npgraph_pc.gif differ diff --git a/docs/npgraph_pc_short.gif b/docs/npgraph_pc_short.gif new file mode 100644 index 0000000..e261d4c Binary files /dev/null and b/docs/npgraph_pc_short.gif differ diff --git a/pom.xml b/pom.xml index 157b534..a8becaf 100644 --- a/pom.xml +++ b/pom.xml @@ -1,10 +1,11 @@ ++ * An alignment from minimap2 sent to the server + *+ * + * Protobuf type {@code assembly.AlignmentMsg} + */ +public final class AlignmentMsg extends + com.google.protobuf.GeneratedMessageV3 implements + // @@protoc_insertion_point(message_implements:assembly.AlignmentMsg) + AlignmentMsgOrBuilder { +private static final long serialVersionUID = 0L; + // Use AlignmentMsg.newBuilder() to construct. + private AlignmentMsg(com.google.protobuf.GeneratedMessageV3.Builder> builder) { + super(builder); + } + private AlignmentMsg() { + queryName_ = ""; + targetName_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance( + UnusedPrivateParameter unused) { + return new AlignmentMsg(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet + getUnknownFields() { + return this.unknownFields; + } + private AlignmentMsg( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + this(); + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder(); + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: { + java.lang.String s = input.readStringRequireUtf8(); + + queryName_ = s; + break; + } + case 16: { + + queryLength_ = input.readInt32(); + break; + } + case 24: { + + queryStart_ = input.readInt32(); + break; + } + case 32: { + + queryEnd_ = input.readInt32(); + break; + } + case 40: { + + strand_ = input.readBool(); + break; + } + case 50: { + java.lang.String s = input.readStringRequireUtf8(); + + targetName_ = s; + break; + } + case 56: { + + targetLength_ = input.readInt32(); + break; + } + case 64: { + + targetStart_ = input.readInt32(); + break; + } + case 72: { + + targetEnd_ = input.readInt32(); + break; + } + case 80: { + + quality_ = input.readInt32(); + break; + } + case 88: { + + score_ = input.readInt32(); + break; + } + default: { + if (!parseUnknownField( + input, unknownFields, extensionRegistry, tag)) { + done = true; + } + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException( + e).setUnfinishedMessage(this); + } finally { + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return org.rtassembly.npgraph.grpc.AssemblyGuideProto.internal_static_assembly_AlignmentMsg_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return org.rtassembly.npgraph.grpc.AssemblyGuideProto.internal_static_assembly_AlignmentMsg_fieldAccessorTable + .ensureFieldAccessorsInitialized( + org.rtassembly.npgraph.grpc.AlignmentMsg.class, org.rtassembly.npgraph.grpc.AlignmentMsg.Builder.class); + } + + public static final int QUERY_NAME_FIELD_NUMBER = 1; + private volatile java.lang.Object queryName_; + /** + *
string query_name = 1;
+ * @return The queryName.
+ */
+ public java.lang.String getQueryName() {
+ java.lang.Object ref = queryName_;
+ if (ref instanceof java.lang.String) {
+ return (java.lang.String) ref;
+ } else {
+ com.google.protobuf.ByteString bs =
+ (com.google.protobuf.ByteString) ref;
+ java.lang.String s = bs.toStringUtf8();
+ queryName_ = s;
+ return s;
+ }
+ }
+ /**
+ * string query_name = 1;
+ * @return The bytes for queryName.
+ */
+ public com.google.protobuf.ByteString
+ getQueryNameBytes() {
+ java.lang.Object ref = queryName_;
+ if (ref instanceof java.lang.String) {
+ com.google.protobuf.ByteString b =
+ com.google.protobuf.ByteString.copyFromUtf8(
+ (java.lang.String) ref);
+ queryName_ = b;
+ return b;
+ } else {
+ return (com.google.protobuf.ByteString) ref;
+ }
+ }
+
+ public static final int QUERY_LENGTH_FIELD_NUMBER = 2;
+ private int queryLength_;
+ /**
+ * int32 query_length = 2;
+ * @return The queryLength.
+ */
+ public int getQueryLength() {
+ return queryLength_;
+ }
+
+ public static final int QUERY_START_FIELD_NUMBER = 3;
+ private int queryStart_;
+ /**
+ * int32 query_start = 3;
+ * @return The queryStart.
+ */
+ public int getQueryStart() {
+ return queryStart_;
+ }
+
+ public static final int QUERY_END_FIELD_NUMBER = 4;
+ private int queryEnd_;
+ /**
+ * int32 query_end = 4;
+ * @return The queryEnd.
+ */
+ public int getQueryEnd() {
+ return queryEnd_;
+ }
+
+ public static final int STRAND_FIELD_NUMBER = 5;
+ private boolean strand_;
+ /**
+ * bool strand = 5;
+ * @return The strand.
+ */
+ public boolean getStrand() {
+ return strand_;
+ }
+
+ public static final int TARGET_NAME_FIELD_NUMBER = 6;
+ private volatile java.lang.Object targetName_;
+ /**
+ * string target_name = 6;
+ * @return The targetName.
+ */
+ public java.lang.String getTargetName() {
+ java.lang.Object ref = targetName_;
+ if (ref instanceof java.lang.String) {
+ return (java.lang.String) ref;
+ } else {
+ com.google.protobuf.ByteString bs =
+ (com.google.protobuf.ByteString) ref;
+ java.lang.String s = bs.toStringUtf8();
+ targetName_ = s;
+ return s;
+ }
+ }
+ /**
+ * string target_name = 6;
+ * @return The bytes for targetName.
+ */
+ public com.google.protobuf.ByteString
+ getTargetNameBytes() {
+ java.lang.Object ref = targetName_;
+ if (ref instanceof java.lang.String) {
+ com.google.protobuf.ByteString b =
+ com.google.protobuf.ByteString.copyFromUtf8(
+ (java.lang.String) ref);
+ targetName_ = b;
+ return b;
+ } else {
+ return (com.google.protobuf.ByteString) ref;
+ }
+ }
+
+ public static final int TARGET_LENGTH_FIELD_NUMBER = 7;
+ private int targetLength_;
+ /**
+ * int32 target_length = 7;
+ * @return The targetLength.
+ */
+ public int getTargetLength() {
+ return targetLength_;
+ }
+
+ public static final int TARGET_START_FIELD_NUMBER = 8;
+ private int targetStart_;
+ /**
+ * int32 target_start = 8;
+ * @return The targetStart.
+ */
+ public int getTargetStart() {
+ return targetStart_;
+ }
+
+ public static final int TARGET_END_FIELD_NUMBER = 9;
+ private int targetEnd_;
+ /**
+ * int32 target_end = 9;
+ * @return The targetEnd.
+ */
+ public int getTargetEnd() {
+ return targetEnd_;
+ }
+
+ public static final int QUALITY_FIELD_NUMBER = 10;
+ private int quality_;
+ /**
+ * int32 quality = 10;
+ * @return The quality.
+ */
+ public int getQuality() {
+ return quality_;
+ }
+
+ public static final int SCORE_FIELD_NUMBER = 11;
+ private int score_;
+ /**
+ * int32 score = 11;
+ * @return The score.
+ */
+ public int getScore() {
+ return score_;
+ }
+
+ private byte memoizedIsInitialized = -1;
+ @java.lang.Override
+ public final boolean isInitialized() {
+ byte isInitialized = memoizedIsInitialized;
+ if (isInitialized == 1) return true;
+ if (isInitialized == 0) return false;
+
+ memoizedIsInitialized = 1;
+ return true;
+ }
+
+ @java.lang.Override
+ public void writeTo(com.google.protobuf.CodedOutputStream output)
+ throws java.io.IOException {
+ if (!getQueryNameBytes().isEmpty()) {
+ com.google.protobuf.GeneratedMessageV3.writeString(output, 1, queryName_);
+ }
+ if (queryLength_ != 0) {
+ output.writeInt32(2, queryLength_);
+ }
+ if (queryStart_ != 0) {
+ output.writeInt32(3, queryStart_);
+ }
+ if (queryEnd_ != 0) {
+ output.writeInt32(4, queryEnd_);
+ }
+ if (strand_ != false) {
+ output.writeBool(5, strand_);
+ }
+ if (!getTargetNameBytes().isEmpty()) {
+ com.google.protobuf.GeneratedMessageV3.writeString(output, 6, targetName_);
+ }
+ if (targetLength_ != 0) {
+ output.writeInt32(7, targetLength_);
+ }
+ if (targetStart_ != 0) {
+ output.writeInt32(8, targetStart_);
+ }
+ if (targetEnd_ != 0) {
+ output.writeInt32(9, targetEnd_);
+ }
+ if (quality_ != 0) {
+ output.writeInt32(10, quality_);
+ }
+ if (score_ != 0) {
+ output.writeInt32(11, score_);
+ }
+ unknownFields.writeTo(output);
+ }
+
+ @java.lang.Override
+ public int getSerializedSize() {
+ int size = memoizedSize;
+ if (size != -1) return size;
+
+ size = 0;
+ if (!getQueryNameBytes().isEmpty()) {
+ size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, queryName_);
+ }
+ if (queryLength_ != 0) {
+ size += com.google.protobuf.CodedOutputStream
+ .computeInt32Size(2, queryLength_);
+ }
+ if (queryStart_ != 0) {
+ size += com.google.protobuf.CodedOutputStream
+ .computeInt32Size(3, queryStart_);
+ }
+ if (queryEnd_ != 0) {
+ size += com.google.protobuf.CodedOutputStream
+ .computeInt32Size(4, queryEnd_);
+ }
+ if (strand_ != false) {
+ size += com.google.protobuf.CodedOutputStream
+ .computeBoolSize(5, strand_);
+ }
+ if (!getTargetNameBytes().isEmpty()) {
+ size += com.google.protobuf.GeneratedMessageV3.computeStringSize(6, targetName_);
+ }
+ if (targetLength_ != 0) {
+ size += com.google.protobuf.CodedOutputStream
+ .computeInt32Size(7, targetLength_);
+ }
+ if (targetStart_ != 0) {
+ size += com.google.protobuf.CodedOutputStream
+ .computeInt32Size(8, targetStart_);
+ }
+ if (targetEnd_ != 0) {
+ size += com.google.protobuf.CodedOutputStream
+ .computeInt32Size(9, targetEnd_);
+ }
+ if (quality_ != 0) {
+ size += com.google.protobuf.CodedOutputStream
+ .computeInt32Size(10, quality_);
+ }
+ if (score_ != 0) {
+ size += com.google.protobuf.CodedOutputStream
+ .computeInt32Size(11, score_);
+ }
+ size += unknownFields.getSerializedSize();
+ memoizedSize = size;
+ return size;
+ }
+
+ @java.lang.Override
+ public boolean equals(final java.lang.Object obj) {
+ if (obj == this) {
+ return true;
+ }
+ if (!(obj instanceof org.rtassembly.npgraph.grpc.AlignmentMsg)) {
+ return super.equals(obj);
+ }
+ org.rtassembly.npgraph.grpc.AlignmentMsg other = (org.rtassembly.npgraph.grpc.AlignmentMsg) obj;
+
+ if (!getQueryName()
+ .equals(other.getQueryName())) return false;
+ if (getQueryLength()
+ != other.getQueryLength()) return false;
+ if (getQueryStart()
+ != other.getQueryStart()) return false;
+ if (getQueryEnd()
+ != other.getQueryEnd()) return false;
+ if (getStrand()
+ != other.getStrand()) return false;
+ if (!getTargetName()
+ .equals(other.getTargetName())) return false;
+ if (getTargetLength()
+ != other.getTargetLength()) return false;
+ if (getTargetStart()
+ != other.getTargetStart()) return false;
+ if (getTargetEnd()
+ != other.getTargetEnd()) return false;
+ if (getQuality()
+ != other.getQuality()) return false;
+ if (getScore()
+ != other.getScore()) return false;
+ if (!unknownFields.equals(other.unknownFields)) return false;
+ return true;
+ }
+
+ @java.lang.Override
+ public int hashCode() {
+ if (memoizedHashCode != 0) {
+ return memoizedHashCode;
+ }
+ int hash = 41;
+ hash = (19 * hash) + getDescriptor().hashCode();
+ hash = (37 * hash) + QUERY_NAME_FIELD_NUMBER;
+ hash = (53 * hash) + getQueryName().hashCode();
+ hash = (37 * hash) + QUERY_LENGTH_FIELD_NUMBER;
+ hash = (53 * hash) + getQueryLength();
+ hash = (37 * hash) + QUERY_START_FIELD_NUMBER;
+ hash = (53 * hash) + getQueryStart();
+ hash = (37 * hash) + QUERY_END_FIELD_NUMBER;
+ hash = (53 * hash) + getQueryEnd();
+ hash = (37 * hash) + STRAND_FIELD_NUMBER;
+ hash = (53 * hash) + com.google.protobuf.Internal.hashBoolean(
+ getStrand());
+ hash = (37 * hash) + TARGET_NAME_FIELD_NUMBER;
+ hash = (53 * hash) + getTargetName().hashCode();
+ hash = (37 * hash) + TARGET_LENGTH_FIELD_NUMBER;
+ hash = (53 * hash) + getTargetLength();
+ hash = (37 * hash) + TARGET_START_FIELD_NUMBER;
+ hash = (53 * hash) + getTargetStart();
+ hash = (37 * hash) + TARGET_END_FIELD_NUMBER;
+ hash = (53 * hash) + getTargetEnd();
+ hash = (37 * hash) + QUALITY_FIELD_NUMBER;
+ hash = (53 * hash) + getQuality();
+ hash = (37 * hash) + SCORE_FIELD_NUMBER;
+ hash = (53 * hash) + getScore();
+ hash = (29 * hash) + unknownFields.hashCode();
+ memoizedHashCode = hash;
+ return hash;
+ }
+
+ public static org.rtassembly.npgraph.grpc.AlignmentMsg parseFrom(
+ java.nio.ByteBuffer data)
+ throws com.google.protobuf.InvalidProtocolBufferException {
+ return PARSER.parseFrom(data);
+ }
+ public static org.rtassembly.npgraph.grpc.AlignmentMsg parseFrom(
+ java.nio.ByteBuffer data,
+ com.google.protobuf.ExtensionRegistryLite extensionRegistry)
+ throws com.google.protobuf.InvalidProtocolBufferException {
+ return PARSER.parseFrom(data, extensionRegistry);
+ }
+ public static org.rtassembly.npgraph.grpc.AlignmentMsg parseFrom(
+ com.google.protobuf.ByteString data)
+ throws com.google.protobuf.InvalidProtocolBufferException {
+ return PARSER.parseFrom(data);
+ }
+ public static org.rtassembly.npgraph.grpc.AlignmentMsg parseFrom(
+ com.google.protobuf.ByteString data,
+ com.google.protobuf.ExtensionRegistryLite extensionRegistry)
+ throws com.google.protobuf.InvalidProtocolBufferException {
+ return PARSER.parseFrom(data, extensionRegistry);
+ }
+ public static org.rtassembly.npgraph.grpc.AlignmentMsg parseFrom(byte[] data)
+ throws com.google.protobuf.InvalidProtocolBufferException {
+ return PARSER.parseFrom(data);
+ }
+ public static org.rtassembly.npgraph.grpc.AlignmentMsg parseFrom(
+ byte[] data,
+ com.google.protobuf.ExtensionRegistryLite extensionRegistry)
+ throws com.google.protobuf.InvalidProtocolBufferException {
+ return PARSER.parseFrom(data, extensionRegistry);
+ }
+ public static org.rtassembly.npgraph.grpc.AlignmentMsg parseFrom(java.io.InputStream input)
+ throws java.io.IOException {
+ return com.google.protobuf.GeneratedMessageV3
+ .parseWithIOException(PARSER, input);
+ }
+ public static org.rtassembly.npgraph.grpc.AlignmentMsg parseFrom(
+ java.io.InputStream input,
+ com.google.protobuf.ExtensionRegistryLite extensionRegistry)
+ throws java.io.IOException {
+ return com.google.protobuf.GeneratedMessageV3
+ .parseWithIOException(PARSER, input, extensionRegistry);
+ }
+ public static org.rtassembly.npgraph.grpc.AlignmentMsg parseDelimitedFrom(java.io.InputStream input)
+ throws java.io.IOException {
+ return com.google.protobuf.GeneratedMessageV3
+ .parseDelimitedWithIOException(PARSER, input);
+ }
+ public static org.rtassembly.npgraph.grpc.AlignmentMsg parseDelimitedFrom(
+ java.io.InputStream input,
+ com.google.protobuf.ExtensionRegistryLite extensionRegistry)
+ throws java.io.IOException {
+ return com.google.protobuf.GeneratedMessageV3
+ .parseDelimitedWithIOException(PARSER, input, extensionRegistry);
+ }
+ public static org.rtassembly.npgraph.grpc.AlignmentMsg parseFrom(
+ com.google.protobuf.CodedInputStream input)
+ throws java.io.IOException {
+ return com.google.protobuf.GeneratedMessageV3
+ .parseWithIOException(PARSER, input);
+ }
+ public static org.rtassembly.npgraph.grpc.AlignmentMsg parseFrom(
+ com.google.protobuf.CodedInputStream input,
+ com.google.protobuf.ExtensionRegistryLite extensionRegistry)
+ throws java.io.IOException {
+ return com.google.protobuf.GeneratedMessageV3
+ .parseWithIOException(PARSER, input, extensionRegistry);
+ }
+
+ @java.lang.Override
+ public Builder newBuilderForType() { return newBuilder(); }
+ public static Builder newBuilder() {
+ return DEFAULT_INSTANCE.toBuilder();
+ }
+ public static Builder newBuilder(org.rtassembly.npgraph.grpc.AlignmentMsg prototype) {
+ return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype);
+ }
+ @java.lang.Override
+ public Builder toBuilder() {
+ return this == DEFAULT_INSTANCE
+ ? new Builder() : new Builder().mergeFrom(this);
+ }
+
+ @java.lang.Override
+ protected Builder newBuilderForType(
+ com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
+ Builder builder = new Builder(parent);
+ return builder;
+ }
+ /**
+ * + * An alignment from minimap2 sent to the server + *+ * + * Protobuf type {@code assembly.AlignmentMsg} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessageV3.Builder
string query_name = 1;
+ * @return The queryName.
+ */
+ public java.lang.String getQueryName() {
+ java.lang.Object ref = queryName_;
+ if (!(ref instanceof java.lang.String)) {
+ com.google.protobuf.ByteString bs =
+ (com.google.protobuf.ByteString) ref;
+ java.lang.String s = bs.toStringUtf8();
+ queryName_ = s;
+ return s;
+ } else {
+ return (java.lang.String) ref;
+ }
+ }
+ /**
+ * string query_name = 1;
+ * @return The bytes for queryName.
+ */
+ public com.google.protobuf.ByteString
+ getQueryNameBytes() {
+ java.lang.Object ref = queryName_;
+ if (ref instanceof String) {
+ com.google.protobuf.ByteString b =
+ com.google.protobuf.ByteString.copyFromUtf8(
+ (java.lang.String) ref);
+ queryName_ = b;
+ return b;
+ } else {
+ return (com.google.protobuf.ByteString) ref;
+ }
+ }
+ /**
+ * string query_name = 1;
+ * @param value The queryName to set.
+ * @return This builder for chaining.
+ */
+ public Builder setQueryName(
+ java.lang.String value) {
+ if (value == null) {
+ throw new NullPointerException();
+ }
+
+ queryName_ = value;
+ onChanged();
+ return this;
+ }
+ /**
+ * string query_name = 1;
+ * @return This builder for chaining.
+ */
+ public Builder clearQueryName() {
+
+ queryName_ = getDefaultInstance().getQueryName();
+ onChanged();
+ return this;
+ }
+ /**
+ * string query_name = 1;
+ * @param value The bytes for queryName to set.
+ * @return This builder for chaining.
+ */
+ public Builder setQueryNameBytes(
+ com.google.protobuf.ByteString value) {
+ if (value == null) {
+ throw new NullPointerException();
+ }
+ checkByteStringIsUtf8(value);
+
+ queryName_ = value;
+ onChanged();
+ return this;
+ }
+
+ private int queryLength_ ;
+ /**
+ * int32 query_length = 2;
+ * @return The queryLength.
+ */
+ public int getQueryLength() {
+ return queryLength_;
+ }
+ /**
+ * int32 query_length = 2;
+ * @param value The queryLength to set.
+ * @return This builder for chaining.
+ */
+ public Builder setQueryLength(int value) {
+
+ queryLength_ = value;
+ onChanged();
+ return this;
+ }
+ /**
+ * int32 query_length = 2;
+ * @return This builder for chaining.
+ */
+ public Builder clearQueryLength() {
+
+ queryLength_ = 0;
+ onChanged();
+ return this;
+ }
+
+ private int queryStart_ ;
+ /**
+ * int32 query_start = 3;
+ * @return The queryStart.
+ */
+ public int getQueryStart() {
+ return queryStart_;
+ }
+ /**
+ * int32 query_start = 3;
+ * @param value The queryStart to set.
+ * @return This builder for chaining.
+ */
+ public Builder setQueryStart(int value) {
+
+ queryStart_ = value;
+ onChanged();
+ return this;
+ }
+ /**
+ * int32 query_start = 3;
+ * @return This builder for chaining.
+ */
+ public Builder clearQueryStart() {
+
+ queryStart_ = 0;
+ onChanged();
+ return this;
+ }
+
+ private int queryEnd_ ;
+ /**
+ * int32 query_end = 4;
+ * @return The queryEnd.
+ */
+ public int getQueryEnd() {
+ return queryEnd_;
+ }
+ /**
+ * int32 query_end = 4;
+ * @param value The queryEnd to set.
+ * @return This builder for chaining.
+ */
+ public Builder setQueryEnd(int value) {
+
+ queryEnd_ = value;
+ onChanged();
+ return this;
+ }
+ /**
+ * int32 query_end = 4;
+ * @return This builder for chaining.
+ */
+ public Builder clearQueryEnd() {
+
+ queryEnd_ = 0;
+ onChanged();
+ return this;
+ }
+
+ private boolean strand_ ;
+ /**
+ * bool strand = 5;
+ * @return The strand.
+ */
+ public boolean getStrand() {
+ return strand_;
+ }
+ /**
+ * bool strand = 5;
+ * @param value The strand to set.
+ * @return This builder for chaining.
+ */
+ public Builder setStrand(boolean value) {
+
+ strand_ = value;
+ onChanged();
+ return this;
+ }
+ /**
+ * bool strand = 5;
+ * @return This builder for chaining.
+ */
+ public Builder clearStrand() {
+
+ strand_ = false;
+ onChanged();
+ return this;
+ }
+
+ private java.lang.Object targetName_ = "";
+ /**
+ * string target_name = 6;
+ * @return The targetName.
+ */
+ public java.lang.String getTargetName() {
+ java.lang.Object ref = targetName_;
+ if (!(ref instanceof java.lang.String)) {
+ com.google.protobuf.ByteString bs =
+ (com.google.protobuf.ByteString) ref;
+ java.lang.String s = bs.toStringUtf8();
+ targetName_ = s;
+ return s;
+ } else {
+ return (java.lang.String) ref;
+ }
+ }
+ /**
+ * string target_name = 6;
+ * @return The bytes for targetName.
+ */
+ public com.google.protobuf.ByteString
+ getTargetNameBytes() {
+ java.lang.Object ref = targetName_;
+ if (ref instanceof String) {
+ com.google.protobuf.ByteString b =
+ com.google.protobuf.ByteString.copyFromUtf8(
+ (java.lang.String) ref);
+ targetName_ = b;
+ return b;
+ } else {
+ return (com.google.protobuf.ByteString) ref;
+ }
+ }
+ /**
+ * string target_name = 6;
+ * @param value The targetName to set.
+ * @return This builder for chaining.
+ */
+ public Builder setTargetName(
+ java.lang.String value) {
+ if (value == null) {
+ throw new NullPointerException();
+ }
+
+ targetName_ = value;
+ onChanged();
+ return this;
+ }
+ /**
+ * string target_name = 6;
+ * @return This builder for chaining.
+ */
+ public Builder clearTargetName() {
+
+ targetName_ = getDefaultInstance().getTargetName();
+ onChanged();
+ return this;
+ }
+ /**
+ * string target_name = 6;
+ * @param value The bytes for targetName to set.
+ * @return This builder for chaining.
+ */
+ public Builder setTargetNameBytes(
+ com.google.protobuf.ByteString value) {
+ if (value == null) {
+ throw new NullPointerException();
+ }
+ checkByteStringIsUtf8(value);
+
+ targetName_ = value;
+ onChanged();
+ return this;
+ }
+
+ private int targetLength_ ;
+ /**
+ * int32 target_length = 7;
+ * @return The targetLength.
+ */
+ public int getTargetLength() {
+ return targetLength_;
+ }
+ /**
+ * int32 target_length = 7;
+ * @param value The targetLength to set.
+ * @return This builder for chaining.
+ */
+ public Builder setTargetLength(int value) {
+
+ targetLength_ = value;
+ onChanged();
+ return this;
+ }
+ /**
+ * int32 target_length = 7;
+ * @return This builder for chaining.
+ */
+ public Builder clearTargetLength() {
+
+ targetLength_ = 0;
+ onChanged();
+ return this;
+ }
+
+ private int targetStart_ ;
+ /**
+ * int32 target_start = 8;
+ * @return The targetStart.
+ */
+ public int getTargetStart() {
+ return targetStart_;
+ }
+ /**
+ * int32 target_start = 8;
+ * @param value The targetStart to set.
+ * @return This builder for chaining.
+ */
+ public Builder setTargetStart(int value) {
+
+ targetStart_ = value;
+ onChanged();
+ return this;
+ }
+ /**
+ * int32 target_start = 8;
+ * @return This builder for chaining.
+ */
+ public Builder clearTargetStart() {
+
+ targetStart_ = 0;
+ onChanged();
+ return this;
+ }
+
+ private int targetEnd_ ;
+ /**
+ * int32 target_end = 9;
+ * @return The targetEnd.
+ */
+ public int getTargetEnd() {
+ return targetEnd_;
+ }
+ /**
+ * int32 target_end = 9;
+ * @param value The targetEnd to set.
+ * @return This builder for chaining.
+ */
+ public Builder setTargetEnd(int value) {
+
+ targetEnd_ = value;
+ onChanged();
+ return this;
+ }
+ /**
+ * int32 target_end = 9;
+ * @return This builder for chaining.
+ */
+ public Builder clearTargetEnd() {
+
+ targetEnd_ = 0;
+ onChanged();
+ return this;
+ }
+
+ private int quality_ ;
+ /**
+ * int32 quality = 10;
+ * @return The quality.
+ */
+ public int getQuality() {
+ return quality_;
+ }
+ /**
+ * int32 quality = 10;
+ * @param value The quality to set.
+ * @return This builder for chaining.
+ */
+ public Builder setQuality(int value) {
+
+ quality_ = value;
+ onChanged();
+ return this;
+ }
+ /**
+ * int32 quality = 10;
+ * @return This builder for chaining.
+ */
+ public Builder clearQuality() {
+
+ quality_ = 0;
+ onChanged();
+ return this;
+ }
+
+ private int score_ ;
+ /**
+ * int32 score = 11;
+ * @return The score.
+ */
+ public int getScore() {
+ return score_;
+ }
+ /**
+ * int32 score = 11;
+ * @param value The score to set.
+ * @return This builder for chaining.
+ */
+ public Builder setScore(int value) {
+
+ score_ = value;
+ onChanged();
+ return this;
+ }
+ /**
+ * int32 score = 11;
+ * @return This builder for chaining.
+ */
+ public Builder clearScore() {
+
+ score_ = 0;
+ onChanged();
+ return this;
+ }
+ @java.lang.Override
+ public final Builder setUnknownFields(
+ final com.google.protobuf.UnknownFieldSet unknownFields) {
+ return super.setUnknownFields(unknownFields);
+ }
+
+ @java.lang.Override
+ public final Builder mergeUnknownFields(
+ final com.google.protobuf.UnknownFieldSet unknownFields) {
+ return super.mergeUnknownFields(unknownFields);
+ }
+
+
+ // @@protoc_insertion_point(builder_scope:assembly.AlignmentMsg)
+ }
+
+ // @@protoc_insertion_point(class_scope:assembly.AlignmentMsg)
+ private static final org.rtassembly.npgraph.grpc.AlignmentMsg DEFAULT_INSTANCE;
+ static {
+ DEFAULT_INSTANCE = new org.rtassembly.npgraph.grpc.AlignmentMsg();
+ }
+
+ public static org.rtassembly.npgraph.grpc.AlignmentMsg getDefaultInstance() {
+ return DEFAULT_INSTANCE;
+ }
+
+ private static final com.google.protobuf.Parserstring query_name = 1;
+ * @return The queryName.
+ */
+ java.lang.String getQueryName();
+ /**
+ * string query_name = 1;
+ * @return The bytes for queryName.
+ */
+ com.google.protobuf.ByteString
+ getQueryNameBytes();
+
+ /**
+ * int32 query_length = 2;
+ * @return The queryLength.
+ */
+ int getQueryLength();
+
+ /**
+ * int32 query_start = 3;
+ * @return The queryStart.
+ */
+ int getQueryStart();
+
+ /**
+ * int32 query_end = 4;
+ * @return The queryEnd.
+ */
+ int getQueryEnd();
+
+ /**
+ * bool strand = 5;
+ * @return The strand.
+ */
+ boolean getStrand();
+
+ /**
+ * string target_name = 6;
+ * @return The targetName.
+ */
+ java.lang.String getTargetName();
+ /**
+ * string target_name = 6;
+ * @return The bytes for targetName.
+ */
+ com.google.protobuf.ByteString
+ getTargetNameBytes();
+
+ /**
+ * int32 target_length = 7;
+ * @return The targetLength.
+ */
+ int getTargetLength();
+
+ /**
+ * int32 target_start = 8;
+ * @return The targetStart.
+ */
+ int getTargetStart();
+
+ /**
+ * int32 target_end = 9;
+ * @return The targetEnd.
+ */
+ int getTargetEnd();
+
+ /**
+ * int32 quality = 10;
+ * @return The quality.
+ */
+ int getQuality();
+
+ /**
+ * int32 score = 11;
+ * @return The score.
+ */
+ int getScore();
+}
diff --git a/src/main/java/org/rtassembly/npgraph/grpc/AssemblyGuideGrpc.java b/src/main/java/org/rtassembly/npgraph/grpc/AssemblyGuideGrpc.java
new file mode 100644
index 0000000..62d8eb8
--- /dev/null
+++ b/src/main/java/org/rtassembly/npgraph/grpc/AssemblyGuideGrpc.java
@@ -0,0 +1,303 @@
+package org.rtassembly.npgraph.grpc;
+
+import static io.grpc.MethodDescriptor.generateFullMethodName;
+import static io.grpc.stub.ClientCalls.asyncBidiStreamingCall;
+import static io.grpc.stub.ClientCalls.asyncClientStreamingCall;
+import static io.grpc.stub.ClientCalls.asyncServerStreamingCall;
+import static io.grpc.stub.ClientCalls.asyncUnaryCall;
+import static io.grpc.stub.ClientCalls.blockingServerStreamingCall;
+import static io.grpc.stub.ClientCalls.blockingUnaryCall;
+import static io.grpc.stub.ClientCalls.futureUnaryCall;
+import static io.grpc.stub.ServerCalls.asyncBidiStreamingCall;
+import static io.grpc.stub.ServerCalls.asyncClientStreamingCall;
+import static io.grpc.stub.ServerCalls.asyncServerStreamingCall;
+import static io.grpc.stub.ServerCalls.asyncUnaryCall;
+import static io.grpc.stub.ServerCalls.asyncUnimplementedStreamingCall;
+import static io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall;
+
+/**
+ * + * Interface exported by the server. + *+ */ +@javax.annotation.Generated( + value = "by gRPC proto compiler (version 1.28.0)", + comments = "Source: npgraph_service.proto") +public final class AssemblyGuideGrpc { + + private AssemblyGuideGrpc() {} + + public static final String SERVICE_NAME = "assembly.AssemblyGuide"; + + // Static method descriptors that strictly reflect the proto. + private static volatile io.grpc.MethodDescriptor
+ * Interface exported by the server. + *+ */ + public static abstract class AssemblyGuideImplBase implements io.grpc.BindableService { + + /** + */ + public void getAssemblyContribution(org.rtassembly.npgraph.grpc.RequestAssembly request, + io.grpc.stub.StreamObserver
+ * Interface exported by the server. + *+ */ + public static final class AssemblyGuideStub extends io.grpc.stub.AbstractAsyncStub
+ * Interface exported by the server. + *+ */ + public static final class AssemblyGuideBlockingStub extends io.grpc.stub.AbstractBlockingStub
+ * Interface exported by the server. + *+ */ + public static final class AssemblyGuideFutureStub extends io.grpc.stub.AbstractFutureStub
See src/main/proto/npgraph_service.proto for details of the methods.
+ */
+ private static class AssemblyGuideService extends AssemblyGuideGrpc.AssemblyGuideImplBase {
+ private static final HashMap
+ * Client sent all hits from a chunk simultaneously
+ *
+ *
+ * Protobuf type {@code assembly.RequestAssembly}
+ */
+public final class RequestAssembly extends
+ com.google.protobuf.GeneratedMessageV3 implements
+ // @@protoc_insertion_point(message_implements:assembly.RequestAssembly)
+ RequestAssemblyOrBuilder {
+private static final long serialVersionUID = 0L;
+ // Use RequestAssembly.newBuilder() to construct.
+ private RequestAssembly(com.google.protobuf.GeneratedMessageV3.Builder> builder) {
+ super(builder);
+ }
+ private RequestAssembly() {
+ readId_ = "";
+ hitsList_ = java.util.Collections.emptyList();
+ }
+
+ @java.lang.Override
+ @SuppressWarnings({"unused"})
+ protected java.lang.Object newInstance(
+ UnusedPrivateParameter unused) {
+ return new RequestAssembly();
+ }
+
+ @java.lang.Override
+ public final com.google.protobuf.UnknownFieldSet
+ getUnknownFields() {
+ return this.unknownFields;
+ }
+ private RequestAssembly(
+ com.google.protobuf.CodedInputStream input,
+ com.google.protobuf.ExtensionRegistryLite extensionRegistry)
+ throws com.google.protobuf.InvalidProtocolBufferException {
+ this();
+ if (extensionRegistry == null) {
+ throw new java.lang.NullPointerException();
+ }
+ int mutable_bitField0_ = 0;
+ com.google.protobuf.UnknownFieldSet.Builder unknownFields =
+ com.google.protobuf.UnknownFieldSet.newBuilder();
+ try {
+ boolean done = false;
+ while (!done) {
+ int tag = input.readTag();
+ switch (tag) {
+ case 0:
+ done = true;
+ break;
+ case 10: {
+ java.lang.String s = input.readStringRequireUtf8();
+
+ readId_ = s;
+ break;
+ }
+ case 18: {
+ if (!((mutable_bitField0_ & 0x00000001) != 0)) {
+ hitsList_ = new java.util.ArrayListstring read_id = 1;
+ * @return The readId.
+ */
+ public java.lang.String getReadId() {
+ java.lang.Object ref = readId_;
+ if (ref instanceof java.lang.String) {
+ return (java.lang.String) ref;
+ } else {
+ com.google.protobuf.ByteString bs =
+ (com.google.protobuf.ByteString) ref;
+ java.lang.String s = bs.toStringUtf8();
+ readId_ = s;
+ return s;
+ }
+ }
+ /**
+ * string read_id = 1;
+ * @return The bytes for readId.
+ */
+ public com.google.protobuf.ByteString
+ getReadIdBytes() {
+ java.lang.Object ref = readId_;
+ if (ref instanceof java.lang.String) {
+ com.google.protobuf.ByteString b =
+ com.google.protobuf.ByteString.copyFromUtf8(
+ (java.lang.String) ref);
+ readId_ = b;
+ return b;
+ } else {
+ return (com.google.protobuf.ByteString) ref;
+ }
+ }
+
+ public static final int HITS_LIST_FIELD_NUMBER = 2;
+ private java.util.Listrepeated .assembly.AlignmentMsg hits_list = 2;
+ */
+ public java.util.Listrepeated .assembly.AlignmentMsg hits_list = 2;
+ */
+ public java.util.List extends org.rtassembly.npgraph.grpc.AlignmentMsgOrBuilder>
+ getHitsListOrBuilderList() {
+ return hitsList_;
+ }
+ /**
+ * repeated .assembly.AlignmentMsg hits_list = 2;
+ */
+ public int getHitsListCount() {
+ return hitsList_.size();
+ }
+ /**
+ * repeated .assembly.AlignmentMsg hits_list = 2;
+ */
+ public org.rtassembly.npgraph.grpc.AlignmentMsg getHitsList(int index) {
+ return hitsList_.get(index);
+ }
+ /**
+ * repeated .assembly.AlignmentMsg hits_list = 2;
+ */
+ public org.rtassembly.npgraph.grpc.AlignmentMsgOrBuilder getHitsListOrBuilder(
+ int index) {
+ return hitsList_.get(index);
+ }
+
+ private byte memoizedIsInitialized = -1;
+ @java.lang.Override
+ public final boolean isInitialized() {
+ byte isInitialized = memoizedIsInitialized;
+ if (isInitialized == 1) return true;
+ if (isInitialized == 0) return false;
+
+ memoizedIsInitialized = 1;
+ return true;
+ }
+
+ @java.lang.Override
+ public void writeTo(com.google.protobuf.CodedOutputStream output)
+ throws java.io.IOException {
+ if (!getReadIdBytes().isEmpty()) {
+ com.google.protobuf.GeneratedMessageV3.writeString(output, 1, readId_);
+ }
+ for (int i = 0; i < hitsList_.size(); i++) {
+ output.writeMessage(2, hitsList_.get(i));
+ }
+ unknownFields.writeTo(output);
+ }
+
+ @java.lang.Override
+ public int getSerializedSize() {
+ int size = memoizedSize;
+ if (size != -1) return size;
+
+ size = 0;
+ if (!getReadIdBytes().isEmpty()) {
+ size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, readId_);
+ }
+ for (int i = 0; i < hitsList_.size(); i++) {
+ size += com.google.protobuf.CodedOutputStream
+ .computeMessageSize(2, hitsList_.get(i));
+ }
+ size += unknownFields.getSerializedSize();
+ memoizedSize = size;
+ return size;
+ }
+
+ @java.lang.Override
+ public boolean equals(final java.lang.Object obj) {
+ if (obj == this) {
+ return true;
+ }
+ if (!(obj instanceof org.rtassembly.npgraph.grpc.RequestAssembly)) {
+ return super.equals(obj);
+ }
+ org.rtassembly.npgraph.grpc.RequestAssembly other = (org.rtassembly.npgraph.grpc.RequestAssembly) obj;
+
+ if (!getReadId()
+ .equals(other.getReadId())) return false;
+ if (!getHitsListList()
+ .equals(other.getHitsListList())) return false;
+ if (!unknownFields.equals(other.unknownFields)) return false;
+ return true;
+ }
+
+ @java.lang.Override
+ public int hashCode() {
+ if (memoizedHashCode != 0) {
+ return memoizedHashCode;
+ }
+ int hash = 41;
+ hash = (19 * hash) + getDescriptor().hashCode();
+ hash = (37 * hash) + READ_ID_FIELD_NUMBER;
+ hash = (53 * hash) + getReadId().hashCode();
+ if (getHitsListCount() > 0) {
+ hash = (37 * hash) + HITS_LIST_FIELD_NUMBER;
+ hash = (53 * hash) + getHitsListList().hashCode();
+ }
+ hash = (29 * hash) + unknownFields.hashCode();
+ memoizedHashCode = hash;
+ return hash;
+ }
+
+ public static org.rtassembly.npgraph.grpc.RequestAssembly parseFrom(
+ java.nio.ByteBuffer data)
+ throws com.google.protobuf.InvalidProtocolBufferException {
+ return PARSER.parseFrom(data);
+ }
+ public static org.rtassembly.npgraph.grpc.RequestAssembly parseFrom(
+ java.nio.ByteBuffer data,
+ com.google.protobuf.ExtensionRegistryLite extensionRegistry)
+ throws com.google.protobuf.InvalidProtocolBufferException {
+ return PARSER.parseFrom(data, extensionRegistry);
+ }
+ public static org.rtassembly.npgraph.grpc.RequestAssembly parseFrom(
+ com.google.protobuf.ByteString data)
+ throws com.google.protobuf.InvalidProtocolBufferException {
+ return PARSER.parseFrom(data);
+ }
+ public static org.rtassembly.npgraph.grpc.RequestAssembly parseFrom(
+ com.google.protobuf.ByteString data,
+ com.google.protobuf.ExtensionRegistryLite extensionRegistry)
+ throws com.google.protobuf.InvalidProtocolBufferException {
+ return PARSER.parseFrom(data, extensionRegistry);
+ }
+ public static org.rtassembly.npgraph.grpc.RequestAssembly parseFrom(byte[] data)
+ throws com.google.protobuf.InvalidProtocolBufferException {
+ return PARSER.parseFrom(data);
+ }
+ public static org.rtassembly.npgraph.grpc.RequestAssembly parseFrom(
+ byte[] data,
+ com.google.protobuf.ExtensionRegistryLite extensionRegistry)
+ throws com.google.protobuf.InvalidProtocolBufferException {
+ return PARSER.parseFrom(data, extensionRegistry);
+ }
+ public static org.rtassembly.npgraph.grpc.RequestAssembly parseFrom(java.io.InputStream input)
+ throws java.io.IOException {
+ return com.google.protobuf.GeneratedMessageV3
+ .parseWithIOException(PARSER, input);
+ }
+ public static org.rtassembly.npgraph.grpc.RequestAssembly parseFrom(
+ java.io.InputStream input,
+ com.google.protobuf.ExtensionRegistryLite extensionRegistry)
+ throws java.io.IOException {
+ return com.google.protobuf.GeneratedMessageV3
+ .parseWithIOException(PARSER, input, extensionRegistry);
+ }
+ public static org.rtassembly.npgraph.grpc.RequestAssembly parseDelimitedFrom(java.io.InputStream input)
+ throws java.io.IOException {
+ return com.google.protobuf.GeneratedMessageV3
+ .parseDelimitedWithIOException(PARSER, input);
+ }
+ public static org.rtassembly.npgraph.grpc.RequestAssembly parseDelimitedFrom(
+ java.io.InputStream input,
+ com.google.protobuf.ExtensionRegistryLite extensionRegistry)
+ throws java.io.IOException {
+ return com.google.protobuf.GeneratedMessageV3
+ .parseDelimitedWithIOException(PARSER, input, extensionRegistry);
+ }
+ public static org.rtassembly.npgraph.grpc.RequestAssembly parseFrom(
+ com.google.protobuf.CodedInputStream input)
+ throws java.io.IOException {
+ return com.google.protobuf.GeneratedMessageV3
+ .parseWithIOException(PARSER, input);
+ }
+ public static org.rtassembly.npgraph.grpc.RequestAssembly parseFrom(
+ com.google.protobuf.CodedInputStream input,
+ com.google.protobuf.ExtensionRegistryLite extensionRegistry)
+ throws java.io.IOException {
+ return com.google.protobuf.GeneratedMessageV3
+ .parseWithIOException(PARSER, input, extensionRegistry);
+ }
+
+ @java.lang.Override
+ public Builder newBuilderForType() { return newBuilder(); }
+ public static Builder newBuilder() {
+ return DEFAULT_INSTANCE.toBuilder();
+ }
+ public static Builder newBuilder(org.rtassembly.npgraph.grpc.RequestAssembly prototype) {
+ return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype);
+ }
+ @java.lang.Override
+ public Builder toBuilder() {
+ return this == DEFAULT_INSTANCE
+ ? new Builder() : new Builder().mergeFrom(this);
+ }
+
+ @java.lang.Override
+ protected Builder newBuilderForType(
+ com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
+ Builder builder = new Builder(parent);
+ return builder;
+ }
+ /**
+ *
+ * Client sent all hits from a chunk simultaneously
+ *
+ *
+ * Protobuf type {@code assembly.RequestAssembly}
+ */
+ public static final class Builder extends
+ com.google.protobuf.GeneratedMessageV3.Builderstring read_id = 1;
+ * @return The readId.
+ */
+ public java.lang.String getReadId() {
+ java.lang.Object ref = readId_;
+ if (!(ref instanceof java.lang.String)) {
+ com.google.protobuf.ByteString bs =
+ (com.google.protobuf.ByteString) ref;
+ java.lang.String s = bs.toStringUtf8();
+ readId_ = s;
+ return s;
+ } else {
+ return (java.lang.String) ref;
+ }
+ }
+ /**
+ * string read_id = 1;
+ * @return The bytes for readId.
+ */
+ public com.google.protobuf.ByteString
+ getReadIdBytes() {
+ java.lang.Object ref = readId_;
+ if (ref instanceof String) {
+ com.google.protobuf.ByteString b =
+ com.google.protobuf.ByteString.copyFromUtf8(
+ (java.lang.String) ref);
+ readId_ = b;
+ return b;
+ } else {
+ return (com.google.protobuf.ByteString) ref;
+ }
+ }
+ /**
+ * string read_id = 1;
+ * @param value The readId to set.
+ * @return This builder for chaining.
+ */
+ public Builder setReadId(
+ java.lang.String value) {
+ if (value == null) {
+ throw new NullPointerException();
+ }
+
+ readId_ = value;
+ onChanged();
+ return this;
+ }
+ /**
+ * string read_id = 1;
+ * @return This builder for chaining.
+ */
+ public Builder clearReadId() {
+
+ readId_ = getDefaultInstance().getReadId();
+ onChanged();
+ return this;
+ }
+ /**
+ * string read_id = 1;
+ * @param value The bytes for readId to set.
+ * @return This builder for chaining.
+ */
+ public Builder setReadIdBytes(
+ com.google.protobuf.ByteString value) {
+ if (value == null) {
+ throw new NullPointerException();
+ }
+ checkByteStringIsUtf8(value);
+
+ readId_ = value;
+ onChanged();
+ return this;
+ }
+
+ private java.util.Listrepeated .assembly.AlignmentMsg hits_list = 2;
+ */
+ public java.util.Listrepeated .assembly.AlignmentMsg hits_list = 2;
+ */
+ public int getHitsListCount() {
+ if (hitsListBuilder_ == null) {
+ return hitsList_.size();
+ } else {
+ return hitsListBuilder_.getCount();
+ }
+ }
+ /**
+ * repeated .assembly.AlignmentMsg hits_list = 2;
+ */
+ public org.rtassembly.npgraph.grpc.AlignmentMsg getHitsList(int index) {
+ if (hitsListBuilder_ == null) {
+ return hitsList_.get(index);
+ } else {
+ return hitsListBuilder_.getMessage(index);
+ }
+ }
+ /**
+ * repeated .assembly.AlignmentMsg hits_list = 2;
+ */
+ public Builder setHitsList(
+ int index, org.rtassembly.npgraph.grpc.AlignmentMsg value) {
+ if (hitsListBuilder_ == null) {
+ if (value == null) {
+ throw new NullPointerException();
+ }
+ ensureHitsListIsMutable();
+ hitsList_.set(index, value);
+ onChanged();
+ } else {
+ hitsListBuilder_.setMessage(index, value);
+ }
+ return this;
+ }
+ /**
+ * repeated .assembly.AlignmentMsg hits_list = 2;
+ */
+ public Builder setHitsList(
+ int index, org.rtassembly.npgraph.grpc.AlignmentMsg.Builder builderForValue) {
+ if (hitsListBuilder_ == null) {
+ ensureHitsListIsMutable();
+ hitsList_.set(index, builderForValue.build());
+ onChanged();
+ } else {
+ hitsListBuilder_.setMessage(index, builderForValue.build());
+ }
+ return this;
+ }
+ /**
+ * repeated .assembly.AlignmentMsg hits_list = 2;
+ */
+ public Builder addHitsList(org.rtassembly.npgraph.grpc.AlignmentMsg value) {
+ if (hitsListBuilder_ == null) {
+ if (value == null) {
+ throw new NullPointerException();
+ }
+ ensureHitsListIsMutable();
+ hitsList_.add(value);
+ onChanged();
+ } else {
+ hitsListBuilder_.addMessage(value);
+ }
+ return this;
+ }
+ /**
+ * repeated .assembly.AlignmentMsg hits_list = 2;
+ */
+ public Builder addHitsList(
+ int index, org.rtassembly.npgraph.grpc.AlignmentMsg value) {
+ if (hitsListBuilder_ == null) {
+ if (value == null) {
+ throw new NullPointerException();
+ }
+ ensureHitsListIsMutable();
+ hitsList_.add(index, value);
+ onChanged();
+ } else {
+ hitsListBuilder_.addMessage(index, value);
+ }
+ return this;
+ }
+ /**
+ * repeated .assembly.AlignmentMsg hits_list = 2;
+ */
+ public Builder addHitsList(
+ org.rtassembly.npgraph.grpc.AlignmentMsg.Builder builderForValue) {
+ if (hitsListBuilder_ == null) {
+ ensureHitsListIsMutable();
+ hitsList_.add(builderForValue.build());
+ onChanged();
+ } else {
+ hitsListBuilder_.addMessage(builderForValue.build());
+ }
+ return this;
+ }
+ /**
+ * repeated .assembly.AlignmentMsg hits_list = 2;
+ */
+ public Builder addHitsList(
+ int index, org.rtassembly.npgraph.grpc.AlignmentMsg.Builder builderForValue) {
+ if (hitsListBuilder_ == null) {
+ ensureHitsListIsMutable();
+ hitsList_.add(index, builderForValue.build());
+ onChanged();
+ } else {
+ hitsListBuilder_.addMessage(index, builderForValue.build());
+ }
+ return this;
+ }
+ /**
+ * repeated .assembly.AlignmentMsg hits_list = 2;
+ */
+ public Builder addAllHitsList(
+ java.lang.Iterable extends org.rtassembly.npgraph.grpc.AlignmentMsg> values) {
+ if (hitsListBuilder_ == null) {
+ ensureHitsListIsMutable();
+ com.google.protobuf.AbstractMessageLite.Builder.addAll(
+ values, hitsList_);
+ onChanged();
+ } else {
+ hitsListBuilder_.addAllMessages(values);
+ }
+ return this;
+ }
+ /**
+ * repeated .assembly.AlignmentMsg hits_list = 2;
+ */
+ public Builder clearHitsList() {
+ if (hitsListBuilder_ == null) {
+ hitsList_ = java.util.Collections.emptyList();
+ bitField0_ = (bitField0_ & ~0x00000001);
+ onChanged();
+ } else {
+ hitsListBuilder_.clear();
+ }
+ return this;
+ }
+ /**
+ * repeated .assembly.AlignmentMsg hits_list = 2;
+ */
+ public Builder removeHitsList(int index) {
+ if (hitsListBuilder_ == null) {
+ ensureHitsListIsMutable();
+ hitsList_.remove(index);
+ onChanged();
+ } else {
+ hitsListBuilder_.remove(index);
+ }
+ return this;
+ }
+ /**
+ * repeated .assembly.AlignmentMsg hits_list = 2;
+ */
+ public org.rtassembly.npgraph.grpc.AlignmentMsg.Builder getHitsListBuilder(
+ int index) {
+ return getHitsListFieldBuilder().getBuilder(index);
+ }
+ /**
+ * repeated .assembly.AlignmentMsg hits_list = 2;
+ */
+ public org.rtassembly.npgraph.grpc.AlignmentMsgOrBuilder getHitsListOrBuilder(
+ int index) {
+ if (hitsListBuilder_ == null) {
+ return hitsList_.get(index); } else {
+ return hitsListBuilder_.getMessageOrBuilder(index);
+ }
+ }
+ /**
+ * repeated .assembly.AlignmentMsg hits_list = 2;
+ */
+ public java.util.List extends org.rtassembly.npgraph.grpc.AlignmentMsgOrBuilder>
+ getHitsListOrBuilderList() {
+ if (hitsListBuilder_ != null) {
+ return hitsListBuilder_.getMessageOrBuilderList();
+ } else {
+ return java.util.Collections.unmodifiableList(hitsList_);
+ }
+ }
+ /**
+ * repeated .assembly.AlignmentMsg hits_list = 2;
+ */
+ public org.rtassembly.npgraph.grpc.AlignmentMsg.Builder addHitsListBuilder() {
+ return getHitsListFieldBuilder().addBuilder(
+ org.rtassembly.npgraph.grpc.AlignmentMsg.getDefaultInstance());
+ }
+ /**
+ * repeated .assembly.AlignmentMsg hits_list = 2;
+ */
+ public org.rtassembly.npgraph.grpc.AlignmentMsg.Builder addHitsListBuilder(
+ int index) {
+ return getHitsListFieldBuilder().addBuilder(
+ index, org.rtassembly.npgraph.grpc.AlignmentMsg.getDefaultInstance());
+ }
+ /**
+ * repeated .assembly.AlignmentMsg hits_list = 2;
+ */
+ public java.util.Liststring read_id = 1;
+ * @return The readId.
+ */
+ java.lang.String getReadId();
+ /**
+ * string read_id = 1;
+ * @return The bytes for readId.
+ */
+ com.google.protobuf.ByteString
+ getReadIdBytes();
+
+ /**
+ * repeated .assembly.AlignmentMsg hits_list = 2;
+ */
+ java.util.Listrepeated .assembly.AlignmentMsg hits_list = 2;
+ */
+ org.rtassembly.npgraph.grpc.AlignmentMsg getHitsList(int index);
+ /**
+ * repeated .assembly.AlignmentMsg hits_list = 2;
+ */
+ int getHitsListCount();
+ /**
+ * repeated .assembly.AlignmentMsg hits_list = 2;
+ */
+ java.util.List extends org.rtassembly.npgraph.grpc.AlignmentMsgOrBuilder>
+ getHitsListOrBuilderList();
+ /**
+ * repeated .assembly.AlignmentMsg hits_list = 2;
+ */
+ org.rtassembly.npgraph.grpc.AlignmentMsgOrBuilder getHitsListOrBuilder(
+ int index);
+}
diff --git a/src/main/java/org/rtassembly/npgraph/grpc/ResponseAssembly.java b/src/main/java/org/rtassembly/npgraph/grpc/ResponseAssembly.java
new file mode 100644
index 0000000..c1566c7
--- /dev/null
+++ b/src/main/java/org/rtassembly/npgraph/grpc/ResponseAssembly.java
@@ -0,0 +1,626 @@
+// Generated by the protocol buffer compiler. DO NOT EDIT!
+// source: npgraph_service.proto
+
+package org.rtassembly.npgraph.grpc;
+
+/**
+ *
+ * Response from the assembly guide service: useful or not
+ *
+ *
+ * Protobuf type {@code assembly.ResponseAssembly}
+ */
+public final class ResponseAssembly extends
+ com.google.protobuf.GeneratedMessageV3 implements
+ // @@protoc_insertion_point(message_implements:assembly.ResponseAssembly)
+ ResponseAssemblyOrBuilder {
+private static final long serialVersionUID = 0L;
+ // Use ResponseAssembly.newBuilder() to construct.
+ private ResponseAssembly(com.google.protobuf.GeneratedMessageV3.Builder> builder) {
+ super(builder);
+ }
+ private ResponseAssembly() {
+ readId_ = "";
+ }
+
+ @java.lang.Override
+ @SuppressWarnings({"unused"})
+ protected java.lang.Object newInstance(
+ UnusedPrivateParameter unused) {
+ return new ResponseAssembly();
+ }
+
+ @java.lang.Override
+ public final com.google.protobuf.UnknownFieldSet
+ getUnknownFields() {
+ return this.unknownFields;
+ }
+ private ResponseAssembly(
+ com.google.protobuf.CodedInputStream input,
+ com.google.protobuf.ExtensionRegistryLite extensionRegistry)
+ throws com.google.protobuf.InvalidProtocolBufferException {
+ this();
+ if (extensionRegistry == null) {
+ throw new java.lang.NullPointerException();
+ }
+ com.google.protobuf.UnknownFieldSet.Builder unknownFields =
+ com.google.protobuf.UnknownFieldSet.newBuilder();
+ try {
+ boolean done = false;
+ while (!done) {
+ int tag = input.readTag();
+ switch (tag) {
+ case 0:
+ done = true;
+ break;
+ case 10: {
+ java.lang.String s = input.readStringRequireUtf8();
+
+ readId_ = s;
+ break;
+ }
+ case 16: {
+
+ usefulness_ = input.readBool();
+ break;
+ }
+ default: {
+ if (!parseUnknownField(
+ input, unknownFields, extensionRegistry, tag)) {
+ done = true;
+ }
+ break;
+ }
+ }
+ }
+ } catch (com.google.protobuf.InvalidProtocolBufferException e) {
+ throw e.setUnfinishedMessage(this);
+ } catch (java.io.IOException e) {
+ throw new com.google.protobuf.InvalidProtocolBufferException(
+ e).setUnfinishedMessage(this);
+ } finally {
+ this.unknownFields = unknownFields.build();
+ makeExtensionsImmutable();
+ }
+ }
+ public static final com.google.protobuf.Descriptors.Descriptor
+ getDescriptor() {
+ return org.rtassembly.npgraph.grpc.AssemblyGuideProto.internal_static_assembly_ResponseAssembly_descriptor;
+ }
+
+ @java.lang.Override
+ protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
+ internalGetFieldAccessorTable() {
+ return org.rtassembly.npgraph.grpc.AssemblyGuideProto.internal_static_assembly_ResponseAssembly_fieldAccessorTable
+ .ensureFieldAccessorsInitialized(
+ org.rtassembly.npgraph.grpc.ResponseAssembly.class, org.rtassembly.npgraph.grpc.ResponseAssembly.Builder.class);
+ }
+
+ public static final int READ_ID_FIELD_NUMBER = 1;
+ private volatile java.lang.Object readId_;
+ /**
+ * string read_id = 1;
+ * @return The readId.
+ */
+ public java.lang.String getReadId() {
+ java.lang.Object ref = readId_;
+ if (ref instanceof java.lang.String) {
+ return (java.lang.String) ref;
+ } else {
+ com.google.protobuf.ByteString bs =
+ (com.google.protobuf.ByteString) ref;
+ java.lang.String s = bs.toStringUtf8();
+ readId_ = s;
+ return s;
+ }
+ }
+ /**
+ * string read_id = 1;
+ * @return The bytes for readId.
+ */
+ public com.google.protobuf.ByteString
+ getReadIdBytes() {
+ java.lang.Object ref = readId_;
+ if (ref instanceof java.lang.String) {
+ com.google.protobuf.ByteString b =
+ com.google.protobuf.ByteString.copyFromUtf8(
+ (java.lang.String) ref);
+ readId_ = b;
+ return b;
+ } else {
+ return (com.google.protobuf.ByteString) ref;
+ }
+ }
+
+ public static final int USEFULNESS_FIELD_NUMBER = 2;
+ private boolean usefulness_;
+ /**
+ * bool usefulness = 2;
+ * @return The usefulness.
+ */
+ public boolean getUsefulness() {
+ return usefulness_;
+ }
+
+ private byte memoizedIsInitialized = -1;
+ @java.lang.Override
+ public final boolean isInitialized() {
+ byte isInitialized = memoizedIsInitialized;
+ if (isInitialized == 1) return true;
+ if (isInitialized == 0) return false;
+
+ memoizedIsInitialized = 1;
+ return true;
+ }
+
+ @java.lang.Override
+ public void writeTo(com.google.protobuf.CodedOutputStream output)
+ throws java.io.IOException {
+ if (!getReadIdBytes().isEmpty()) {
+ com.google.protobuf.GeneratedMessageV3.writeString(output, 1, readId_);
+ }
+ if (usefulness_ != false) {
+ output.writeBool(2, usefulness_);
+ }
+ unknownFields.writeTo(output);
+ }
+
+ @java.lang.Override
+ public int getSerializedSize() {
+ int size = memoizedSize;
+ if (size != -1) return size;
+
+ size = 0;
+ if (!getReadIdBytes().isEmpty()) {
+ size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, readId_);
+ }
+ if (usefulness_ != false) {
+ size += com.google.protobuf.CodedOutputStream
+ .computeBoolSize(2, usefulness_);
+ }
+ size += unknownFields.getSerializedSize();
+ memoizedSize = size;
+ return size;
+ }
+
+ @java.lang.Override
+ public boolean equals(final java.lang.Object obj) {
+ if (obj == this) {
+ return true;
+ }
+ if (!(obj instanceof org.rtassembly.npgraph.grpc.ResponseAssembly)) {
+ return super.equals(obj);
+ }
+ org.rtassembly.npgraph.grpc.ResponseAssembly other = (org.rtassembly.npgraph.grpc.ResponseAssembly) obj;
+
+ if (!getReadId()
+ .equals(other.getReadId())) return false;
+ if (getUsefulness()
+ != other.getUsefulness()) return false;
+ if (!unknownFields.equals(other.unknownFields)) return false;
+ return true;
+ }
+
+ @java.lang.Override
+ public int hashCode() {
+ if (memoizedHashCode != 0) {
+ return memoizedHashCode;
+ }
+ int hash = 41;
+ hash = (19 * hash) + getDescriptor().hashCode();
+ hash = (37 * hash) + READ_ID_FIELD_NUMBER;
+ hash = (53 * hash) + getReadId().hashCode();
+ hash = (37 * hash) + USEFULNESS_FIELD_NUMBER;
+ hash = (53 * hash) + com.google.protobuf.Internal.hashBoolean(
+ getUsefulness());
+ hash = (29 * hash) + unknownFields.hashCode();
+ memoizedHashCode = hash;
+ return hash;
+ }
+
+ public static org.rtassembly.npgraph.grpc.ResponseAssembly parseFrom(
+ java.nio.ByteBuffer data)
+ throws com.google.protobuf.InvalidProtocolBufferException {
+ return PARSER.parseFrom(data);
+ }
+ public static org.rtassembly.npgraph.grpc.ResponseAssembly parseFrom(
+ java.nio.ByteBuffer data,
+ com.google.protobuf.ExtensionRegistryLite extensionRegistry)
+ throws com.google.protobuf.InvalidProtocolBufferException {
+ return PARSER.parseFrom(data, extensionRegistry);
+ }
+ public static org.rtassembly.npgraph.grpc.ResponseAssembly parseFrom(
+ com.google.protobuf.ByteString data)
+ throws com.google.protobuf.InvalidProtocolBufferException {
+ return PARSER.parseFrom(data);
+ }
+ public static org.rtassembly.npgraph.grpc.ResponseAssembly parseFrom(
+ com.google.protobuf.ByteString data,
+ com.google.protobuf.ExtensionRegistryLite extensionRegistry)
+ throws com.google.protobuf.InvalidProtocolBufferException {
+ return PARSER.parseFrom(data, extensionRegistry);
+ }
+ public static org.rtassembly.npgraph.grpc.ResponseAssembly parseFrom(byte[] data)
+ throws com.google.protobuf.InvalidProtocolBufferException {
+ return PARSER.parseFrom(data);
+ }
+ public static org.rtassembly.npgraph.grpc.ResponseAssembly parseFrom(
+ byte[] data,
+ com.google.protobuf.ExtensionRegistryLite extensionRegistry)
+ throws com.google.protobuf.InvalidProtocolBufferException {
+ return PARSER.parseFrom(data, extensionRegistry);
+ }
+ public static org.rtassembly.npgraph.grpc.ResponseAssembly parseFrom(java.io.InputStream input)
+ throws java.io.IOException {
+ return com.google.protobuf.GeneratedMessageV3
+ .parseWithIOException(PARSER, input);
+ }
+ public static org.rtassembly.npgraph.grpc.ResponseAssembly parseFrom(
+ java.io.InputStream input,
+ com.google.protobuf.ExtensionRegistryLite extensionRegistry)
+ throws java.io.IOException {
+ return com.google.protobuf.GeneratedMessageV3
+ .parseWithIOException(PARSER, input, extensionRegistry);
+ }
+ public static org.rtassembly.npgraph.grpc.ResponseAssembly parseDelimitedFrom(java.io.InputStream input)
+ throws java.io.IOException {
+ return com.google.protobuf.GeneratedMessageV3
+ .parseDelimitedWithIOException(PARSER, input);
+ }
+ public static org.rtassembly.npgraph.grpc.ResponseAssembly parseDelimitedFrom(
+ java.io.InputStream input,
+ com.google.protobuf.ExtensionRegistryLite extensionRegistry)
+ throws java.io.IOException {
+ return com.google.protobuf.GeneratedMessageV3
+ .parseDelimitedWithIOException(PARSER, input, extensionRegistry);
+ }
+ public static org.rtassembly.npgraph.grpc.ResponseAssembly parseFrom(
+ com.google.protobuf.CodedInputStream input)
+ throws java.io.IOException {
+ return com.google.protobuf.GeneratedMessageV3
+ .parseWithIOException(PARSER, input);
+ }
+ public static org.rtassembly.npgraph.grpc.ResponseAssembly parseFrom(
+ com.google.protobuf.CodedInputStream input,
+ com.google.protobuf.ExtensionRegistryLite extensionRegistry)
+ throws java.io.IOException {
+ return com.google.protobuf.GeneratedMessageV3
+ .parseWithIOException(PARSER, input, extensionRegistry);
+ }
+
+ @java.lang.Override
+ public Builder newBuilderForType() { return newBuilder(); }
+ public static Builder newBuilder() {
+ return DEFAULT_INSTANCE.toBuilder();
+ }
+ public static Builder newBuilder(org.rtassembly.npgraph.grpc.ResponseAssembly prototype) {
+ return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype);
+ }
+ @java.lang.Override
+ public Builder toBuilder() {
+ return this == DEFAULT_INSTANCE
+ ? new Builder() : new Builder().mergeFrom(this);
+ }
+
+ @java.lang.Override
+ protected Builder newBuilderForType(
+ com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
+ Builder builder = new Builder(parent);
+ return builder;
+ }
+ /**
+ *
+ * Response from the assembly guide service: useful or not
+ *
+ *
+ * Protobuf type {@code assembly.ResponseAssembly}
+ */
+ public static final class Builder extends
+ com.google.protobuf.GeneratedMessageV3.Builderstring read_id = 1;
+ * @return The readId.
+ */
+ public java.lang.String getReadId() {
+ java.lang.Object ref = readId_;
+ if (!(ref instanceof java.lang.String)) {
+ com.google.protobuf.ByteString bs =
+ (com.google.protobuf.ByteString) ref;
+ java.lang.String s = bs.toStringUtf8();
+ readId_ = s;
+ return s;
+ } else {
+ return (java.lang.String) ref;
+ }
+ }
+ /**
+ * string read_id = 1;
+ * @return The bytes for readId.
+ */
+ public com.google.protobuf.ByteString
+ getReadIdBytes() {
+ java.lang.Object ref = readId_;
+ if (ref instanceof String) {
+ com.google.protobuf.ByteString b =
+ com.google.protobuf.ByteString.copyFromUtf8(
+ (java.lang.String) ref);
+ readId_ = b;
+ return b;
+ } else {
+ return (com.google.protobuf.ByteString) ref;
+ }
+ }
+ /**
+ * string read_id = 1;
+ * @param value The readId to set.
+ * @return This builder for chaining.
+ */
+ public Builder setReadId(
+ java.lang.String value) {
+ if (value == null) {
+ throw new NullPointerException();
+ }
+
+ readId_ = value;
+ onChanged();
+ return this;
+ }
+ /**
+ * string read_id = 1;
+ * @return This builder for chaining.
+ */
+ public Builder clearReadId() {
+
+ readId_ = getDefaultInstance().getReadId();
+ onChanged();
+ return this;
+ }
+ /**
+ * string read_id = 1;
+ * @param value The bytes for readId to set.
+ * @return This builder for chaining.
+ */
+ public Builder setReadIdBytes(
+ com.google.protobuf.ByteString value) {
+ if (value == null) {
+ throw new NullPointerException();
+ }
+ checkByteStringIsUtf8(value);
+
+ readId_ = value;
+ onChanged();
+ return this;
+ }
+
+ private boolean usefulness_ ;
+ /**
+ * bool usefulness = 2;
+ * @return The usefulness.
+ */
+ public boolean getUsefulness() {
+ return usefulness_;
+ }
+ /**
+ * bool usefulness = 2;
+ * @param value The usefulness to set.
+ * @return This builder for chaining.
+ */
+ public Builder setUsefulness(boolean value) {
+
+ usefulness_ = value;
+ onChanged();
+ return this;
+ }
+ /**
+ * bool usefulness = 2;
+ * @return This builder for chaining.
+ */
+ public Builder clearUsefulness() {
+
+ usefulness_ = false;
+ onChanged();
+ return this;
+ }
+ @java.lang.Override
+ public final Builder setUnknownFields(
+ final com.google.protobuf.UnknownFieldSet unknownFields) {
+ return super.setUnknownFields(unknownFields);
+ }
+
+ @java.lang.Override
+ public final Builder mergeUnknownFields(
+ final com.google.protobuf.UnknownFieldSet unknownFields) {
+ return super.mergeUnknownFields(unknownFields);
+ }
+
+
+ // @@protoc_insertion_point(builder_scope:assembly.ResponseAssembly)
+ }
+
+ // @@protoc_insertion_point(class_scope:assembly.ResponseAssembly)
+ private static final org.rtassembly.npgraph.grpc.ResponseAssembly DEFAULT_INSTANCE;
+ static {
+ DEFAULT_INSTANCE = new org.rtassembly.npgraph.grpc.ResponseAssembly();
+ }
+
+ public static org.rtassembly.npgraph.grpc.ResponseAssembly getDefaultInstance() {
+ return DEFAULT_INSTANCE;
+ }
+
+ private static final com.google.protobuf.Parserstring read_id = 1;
+ * @return The readId.
+ */
+ java.lang.String getReadId();
+ /**
+ * string read_id = 1;
+ * @return The bytes for readId.
+ */
+ com.google.protobuf.ByteString
+ getReadIdBytes();
+
+ /**
+ * bool usefulness = 2;
+ * @return The usefulness.
+ */
+ boolean getUsefulness();
+}
diff --git a/src/main/java/org/rtassembly/npgraph/grpc/package-info.java b/src/main/java/org/rtassembly/npgraph/grpc/package-info.java
new file mode 100644
index 0000000..a8306a2
--- /dev/null
+++ b/src/main/java/org/rtassembly/npgraph/grpc/package-info.java
@@ -0,0 +1,8 @@
+/**
+ *
+ */
+/**
+ * @author sonnguyen
+ *
+ */
+package org.rtassembly.npgraph.grpc;
\ No newline at end of file
diff --git a/src/main/java/org/rtassembly/npscarf/RealtimeScaffolding.java b/src/main/java/org/rtassembly/npscarf/RealtimeScaffolding.java
index d1b48e4..9bee231 100644
--- a/src/main/java/org/rtassembly/npscarf/RealtimeScaffolding.java
+++ b/src/main/java/org/rtassembly/npscarf/RealtimeScaffolding.java
@@ -209,7 +209,7 @@ protected void analysis() {
sg.connectBridges();
try {
- // This function is for the sake of real-time annotation experiments being more readable
+ // This function make real-time annotation experiments more readable
scaffolding.graph.printRT(scaffolding.currentBaseCount);
sg.printSequences(ScaffoldGraph.updateGenome,false);
outOS.print("Time |\tStep |\tRead count |\tBase count|\tNumber of scaffolds|\tCircular scaffolds |\tN50 | \tBreaks (maxlen)\n");
diff --git a/src/main/proto/npgraph_service.proto b/src/main/proto/npgraph_service.proto
new file mode 100644
index 0000000..51006c4
--- /dev/null
+++ b/src/main/proto/npgraph_service.proto
@@ -0,0 +1,38 @@
+syntax = "proto3";
+
+option java_multiple_files = true;
+option java_package = "org.rtassembly.npgraph.grpc";
+option java_outer_classname = "AssemblyGuideProto";
+option objc_class_prefix = "AGP";
+
+package assembly;
+
+// Interface exported by the server.
+service AssemblyGuide {
+ rpc GetAssemblyContribution(RequestAssembly) returns (ResponseAssembly) {}
+}
+
+// An alignment from minimap2 sent to the server
+message AlignmentMsg {
+ string query_name = 1;
+ int32 query_length = 2;
+ int32 query_start = 3;
+ int32 query_end = 4;
+ bool strand = 5;
+ string target_name = 6;
+ int32 target_length = 7;
+ int32 target_start = 8;
+ int32 target_end = 9;
+ int32 quality = 10;
+ int32 score = 11;
+}
+// Client sent all hits from a chunk simultaneously
+message RequestAssembly {
+ string read_id = 1;
+ repeated AlignmentMsg hits_list = 2;
+}
+// Response from the assembly guide service: useful or not
+message ResponseAssembly {
+ string read_id = 1;
+ bool usefulness = 2;
+}
\ No newline at end of file