Class DataFrame
java.lang.Object
org.snpsift.annotate.mem.dataFrame.DataFrame
- All Implemented Interfaces:
Serializable
- Direct Known Subclasses:
DataFrameDel
,DataFrameIns
,DataFrameMixed
,DataFrameMnp
,DataFrameOther
,DataFrameSnp
A set of DataColumns, indexed by position
This is used to store data for a chromosome
- See Also:
-
Field Summary
Fields -
Constructor Summary
ConstructorsConstructorDescriptionDataFrame
(VariantTypeCounter variantTypeCounter, VariantCategory variantCategory, boolean hasRefs, boolean hasAlts) -
Method Summary
Modifier and TypeMethodDescriptionvoid
add
(DataFrameRow row) Add a row to the data framevoid
check()
protected DataFrameColumn
<?> createColumn
(org.snpeff.vcf.VcfHeaderInfo vcfHeaderInfo) Create a column of a given typeprotected void
Create columns based on fieldsprotected boolean
Does the entry at possition 'idx' match the given (pos, ref, alt) values?protected int
Get data from a column index by searching by position, reference and alternative alleles.protected Object
Get data from a column by searching by position, reference and alternative alleles.Get a columnGet a 'row' from the data frame.boolean
Get data from a column by searching by position, reference and alternative alleles.void
resize()
Resize and memory optimize the dataprotected void
Set data in a columnlong
Memory size of this objecttoString()
-
Field Details
-
MAX_ROWS_TO_SHOW
public static final int MAX_ROWS_TO_SHOW- See Also:
-
-
Constructor Details
-
DataFrame
public DataFrame(VariantTypeCounter variantTypeCounter, VariantCategory variantCategory, boolean hasRefs, boolean hasAlts)
-
-
Method Details
-
add
Add a row to the data frame -
check
public void check() -
columnNames
-
createColumn
Create a column of a given type -
createColumns
protected void createColumns()Create columns based on fields -
eq
Does the entry at possition 'idx' match the given (pos, ref, alt) values? -
get
Get data from a column by searching by position, reference and alternative alleles. Note: The value can be null -
getColumn
Get a column -
getRow
Get a 'row' from the data frame.- Parameters:
pos
- : Positionref
- : Reference allelealt
- : Alternative allele- Returns:
- A data frame row if found, or null if not found
-
find
Get data from a column index by searching by position, reference and alternative alleles.- Returns:
- The index of the row in the data frame, or -1 if not found
-
hasEntry
Get data from a column by searching by position, reference and alternative alleles. Note: The value can be null -
resize
public void resize()Resize and memory optimize the data -
set
Set data in a column -
sizeBytes
public long sizeBytes()Memory size of this object -
toString
-