code: private SequenceLocation parseVariant(String[] fields, FastaIndexManager fastaIndexManager,
                                            boolean isGermline) throws RocksDBException {
  
          SequenceLocation sequenceLocation = parsePosition(fields, isGermline);
          int gDescriptionColumnIndex = isGermline ? 19 : 10;
          String gDescription = fields[gDescriptionColumnIndex];
  
          boolean validVariant = true;
          if (gDescription.contains(">")) {
              validVariant = parseSnv(gDescription, sequenceLocation);
              if (!validVariant) {
                  invalidSubstitutionLines++;
              }
          } else if (gDescription.contains("del")) {
              validVariant = parseDeletion(gDescription, sequenceLocation, fastaIndexManager);
              if (!validVariant) {
                  invalidDeletionLines++;
              }
          } else if (gDescription.contains("ins")) {
              validVariant = parseInsertion(gDescription, sequenceLocation);
              if (!validVariant) {
                  invalidInsertionLines++;
              }
          } else if (gDescription.contains("dup")) {
              parseDuplication(gDescription);
              nDuplications++;
              validVariant = false;
          } else {
              validVariant = false;
              invalidgDescriptionOtherReason++;
          }
  
          return validVariant ? sequenceLocation : null;
      }
docs: Check whether the variant is valid and parse it.
  
  @return true if valid mutation, false otherwise