Class DataFrameRow

java.lang.Object
org.snpsift.annotate.mem.dataFrame.DataFrameRow
All Implemented Interfaces:
Serializable, Iterable<String>

public class DataFrameRow extends Object implements Serializable, Iterable<String>
The DataFrameRow class represents a row in a DataFrame. It implements the Serializable and Iterable interfaces. Each DataFrameRow object holds a reference to its parent DataFrame, its position, reference allele, alternative allele, and an index within the DataFrame. It also maintains a map of values for each column in the DataFrame. The class provides methods to: - Retrieve all data for the row from the DataFrame. - Get and set values for specific columns. - Populate the DataFrame with values from the row. - Iterate over the column names of the DataFrame. Non-obvious limitations: - The values map is lazily initialized when getDataFrameValues() is called for the first time. - The get() method assumes that the values map has been populated, either by calling getDataFrameValues() or by setting values explicitly. - The setDataFrame() methods update the DataFrame with values from the row, but do not automatically synchronize changes made directly to the DataFrame.
See Also:
  • Constructor Details

  • Method Details

    • getDataFrameValues

      public Map<String,Object> getDataFrameValues()
      Return all data for this row from the data frame
    • get

      public Object get(String columnName)
    • getDataFrameValue

      public Object getDataFrameValue(String columnName)
      Get data single column value from the data frame
    • getAlt

      public String getAlt()
    • getIdx

      public int getIdx()
    • getPos

      public int getPos()
    • getRef

      public String getRef()
    • getValues

      public Map<String,Object> getValues()
    • iterator

      public Iterator<String> iterator()
      Specified by:
      iterator in interface Iterable<String>
    • set

      public void set(String columnName, Object value)
    • setDataFrame

      public void setDataFrame(String columnName)
      Set the data frame with a value from this row
    • setDataFrame

      public void setDataFrame(String columnName, Object value)
      Set the data frame with a specific value
    • setDataFrame

      public void setDataFrame()
      Populate row in DataFrame with the values in this row
    • setIdx

      protected void setIdx(int idx)
    • toString

      public String toString()
      Overrides:
      toString in class Object