1
$\begingroup$

I have a bunch of .hic files of different species. But, I don't know which reference genome assembly (e.g. GRCh37 or GRCh38 in the case of human genome) the genomic co-ordinates of the .hic file correspond to. So I wonder if there is any way to figure out the version of the reference genome assembly from a .hic file.

Therefore, my question is: Does .hic file contain metadata such as the version of reference genome assembly? If yes, then how could I access it?

(I could obtain the information I need by digging into the methods sections of each paper corresponding to each .hic file. But it would be much better if I could get that right-away from the .hic file.).

$\endgroup$

1 Answer 1

1
$\begingroup$

Turns out HiC file does store such metadata.

straw tool from Aiden Lab contains a script (read_hic_header.py) that prints out the metadata from a given HiC file. Usage: read_hic_header.py <hic file or URL> [verbose]

In order to obtain the metadata in the form of a dictionary, one may consider using a function of the same tool that is currently available in my fork.

from straw import straw_module
straw_module.read_metadata(infile,verbose=False)

Args
    infile: str, path to the HiC file 
    verbose: bool, print the metadata if True else return the metadata
Returns
    metadata: dict, the metadata is returned if verbose is False. 
                Keys of the metadata: 
                HiC version, 
                Master index, 
                Genome ID (str), 
                Attribute dictionary (dict), 
                Chromosomes (dict), 
                chromosomes2length (dict), 
                Base pair-delimited resolutions (list), 
                Fragment-delimited resolutions (list). 
$\endgroup$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Not the answer you're looking for? Browse other questions tagged or ask your own question.