The Fend class

A class for handling HiC fend information.

class hifive.fend.Fend(filename, mode='r', silent=False)

This class handles restriction enzyme digest-generated fragment data for HiC experiments.

This class stores a list of chromosomes, a dictionary for converting from chromosome label to integer and back, fragment starts, stops, and chromosome number in an h5dict.

Note

This class is also available as hifive.Fend

When initialized, this class creates an h5dict in which to store all data associated with this object.

Parameters:
  • filename (str.) – The file name of the h5dict. This should end with the suffix ‘.hdf5’
  • mode (str.) – The mode to open the h5dict with. This should be ‘w’ for creating or overwriting an h5dict with name given in filename.
  • silent (bool.) – Indicates whether to print information about function execution for this object.
Returns:

Fend class object

load()

Load fend data from h5dict specified at object creation.

Any call of this function will overwrite current object data with values from the last save() call.

Returns:None
load_fends(filename, genome_name=None, re_name=None, format=None)

Parse and store fend data in h5dict.

Parameters:
  • filename (str.) – A file name to read restriction fragment data from. The file may be a ‘mat’ file compatible with HiCPipe, or a BED file containing RE fragment boundaries or cutsites.
  • genome_name (str.) – The name of the species and build. Optional.
  • re_name (str.) – The name of the restriction enzyme used to produce the fragment set. Optional.
  • format (str.) – Format of the input file. If not specified, it will be inferred from the file extension. Optional.
Returns:

None

save()

Save fend data to h5dict.

Returns:None