biocore-ntnu / epic2

Ultraperformant reimplementation of SICER
https://doi.org/10.1093/bioinformatics/btz232
MIT License
55 stars 9 forks source link

Using option "--gaps-allowed" causes error #15

Closed keoughkath closed 5 years ago

keoughkath commented 5 years ago

Hello,

When I use the option --gaps-allowed I get the error shown below. I've tried a few different values for --gaps-allowed and each result in the same error.

Command:

epic2 --treatment project/treatment.bam --control project/control.bam --genome hg38 --keep-duplicates --fragment-size 75 --bin-size 50000 --gaps-allowed 5 --output test_3.bed

Error:

Traceback (most recent call last): File "~/miniconda3/bin/epic2", line 217, in <module> _main(args) File "~/miniconda3/lib/python3.7/site-packages/epic2/main.py", line 46, in _main chip_count, args["bin_size"], effective_genome_length, args["gaps_allowed"] * args["bin_size"], args["e_value"]) File "epic2/src/SICER_stats.pyx", line 385, in epic2.src.SICER_stats.compute_score_threshold File "epic2/src/SICER_stats.pyx", line 221, in epic2.src.SICER_stats.Background_island_probscore_statistics.find_island_threshold File "epic2/src/SICER_stats.pyx", line 168, in epic2.src.SICER_stats.Background_island_probscore_statistics.background_island_expectation IndexError: list index out of range

Thanks for looking into this! -Kathleen

endrebak commented 5 years ago

I will look into it :) Thanks for reporting :)

endrebak commented 5 years ago

Note to self: set up tests that ensure that the epic2 does not fail when run with legal input values.

endrebak commented 5 years ago

I have not been able to reproduce this. Are you using 0.0.29?j

keoughkath commented 5 years ago

I'm using 0.0.26 installed with conda, but I will install that version and give it a try :)

endrebak commented 5 years ago

Forgot to update on conda. Will do when I am back :)

On Tuesday, April 16, 2019, Kathleen Keough notifications@github.com wrote:

I'm using 0.0.26 installed with conda https://anaconda.org/bioconda/epic2, but I will install that version and give it a try :)

— You are receiving this because you commented. Reply to this email directly, view it on GitHub https://github.com/biocore-ntnu/epic2/issues/15#issuecomment-483747818, or mute the thread https://github.com/notifications/unsubscribe-auth/AQ9I0ldRq0jFl0rFSgQ94frC1R7YFoBuks5vhf6WgaJpZM4cxS_M .

keoughkath commented 5 years ago

I'm not able to install v0.0.29 with pip, but v0.0.28 produces the same error for me. I tried it with the test files though and those run fine, so I'm checking my input files to see if there's something weird there.

endrebak commented 5 years ago

Different chromnames than in UCSC might be it?

On Tuesday, April 16, 2019, Kathleen Keough notifications@github.com wrote:

I'm not able to install v0.0.29 with pip, but v0.0.28 produces the same error for me. I tried it with the test files though and those run fine, so I'm checking my input files to see if there's something weird there.

— You are receiving this because you commented. Reply to this email directly, view it on GitHub https://github.com/biocore-ntnu/epic2/issues/15#issuecomment-483775808, or mute the thread https://github.com/notifications/unsubscribe-auth/AQ9I0ghZqYcr1KWz6zNCEK8Z1mXyMROmks5vhgy7gaJpZM4cxS_M .

keoughkath commented 5 years ago

No, they're the same ('chr1' etc.)

keoughkath commented 5 years ago

I think it might have something to do with self.window_score since the error indicates a list indexing issue stemming from line 176 of SICER_stats.pyx.

endrebak commented 5 years ago

If you can share the data it would likely be easy for me to debug. A private link to google drive or something perhaps?

On Tuesday, April 16, 2019, Kathleen Keough notifications@github.com wrote:

No, they're the same ('chr1' etc.)

— You are receiving this because you commented. Reply to this email directly, view it on GitHub https://github.com/biocore-ntnu/epic2/issues/15#issuecomment-483778987, or mute the thread https://github.com/notifications/unsubscribe-auth/AQ9I0rL-pYIhfgnLa0FmCNRMWIx8KLAnks5vhg6wgaJpZM4cxS_M .

keoughkath commented 5 years ago

Will do! Can I send the link to your email?

endrebak commented 5 years ago

Can you try with the flag —experimental-statistics in 0.0.29?

Try to Install it with

pip install —no-cache-dir epic2==0.0.29

:)

Eager to hear if it worked

On Tuesday, April 16, 2019, Endre Bakken Stovner endrebak85@gmail.com wrote:

If you can share the data it would likely be easy for me to debug. A private link to google drive or something perhaps?

On Tuesday, April 16, 2019, Kathleen Keough notifications@github.com wrote:

No, they're the same ('chr1' etc.)

— You are receiving this because you commented. Reply to this email directly, view it on GitHub https://github.com/biocore-ntnu/epic2/issues/15#issuecomment-483778987, or mute the thread https://github.com/notifications/unsubscribe-auth/AQ9I0rL-pYIhfgnLa0FmCNRMWIx8KLAnks5vhg6wgaJpZM4cxS_M .

endrebak commented 5 years ago

Yes, but I do not have access to a computer before Monday. Please try 0.0.29 first :)

On Tuesday, April 16, 2019, Endre Bakken Stovner endrebak85@gmail.com wrote:

Can you try with the flag —experimental-statistics in 0.0.29?

Try to Install it with

pip install —no-cache-dir epic2==0.0.29

:)

Eager to hear if it worked

On Tuesday, April 16, 2019, Endre Bakken Stovner endrebak85@gmail.com wrote:

If you can share the data it would likely be easy for me to debug. A private link to google drive or something perhaps?

On Tuesday, April 16, 2019, Kathleen Keough notifications@github.com wrote:

No, they're the same ('chr1' etc.)

— You are receiving this because you commented. Reply to this email directly, view it on GitHub https://github.com/biocore-ntnu/epic2/issues/15#issuecomment-483778987, or mute the thread https://github.com/notifications/unsubscribe-auth/AQ9I0rL-pYIhfgnLa0FmCNRMWIx8KLAnks5vhg6wgaJpZM4cxS_M .

endrebak commented 5 years ago

I consider it very likely that this due to a bug in the original SICER algorithm that was fixed with the 0.0.29 flag —experimental-statistics. SICER precomputed some stats function for you to save time. However it did not precompute an inf number of values so it fails on large datasets. Remember SICER was made in 2008 or so :)

On Tuesday, April 16, 2019, Endre Bakken Stovner endrebak85@gmail.com wrote:

Yes, but I do not have access to a computer before Monday. Please try 0.0.29 first :)

On Tuesday, April 16, 2019, Endre Bakken Stovner endrebak85@gmail.com wrote:

Can you try with the flag —experimental-statistics in 0.0.29?

Try to Install it with

pip install —no-cache-dir epic2==0.0.29

:)

Eager to hear if it worked

On Tuesday, April 16, 2019, Endre Bakken Stovner endrebak85@gmail.com wrote:

If you can share the data it would likely be easy for me to debug. A private link to google drive or something perhaps?

On Tuesday, April 16, 2019, Kathleen Keough notifications@github.com wrote:

No, they're the same ('chr1' etc.)

— You are receiving this because you commented. Reply to this email directly, view it on GitHub https://github.com/biocore-ntnu/epic2/issues/15#issuecomment-483778987, or mute the thread https://github.com/notifications/unsubscribe-auth/AQ9I0rL-pYIhfgnLa0FmCNRMWIx8KLAnks5vhg6wgaJpZM4cxS_M .

endrebak commented 5 years ago

https://pypi.org/project/epic2/#files

0.0.29 is out on pypi so it’s weird you cannot dl it :)

On Tuesday, April 16, 2019, Endre Bakken Stovner endrebak85@gmail.com wrote:

I consider it very likely that this due to a bug in the original SICER algorithm that was fixed with the 0.0.29 flag —experimental-statistics. SICER precomputed some stats function for you to save time. However it did not precompute an inf number of values so it fails on large datasets. Remember SICER was made in 2008 or so :)

On Tuesday, April 16, 2019, Endre Bakken Stovner endrebak85@gmail.com wrote:

Yes, but I do not have access to a computer before Monday. Please try 0.0.29 first :)

On Tuesday, April 16, 2019, Endre Bakken Stovner endrebak85@gmail.com wrote:

Can you try with the flag —experimental-statistics in 0.0.29?

Try to Install it with

pip install —no-cache-dir epic2==0.0.29

:)

Eager to hear if it worked

On Tuesday, April 16, 2019, Endre Bakken Stovner endrebak85@gmail.com wrote:

If you can share the data it would likely be easy for me to debug. A private link to google drive or something perhaps?

On Tuesday, April 16, 2019, Kathleen Keough notifications@github.com wrote:

No, they're the same ('chr1' etc.)

— You are receiving this because you commented. Reply to this email directly, view it on GitHub https://github.com/biocore-ntnu/epic2/issues/15#issuecomment-483778987, or mute the thread https://github.com/notifications/unsubscribe-auth/AQ9I0rL-pYIhfgnLa0FmCNRMWIx8KLAnks5vhg6wgaJpZM4cxS_M .

keoughkath commented 5 years ago

Looks like the install issue was because my conda version was fighting with pip, gah. Fixed that and it installed ok. The --experimental-statistics flag works! Thanks!! Closing now :)

endrebak commented 5 years ago

Yaaay!

On Tuesday, April 16, 2019, Kathleen Keough notifications@github.com wrote:

Looks like the install issue was because my conda version was fighting with pip, gah. Fixed that and it installed ok. The --experimental-statistics flag works! Thanks!! Closing now :)

— You are receiving this because you commented. Reply to this email directly, view it on GitHub https://github.com/biocore-ntnu/epic2/issues/15#issuecomment-483794889, or mute the thread https://github.com/notifications/unsubscribe-auth/AQ9I0jd9te59zQmtzSK_jOIbRXAqZVVQks5vhhj5gaJpZM4cxS_M .