Skip to content

rebin does not generate the correct number of bins #79

Open
@js2264

Description

@js2264
  • Generating cools with hicstuff rebin or cooler cload
conda activate hicstuff
hicstuff pipeline --enzyme "DpnII,HinfI" --mapping normal --prefix "test" --outdir "results" --threads 4 --genome ~/genomes/S288c/S288c.fa test_R1.fq test_R2.fq
hicstuff rebin --binning 1kb --frags results/test.frags.tsv --chroms results/test.chr.tsv results/test.cool results/test_rebin
cooler cload pairs --chrom1 2 --pos1 3 --chrom2 4 --pos2 5 <(sed 1d results/test.chr.tsv | cut -f1-2):1000 results/test.valid_idx.pairs results/test_cooler-cload.cool
  • Checking nbins
$ cooler info results/test_cooler-cload.cool
{
    "bin-size": 1000,
    "bin-type": "fixed",
    "creation-date": "2023-09-06T13:09:51.878188",
    "format": "HDF5::Cooler",
    "format-url": "https://github.com/open2c/cooler",
    "format-version": 3,
    "generated-by": "cooler-0.9.2",
    "genome-assembly": "unknown",
    **"nbins": 12165,**
    "nchroms": 17,
    "nnz": 62062,
    "storage-mode": "symmetric-upper",
    "sum": 69118
}
$ cooler info results/test_rebin.cool 
{
    "bin-size": 1000,
    "bin-type": "fixed",
    "creation-date": "2023-09-06T13:10:22.453334",
    "format": "HDF5::Cooler",
    "format-url": "https://github.com/open2c/cooler",
    "format-version": 3,
    "generated-by": "cooler-0.9.2",
    "genome-assembly": "unknown",
    **"nbins": 12157,**
    "nchroms": 17,
    "nnz": 61745,
    "storage-mode": "symmetric-upper",
    "sum": 69118
}
  • Checking bins table
$ cooler dump --table bins results/test_cooler-cload.cool | grep -P "XV\t" | tail -n 3
XV      1089000 1090000
**XV      1090000 1091000
XV      1091000 1091291**
$ cooler dump --table bins results/test_rebin.cool | grep -P "XV\t" | tail -n 3
XV      1088000 1089000
**XV      1089000 1090000
XV      1090000 1091291**
  • Actual chromosome XVI length
$ cat ~/genomes/S288c/S288c.fa.fai | cut -f1-2 | grep -P "XV\t" 
XV      1091291

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions