Package org.snpeff.serializer

# Class MarkerSerializer

java.lang.Object
org.snpeff.serializer.MarkerSerializer

public class MarkerSerializer extends Object
Serialize markers to (and from) file

Note: Marker's children are serialized first (e.g. a transcript get all exons serialized first).

Note: Since Marker is a tree-like structure, we first load all the markers and then assign parents. Markers are assigned a fake parent object (MarkerParentId) which is later replaced by the 'real' parent.

Note: All 'IDs' used have not meaning outside this serialization process.

Author:
  pcingola

## Constructor Summary

Constructors
Constructor
Description
`MarkerSerializer(Genome genome)`

## Method Summary

Modifier and Type
Method
Description
`void`
`doNotSave(Marker m)`
`protected TxtSerializable`
`getById(int id)`
`int`
`getIdByMarker(Marker m)`
`protected Marker`
`getMarkerById(int id)`
`String`
`getNextField()`
`boolean`
`getNextFieldBoolean()`
`int`
`getNextFieldInt()`
`Marker`
`getNextFieldMarker()`
`Markers`
`getNextFieldMarkers()`
`protected int`
`getNextId()`
`Markers`
`load(String fileName)`
Load data from file
`String`
`save(Iterable<Marker> markersCollection)`
Save all markers
`void`
`save(String fileName, Markers markers)`
Save data to file
`int`
`save(Marker m)`
Save a marker

### Methods inherited from class java.lang.Object

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

## Constructor Details

### MarkerSerializer

public MarkerSerializer(Genome genome)

## Method Details

### doNotSave

public void doNotSave(Marker m)

### getById

protected TxtSerializable getById(int id)

### getIdByMarker

public int getIdByMarker(Marker m)

### getMarkerById

protected Marker getMarkerById(int id)

### getNextField

public String getNextField()

### getNextFieldBoolean

public boolean getNextFieldBoolean()

### getNextFieldInt

public int getNextFieldInt()

### getNextFieldMarker

public Marker getNextFieldMarker()

### getNextFieldMarkers

public Markers getNextFieldMarkers()

### getNextId

protected int getNextId()

### load

public Markers load(String fileName)
Load data from file

### save

public String save(Iterable<Marker> markersCollection)
Save all markers

### save

public int save(Marker m)
Save a marker

### save

public void save(String fileName, Markers markers)
Save data to file