Skip to content

Commit

Permalink
Fix nullpointer in getTypedListValue
Browse files Browse the repository at this point in the history
  • Loading branch information
bartcharbon committed Aug 23, 2024
1 parent 1f348b1 commit 8a548c7
Show file tree
Hide file tree
Showing 2 changed files with 62 additions and 11 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -262,7 +262,8 @@ public static Object getTypedVcfValue(Field field, String stringValue) {


public static Object getTypedVcfListValue(Field field, String stringValue) {
String[] stringValues = stringValue.split(field.getSeparator().toString());
String separator = field.getSeparator() != null ? field.getSeparator().toString() : ",";
String[] stringValues = stringValue.split(separator);
List<Object> values = new ArrayList<>();
for (String value : stringValues) {
values.add(getTypedVcfValue(field, value));
Expand Down
70 changes: 60 additions & 10 deletions src/test/resources/field_metadata.json
Original file line number Diff line number Diff line change
Expand Up @@ -17,9 +17,17 @@
"MT"
]
},
"ALR": {
"label": "Allelic length ranges",
"description": "Straglr: Allelic length ranges",
"ACR": {
"label": "Allelic copy ranges",
"description": "Straglr: Allelic copy ranges",
"numberType": "PER_GENOTYPE",
"numberCount": 2,
"separator": "-",
"type": "FLOAT"
},
"AC": {
"label": "Allelic copies",
"description": "Straglr: Allelic copies",
"numberType": "PER_GENOTYPE",
"numberCount": 2,
"separator": "-",
Expand Down Expand Up @@ -159,6 +167,48 @@
"separator": "&",
"type": "STRING"
},
"FATHMM_MKL_NC": {
"label": "FATHMM-MKL-NC",
"description": "Predict the Functional Consequences of Non-Coding Single Nucleotide Variants (SNVs)",
"numberType": "NUMBER",
"numberCount": 1,
"type": "FLOAT"
},
"GDB_PRO": {
"label": "GDB_PRO",
"description": "Highest GREEN-DB constraint score for overlapping promotor regions.",
"numberType": "NUMBER",
"numberCount": 1,
"type": "FLOAT"
},
"GDB_ENH": {
"label": "GDB_ENH",
"description": "Highest GREEN-DB constraint score for overlapping enhancer regions.",
"numberType": "NUMBER",
"numberCount": 1,
"type": "FLOAT"
},
"GDB_BIV": {
"label": "GDB_BIV",
"description": "Highest GREEN-DB constraint score for overlapping bivalent regions.",
"numberType": "NUMBER",
"numberCount": 1,
"type": "FLOAT"
},
"GDB_SIL": {
"label": "GDB_SIL",
"description": "Highest GREEN-DB constraint score for overlapping silencer regions.",
"numberType": "NUMBER",
"numberCount": 1,
"type": "FLOAT"
},
"GDB_INS": {
"label": "GDB_INS",
"description": "Highest GREEN-DB constraint score for overlapping insulater regions.",
"numberType": "NUMBER",
"numberCount": 1,
"type": "FLOAT"
},
"Feature_type": {
"label": "Feature Type.",
"description": "The VEP feature type",
Expand Down Expand Up @@ -349,6 +399,13 @@
"separator": "&",
"type": "INTEGER"
},
"ReMM": {
"label": "ReMM",
"description": "The Regulatory Mendelian Mutation (ReMM) score was created for relevance prediction of non-coding variations (SNVs and small InDels) in the human genome (hg19) in terms of Mendelian diseases.",
"numberType": "NUMBER",
"numberCount": 1,
"type": "FLOAT"
},
"SIFT": {
"label": "SIFT",
"description": "SIFT score.",
Expand Down Expand Up @@ -413,13 +470,6 @@
"type": "STRING",
"required": true
},
"VIPL": {
"label": "VIP labels",
"description": "VIP decision tree labels",
"numberType": "NUMBER",
"numberCount": 1,
"type": "STRING"
},
"VIPP": {
"label": "VIP path",
"description": "VIP decision tree path",
Expand Down

0 comments on commit 8a548c7

Please sign in to comment.