File tree Expand file tree Collapse file tree 2 files changed +14
-0
lines changed
biodata-models/src/main/proto/protobuf/opencb
biodata-tools/src/main/java/org/opencb/biodata/tools/variant/converters/proto Expand file tree Collapse file tree 2 files changed +14
-0
lines changed Original file line number Diff line number Diff line change @@ -93,6 +93,7 @@ message ConsequenceType {
9393 repeated SpliceScores spliceScores = 16 ;
9494 repeated string transcriptFlags = 17 ;
9595 string source = 18 ;
96+ repeated string acmg = 19 ;
9697}
9798
9899message Repeat {
@@ -248,6 +249,12 @@ message CancerHotspotVariantAnnotation {
248249 string source = 10 ;
249250}
250251
252+ message GenomicSequenceContext {
253+ int32 start = 1 ;
254+ int32 end = 2 ;
255+ string sequence = 3 ;
256+ }
257+
251258message VariantAnnotation {
252259 string chromosome = 1 ;
253260 int32 start = 2 ;
@@ -285,6 +292,8 @@ message VariantAnnotation {
285292 repeated GwasAssociation gwas = 30 ;
286293 repeated CancerHotspotVariantAnnotation cancer_hotspots = 31 ;
287294
295+ GenomicSequenceContext genomic_sequence_context = 32 ;
296+
288297 message AdditionalAttribute {
289298 map <string , string > attribute = 1 ;
290299 }
Original file line number Diff line number Diff line change 1212import java .util .function .Consumer ;
1313import java .util .function .Function ;
1414import java .util .function .Supplier ;
15+ import java .util .stream .Collectors ;
1516
1617public class AvroToProtoConverter {
1718 private final Map <String , Message .Builder > builders = new HashMap <>();
@@ -46,6 +47,10 @@ protected <Builder extends Message.Builder> Builder toProto(GenericRecord record
4647 logger .warn ("Number of fields mismatch at " + context + ": Avro fields="
4748 + record .getSchema ().getFields ().size () + ", Proto fields=" + descriptor .getFields ().size ()
4849 + ", missing avro fields: " + missingInAvro + ", missing proto fields: " + missingInProto );
50+ logger .warn ("Proto fields: "
51+ + descriptor .getFields ().stream ().map (Descriptors .FieldDescriptor ::getJsonName ).sorted ().collect (Collectors .toList ()));
52+ logger .warn ("Avro fields: "
53+ + record .getSchema ().getFields ().stream ().map (Schema .Field ::name ).sorted ().collect (Collectors .toList ()));
4954 throw new IllegalArgumentException ("Number of fields mismatch at " + context + ": Avro fields="
5055 + record .getSchema ().getFields ().size () + ", Proto fields=" + descriptor .getFields ().size ());
5156 }
You can’t perform that action at this time.
0 commit comments