Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

rebin does not generate the correct number of bins #79

Open
js2264 opened this issue Sep 6, 2023 · 0 comments
Open

rebin does not generate the correct number of bins #79

js2264 opened this issue Sep 6, 2023 · 0 comments

Comments

@js2264
Copy link

js2264 commented Sep 6, 2023

  • 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
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant