filename (str.) – A file name to read genome paritioning data from. The file may be a BED file containing bin boundaries or a chromosome length file.

genome_name (str.) – The name of the species and build. Optional.

format (str.) – Format of the input file. If not specified, it will be inferred from the file extension. This can be either ‘bed’ and ‘len’. Optional.

Returns:

None

Attributes:

chromosomes (ndarray) - A numpy array containing chromosome names as strings. The position of the chromosome name in this array is referred to as the chromosome index.

bins (ndarray) - A numpy array of length N where N is the number of bins partitioning the genome into ‘binned’ sized intervals, starting with the first bin to contain a fend and containing the fields ‘chr’, ‘start’, ‘stop’, ‘mid’, and ‘num_fends’. All of these are of type int32. The ‘chr’ field contains the index of the chromosome. The ‘num_fends’ field corresponds to the number of fends falling in each bin interval as determined by fend mipoint. If the bed file or fend file used to create the Fend object contains additional columns, these features are also included as fields with names corresponding to the header names and values corresponding to the mean across all fends within a bin. These additional fields are of type float32. If produced from a bed file, fends are sorted by chromosome (the order in the ‘chromosomes’ array) and then by coordinates.

bin_indices (ndarray) - A numpy array with a length of the number of chromosomes in ‘chromosomes’ + 1. This array contains the first position in ‘bins’ for the chromosome in the corresponding position in the ‘chromosomes’ array. The last position in the array contains the total number of bins.

genome_name (str.) - A string (or None if not passed as argument) of the genome from which the fends originated.

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

Attributes:

chromosomes (ndarray) - A numpy array containing chromosome names as strings. The position of the chromosome name in this array is referred to as the chromosome index.

fends (ndarray) - A numpy array of length N where N is the number of fends and containing the fields ‘chr’, ‘start’, ‘stop’, and ‘mid’. All of these are of type int32. The ‘chr’ field contains the index of the chromosome. If the bed file or fend file used to create the Fend object contains additional columns, these features are also included as fields with names corresponding to the header names. These additional fields are of type float32. If produced from a bed file, fends are sorted by chromosome (the order in the ‘chromosomes’ array) and then by coordinates.

chr_indices (ndarray) - A numpy array with a length of the number of chromosomes in ‘chromosomes’ + 1. This array contains the first position in ‘fends’ for the chromosome in the corresponding position in the ‘chromosomes’ array. The last position in the array contains the total number of fends.

bins (ndarray) - Present only if ‘binned’ is not None. A numpy array of length N where N is the number of bins partitioning the genome into ‘binned’ sized intervals, starting with the first bin to contain a fend and containing the fields ‘chr’, ‘start’, ‘stop’, ‘mid’, and ‘num_fends’. All of these are of type int32. The ‘chr’ field contains the index of the chromosome. The ‘num_fends’ field corresponds to the number of fends falling in each bin interval as determined by fend mipoint. If the bed file or fend file used to create the Fend object contains additional columns, these features are also included as fields with names corresponding to the header names and values corresponding to the mean across all fends within a bin. These additional fields are of type float32. If produced from a bed file, fends are sorted by chromosome (the order in the ‘chromosomes’ array) and then by coordinates.

bin_indices (ndarray) - Present only if ‘binned’ is not None. A numpy array with a length of the number of chromosomes in ‘chromosomes’ + 1. This array contains the first position in ‘bins’ for the chromosome in the corresponding position in the ‘chromosomes’ array. The last position in the array contains the total number of bins.

genome_name (str.) - A string (or None if not passed as argument) of the genome from which the fends originated.

re_name (str.) - A string (or None if not passed as argument) of the restriction enzyme used to produce the fends.