All Downloads are FREE. Search and download functionalities are using the official Maven repository.

org.pharmgkb.parser.vcf.VcfTransformation Maven / Gradle / Ivy

There is a newer version: 0.3.1
Show newest version
package org.pharmgkb.parser.vcf;

import org.pharmgkb.parser.vcf.model.VcfMetadata;
import org.pharmgkb.parser.vcf.model.VcfPosition;
import org.pharmgkb.parser.vcf.model.VcfSample;

import javax.annotation.Nonnull;
import java.util.List;

/**
 * A transformation applied to VCF data lines and metadata.
 * @author Douglas Myers-Turnbull
 */
public interface VcfTransformation {

  /**
   * Modifies the argument {@code metadata}. The default method does nothing.
   */
  default void transformMetadata(@Nonnull VcfMetadata metadata) {}

  /**
   * Modifies the arguments {@code position} and {@code sampleData}. Should not modify {@code metadata}.
   * The default method does nothing.
   * @return If false, the VcfPosition will be removed
   */
  default boolean transformDataLine(@Nonnull VcfMetadata metadata, @Nonnull VcfPosition position,
      @Nonnull List sampleData) {
    return true;
  }

}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy