# Class GuessTableTypes

java.lang.Object
org.snpeff.fileIterator.GuessTableTypes

public class GuessTableTypes extends Object
Given a table in a TXT file, try to guess the value types for each column

Author:
  pcingola

## Field Summary

Fields
Modifier and Type
Field
Description
`static boolean`
`debug`
`static int`
`MIN_LINES`

## Constructor Summary

Constructors
Constructor
Description
`GuessTableTypes(String fileName)`

## Method Summary

Modifier and Type
Method
Description
`boolean`
`foundAllTypes()`
`String[]`
`getFieldNames()`
`String`
`getFileName()`
`boolean[]`
`getMultipleValues()`
`HashMap<String,Integer>`
`getNames2index()`
`VcfInfoType`
`getType(String fieldName)`
Get field type
`VcfInfoType[]`
`getTypes()`
Get an array of types (ordered by column)
`VcfInfoType`
`guessType(String value)`
Guess data type for this value
`boolean`
`guessTypes()`
Find column names form header and guess data types from values
`Boolean`
`isMultipleValues(String fieldName)`
Has this field multiple values
`boolean`
`parsedHeader()`
`void`
`setColumnSeparator(String columnSeparator)`
`void`
`setSubfieldSeparator(String subfieldSeparator)`
`String`
`toString()`

### Methods inherited from class Object

`clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait`

## Field Details

### debug

public static boolean debug

### MIN_LINES

public static int MIN_LINES

## Constructor Details

### GuessTableTypes

public GuessTableTypes(String fileName)

## Method Details

### foundAllTypes

public boolean foundAllTypes()

### getFieldNames

public String[] getFieldNames()

### getFileName

public String getFileName()

### getMultipleValues

public boolean[] getMultipleValues()

### getNames2index

public HashMap<String,Integer> getNames2index()

### getType

public VcfInfoType getType(String fieldName)
Get field type

Parameters:
  `fieldName` -
Returns:

### getTypes

public VcfInfoType[] getTypes()
Get an array of types (ordered by column)

Returns:

### guessType

public VcfInfoType guessType(String value)
Guess data type for this value

Parameters:
  `value` -
Returns:

### guessTypes

public boolean guessTypes()
Find column names form header and guess data types from values

Returns:
  true of OK, false if there was an error parsing header or data

### isMultipleValues

public Boolean isMultipleValues(String fieldName)
Has this field multiple values

Parameters:
  `fieldName` -
Returns:

### parsedHeader

public boolean parsedHeader()

### setColumnSeparator

public void setColumnSeparator(String columnSeparator)

### setSubfieldSeparator

public void setSubfieldSeparator(String subfieldSeparator)

### toString

public String toString()

Overrides:
  `toString` in class `Object`