haowenz / chromap

Fast alignment and preprocessing of chromatin profiles
https://haowenz.github.io/chromap/
MIT License
192 stars 21 forks source link

[BUG] void chromap: :Index: :Load(): Assertion‘ index_ file != nullptr' failed. (Bulk ATAC-seq) #129

Closed ezioljj closed 1 year ago

ezioljj commented 1 year ago

Describe the bug chromap: src/ index. CC:138 : void chromap: :Index: :Load(): Assertion‘ index_ file != nullptr' failed. Our command and pieline works fine for most bulk ATAC-seq data, but a few ATAC-seq data would have error information like this.

To Reproduce Steps to reproduce the behavior:

  1. BulkATAC-seq, the read length is 50bp.
  2. chromap -v:0.2.3-r407
  3. chromap --min-frag-length 20 --preset atac -t 8 -x sus11_chromap_index -r real_genome.fa -1 ./tagalign/069873c453e72fa37e94e9c39c617da2/069873c453e72fa37e94e9c39c617da2_1.p001.fq.gz -2 ./tagalign/069873c453e72fa37e94e9c39c617da2/069873c453e72fa37e94e9c39c617da2_2.p001.fq.gz --TagAlign -o ./tagalign/069873c453e72fa37e94e9c39c617da2/069873c453e72fa37e94e9c39c617da2.tagAlign > ./tagalign/069873c453e72fa37e94e9c39c617da2/069873c453e72fa37e94e9c39c617da2.stat 2>&1
  4. Preset parameters for ATAC-seq/scATAC-seq are used. Start to map reads. Parameters: error threshold: 8, min-num-seeds: 2, max-seed-frequency: 500,1000, max-num-best-mappings: 1, max-insert-size: 2000, MAPQ-threshold: 30, min-read-length: 30, bc-error-threshold: 1, bc-probability-threshold: 0.90 Number of threads: 8 Analyze bulk data. Will try to remove adapters on 3'. Will remove PCR duplicates after mapping. Will remove PCR duplicates at cell level. Won't allocate multi-mappings after mapping. Only output unique mappings after mapping. Only output mappings of which barcodes are in whitelist. Perform Tn5 shift. Output mappings in TagAlign/PairedTagAlign format. Reference file: /data5/idata/03Download/HI-C/test/preparaton_for_doujw/real_genome.fa Index file: /data5/idata/03Download/HI-C/test_anan/test/preparaton_for_doujw/sus11_chromap_index 1th read 1 file: ./tagalign/069873c453e72fa37e94e9c39c617da2/069873c453e72fa37e94e9c39c617da2_1.p001.fq.gz 1th read 2 file: ./tagalign/069873c453e72fa37e94e9c39c617da2/069873c453e72fa37e94e9c39c617da2_2.p001.fq.gz Output file: ./tagalign/069873c453e72fa37e94e9c39c617da2/069873c453e72fa37e94e9c39c617da2.tagAlign Loaded all sequences successfully in 3.69s, number of sequences: 20, number of bases: 2435262063. chromap: src/index.cc:138: void chromap::Index::Load(): Assertion `index_file != nullptr' failed.

Expected behavior A clear and concise description of what you expected to happen.

Screenshots {E0A17E1B-C493-D340-8E43-5BFEF793BF91}

Environment (please complete the following information): -OS:Linux mu01 3.10.0-1160.45.1.el7.x86_64 #1 SMP Wed Oct 13 17:20:51 UTC 2021 x86_64 x86_64 x86_64 GNU/Linux

Additional context Add any other context about the problem here.

haowenz commented 1 year ago

The error message indicates that the index file doesn't exist. Did you create an index first as suggested in the manual?

./chromap -i -r test/ref.fa -o ref.index
ezioljj commented 1 year ago

Yes, we missed creating index. Thank you!