the second column is named “position 1” or “position.1”
the third column is named “position 2” or “position.2”
the fourth column is named “x.Ry”, and x is the id of the
condition (“1”, or “2”, usually), y is the id of the replicate
(“1”, “2”, “3”, etc.); it should contain matrix counts
the remaining columns are optional, and should be formatted like
the fourth column
Note that a hic file can include several matrices, with different bin
sizes. This is why the bin size should be provided.
We show here how to parse several files (actually, the same file,
several times). We suppose here that we have 2 conditions, with 3
replicates for each condition.
Please note that the cool and mcool format store data in HDF5 format.
The HDF5
package
is not included by default, because it requires a substantial time to be
compiled, and many users will not need the cool/mcool parser. So, in
order to use the cool/mcool parser, you should install the rhdf5
package.
A tabular file is a tab-separated multi-replicate sparse matrix with a
header:
chromosome position 1 position 2 C1.R1 C1.R2 C1.R3 ...
Y 1500000 7500000 145 184 72 ...
The number of interactions between position 1 and position 2 of
chromosome are reported in each condition.replicate column. There is
no limit to the number of conditions and replicates.
The output is a
InteractionSet.
This object can store one or several samples. Please read the
corresponding
vignette
in order to known more about this format.
@Manual{hicparser,
title = {A multiple format Hi-C data parser},
author = {Elise Maigné and Matthias Zytnicki},
year = {2024},
url = {http://www.bioconductor.org/packages/HiCParser},
note = {https://github.com/emaigne/HiCParser/HiCParser - R package version 0.1.0},
doi = {10.18129/B9.bioc.HiCParser},
}
Please note that the HiCParser was only made possible thanks to many
other R and bioinformatics software authors, which are cited either in
the vignettes and/or the paper(s) describing this package.
Code of Conduct
Please note that the HiCParser project is released with a Contributor
Code of Conduct. By
contributing to this project, you agree to abide by its terms.
HiCParser
The goal of
HiCParseris to parse Hi-C data (HiCParsersupports serveral formats), and import them in R, as anInteractionSetobject.Installation instructions
Get the latest stable
Rrelease from CRAN. Then installHiCParserfrom Bioconductor using the following code:And the development version from GitHub with:
Then load the package :
Supported formats
So far,
HiCParsersupports:cool and mcool formats
hic format
HiC-Pro format
A tabular format, where
Example
hic format
We show here how to parse one hic format file.
Note that a hic file can include several matrices, with different bin sizes. This is why the bin size should be provided.
We show here how to parse several files (actually, the same file, several times). We suppose here that we have 2 conditions, with 3 replicates for each condition.
Currently,
HiCParsersupports the hic format up to the version 9.HiC-Pro format
A HiC-Pro file contains a matrix file, and a bed file. A different bed file could be use for each matrix file, but the same can also be used.
cool and mcool formats
Please note that the cool and mcool format store data in HDF5 format. The HDF5 package is not included by default, because it requires a substantial time to be compiled, and many users will not need the cool/mcool parser. So, in order to use the cool/mcool parser, you should install the
rhdf5package.The cool format include only one bin size.
The mcool format may include several bin sizes. It is thus compulsory to mention it. The same function is used for the cool/mcool formats.
Tabular files
A tabular file is a tab-separated multi-replicate sparse matrix with a header:
The number of interactions between
position 1andposition 2ofchromosomeare reported in eachcondition.replicatecolumn. There is no limit to the number of conditions and replicates.To load Hi-C data in this format:
Output
The output is a InteractionSet. This object can store one or several samples. Please read the corresponding vignette in order to known more about this format.
The conditions and replicates are reported in the
colDataslot :They corresponds to columns of the
assaysmatrix (containing interactions values):The positions of interactions are in the
interactionsslot of the object:Citation
Below is the citation output from using
citation('HiCParser')in R. Please run this yourself to check for any updates on how to cite HiCParser.To cite the ‘HiCParser’ HiCParser in a publication, use :
Maigné E, Zytnicki M (2024). A multiple format Hi-C data parser. doi:10.18129/B9.bioc.HiCParser https://doi.org/10.18129/B9.bioc.HiCParser, https://github.com/emaigne/HiCParser/HiCParser - R package version 0.1.0, http://www.bioconductor.org/packages/HiCParser.
As a BibTeX entry :
Please note that the
HiCParserwas only made possible thanks to many other R and bioinformatics software authors, which are cited either in the vignettes and/or the paper(s) describing this package.Code of Conduct
Please note that the
HiCParserproject is released with a Contributor Code of Conduct. By contributing to this project, you agree to abide by its terms.Development tools
For more details, check the
devdirectory.This package was developed using biocthis.