The FiveCData class

A class for handling 5C read data.

class hifive.fivec_data.FiveCData(filename, mode='r', silent=False)

This class handles interaction count data for 5C experiments.

This class stores mapped paired-end reads, indexing them by fragment number, in an h5dict.

Note

This class is also available as hifive.FiveCData

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:

FiveCData class object.

load()

Load 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_data_from_bam(fragfilename, filelist)

Read interaction counts from pairs of BAM files and place in h5dict.

Parameters:
  • fragfilename (str.) – This specifies the file name of the Fragment object to associate with the dataset.
  • filelist (list) – A list containing lists of paired read end files.
Returns:

None

load_data_from_counts(fragfilename, filelist)

Read interaction counts from a text file(s) and place in h5dict.

Parameters:
  • fragfilename (str.) – This specifies the file name of the Fragment object to associate with the dataset.
  • filelist (list) – A list containing all of the file names of counts text files to be included in the dataset. If only one file is needed, this may be passed as a string.
Returns:

None

save()

Save analysis parameters to h5dict.

Returns:None