code: public void addFile(String filename, VCFHeader vcfHeader, String studyId) {
          // sanity check
          if (StringUtils.isEmpty(filename)) {
              logger.error("VCF filename is empty or null: '{}'", filename);
              return;
          }
          if (vcfHeader == null) {
              logger.error("VCF header is missingDataset not found. Check your study ID: '{}'", studyId);
              return;
          }
  
          VCFHeaderToVariantFileHeaderConverter headerConverter = new VCFHeaderToVariantFileHeaderConverter();
          VariantFileMetadata variantFileMetadata = new VariantFileMetadata();
          variantFileMetadata.setId(filename);
          variantFileMetadata.setSampleIds(vcfHeader.getSampleNamesInOrder());
          variantFileMetadata.setHeader(headerConverter.convert(vcfHeader));
          addFile(variantFileMetadata, studyId);
      }
docs: Add a variant file metadata (from VCF file and header) to a given variant study metadata (from study ID).
  
  @param filename      VCF filename (as an ID)
  @param vcfHeader     VCF header
  @param studyId       Study ID