Skip to content

Commit

Permalink
lib: fix NPE, #TASK-5816, #TASK-5789
Browse files Browse the repository at this point in the history
  • Loading branch information
jtarraga committed Mar 12, 2024
1 parent 692cad2 commit 90a4f68
Showing 1 changed file with 6 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -171,9 +171,12 @@ public void parse() throws Exception {
String[] freqFields = study.split("[:,]");
if (freqFields.length == alt.length + 2) {
for (int i = 0; i < alt.length; i++) {
if (".".equals(freqFields[i + 2])) {
logger.warn("Skipping pop. frequency for alt. allele ({}) of study {}: it is '.')",
alt[i], freqFields[0]);
if (".".equals(freqFields[1])) {
logger.warn("Skipping pop. frequency for ref. allele ({}) of study {}: it is '.')",
ref, freqFields[0]);
} else if (".".equals(freqFields[i + 2])) {
logger.warn("Skipping pop. frequency for alt. allele ({}) of study {}: it is '.')",
alt[i], freqFields[0]);
} else {
PopulationFrequency populationFrequency = new PopulationFrequency();
populationFrequency.setStudy(freqFields[0]);
Expand Down

0 comments on commit 90a4f68

Please sign in to comment.