Skip to content

koszullab/hicberg

 
 

Repository files navigation

Hicberg

Build and deploy Github pages MIT License GPLv3 License AGPL License codecov

Python package to reconstruct genomic signals coming from repeated elements in paired-end data like Hi-C, MicroC.

Installation

We highly recommend installing Hicberg through Mamba.

You can create an specific environment and activate it:

mamba create -n hicberg_env python=3.10 -c conda-forge
mamba activate hicberg_env

Install important dependancies with mamba (safer):

mamba install -c bioconda -c conda-forge pysam numpy scipy

Then install last stable version of Hicberg 1.0.2 from github:

pip install git+https://github.com/koszullab/hicberg.git@main

1.0.2 version will be available soon on bioconda.

Usage

Hicberg requires a FASTA file containing the reference genome against which the reads will be aligned, as well as two paired-end FASTQ files generated from a Hi-C, MicroC, ChIP-seq, or Mnase experiment. You can always run:

hicberg --help

Differents modes can be used to compute the probabilities of alignments for the different possibilities of reads coming from repeated elements.

Example

hicberg pipeline -e DpnII,HinfI --cpus 8 -o /home/bob/ -n output_repo/ yeast_reference_genome.fa  reads_R1.fastq reads_R2.fastq 

Important options

When running hicberg, there are a handful parameters which are especially important:

  • -e DpnII,HinfI: Restriction enzymes used in the Hi-C protocole (e.g DpnII, HinfI).
  • -k 100: maximum number of alignments returned by Bowtie2 for a read (for organisms with repetitive elements with a large number of occurrences, we recommend limiting the search space).
  • -m standard: mode for the computation of probabilites, (standard uses coverage and p(s), full uses coverage, p(s) and density laws).
  • --cpus 10: number of cpu to allocate.
  • -c plasmid2micron,chrMT: circular chromosomes, molecule present in the genome (used in the computation of p(s) behavior).
  • -o: directory in which the output directory will be placed.
  • -n: name of the output folder that will contain the reconstructed data for a given experiment.

Contributing

All contributions are welcome, in the form of bug reports, suggestions, documentation or pull requests. We use the Numpy standard for docstrings when documenting functions.

The code formatting standard we use is black, with --line-length=79 to follow PEP8 recommendations. We use pytest with the pytest-doctest and pytest-pylint plugins as our testing framework. Ideally, new functions should have associated unit tests, placed in the tests folder. To test the code, you can run:

coverage run --source=hicberg -m pytest -v tests --cov-report=xml

Authors

Citation

https://www.biorxiv.org/content/10.1101/2025.06.20.660295v1

About

Python package to reconstruct genomic signals coming from repeated elements in paired-end data like Hi-C, MicroC.

Topics

Resources

License

Stars

0 stars

Watchers

1 watching

Forks

Packages

 
 
 

Contributors

Languages

  • Python 100.0%