gymreklab / chips

Simulation tool for ChIP- and other -seq experiments
GNU General Public License v3.0
12 stars 3 forks source link

Exception std::out_of_range during simreads #64

Closed olegs closed 3 years ago

olegs commented 3 years ago

I am using chips 2.4 (installed with anaconda) to simulate ChIP-seq reads coverage using peaks file from ENCODE H3K27ac.bed.gz and reference faster file GRCh38_no_alt_analysis_set_GCA_000001405.15.fasta. Chips successfully learned model (model.json):

{
    "frag": {
        "k": 9.943953514099121,
        "theta": 28.363868713378906
    },
    "pcr_rate": 1.0,
    "pulldown": {
        "f": 0.002062314422801137,
        "s": 0.4932500720024109
    }
}

I launch simreads with the command line:

chips simreads  -p H3K27ac.bed -f GRCh38_no_alt_analysis_set_GCA_000001405.15.fasta -o H3K27ac -t bed -c 5 --numreads 175000000 --model model.json

And I see the error message:

terminate called after throwing an instance of 'std::out_of_range'
  what():  map::at
Aborted
Pandaman-Ryan commented 3 years ago

Hi @olegs

Thank you for your comment.

You may want to set --numcopies as 1000000 or larger, due to the large "--numreads" you are using. The default numcopies is comparatively small, only 100.

I have tested " chips simreads -p ENCFF039XWV.bed -f GRCh38_no_alt_analysis_set_GCA_000001405.15.fasta -o H3K27ac -t bed -c 5 --numreads 175000000 --model model.json --numcopies 1000000 " It seems working.

Please let me know if you have more questions.

Cheers, -An

olegs commented 3 years ago

Hi @Pandaman-Ryan,

Thank you for the suggestion, it worked out just fine. I suppose that you can mention this limitation in the description or add some warning to avoid such confusing errors.

Best regards, Oleg

Pandaman-Ryan commented 3 years ago

Thank you so much for this good suggestion. We will add a warning message for this matter in our next release.

Cheers, -An