Package VCF

Class Position


  • public class Position
    extends java.lang.Object
    Represents a position in a VCF file
    • Constructor Summary

      Constructors 
      Constructor Description
      Position​(PositionMeta meta, java.util.LinkedHashMap<java.lang.String,​java.lang.String> genotypes)
      Constructor
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      java.util.List<Genotype> genotypeList()
      Get a list of genotypes for this position
      java.util.stream.Stream<Genotype> genotypeStream()
      Get a stream of genotypes for this position
      PositionMeta meta()
      Get the meta data for this position
      java.lang.String[] samples()
      Get a stream of sample names for this position
      java.lang.String toString()
      Returns the position meta data as a string
      java.lang.String toText()
      Returns the entire position (including data) as a string
      • Methods inherited from class java.lang.Object

        equals, getClass, hashCode, notify, notifyAll, wait, wait, wait
    • Constructor Detail

      • Position

        public Position​(PositionMeta meta,
                        java.util.LinkedHashMap<java.lang.String,​java.lang.String> genotypes)
        Constructor
        Parameters:
        meta - Meta data for this position
        genotypes - Map from sample name to genotype
    • Method Detail

      • meta

        public PositionMeta meta()
        Get the meta data for this position
        Returns:
        The meta data
      • genotypeStream

        public java.util.stream.Stream<Genotype> genotypeStream()
        Get a stream of genotypes for this position
        Returns:
        Stream of genotypes
      • genotypeList

        public java.util.List<Genotype> genotypeList()
        Get a list of genotypes for this position
        Returns:
        List of genotypes
      • samples

        public java.lang.String[] samples()
        Get a stream of sample names for this position
        Returns:
        Stream of sample names
      • toString

        public java.lang.String toString()
        Returns the position meta data as a string
        Overrides:
        toString in class java.lang.Object
        Returns:
        String representing the position meta data
      • toText

        public java.lang.String toText()
        Returns the entire position (including data) as a string
        Returns:
        String representing the position