harbourlab / SparK

Publication quality NGS track plotting
102 stars 20 forks source link

max() arg is an empty sequence #2

Closed t-neumann closed 4 years ago

t-neumann commented 4 years ago

Hi,

I ran across the following error. Any clue what is happening here?

python SparK.py -cf NTT_3A6.mRp.clN.bedGraph -tf RTT_2B12_R1.mRp.clN.bedGraph -pt sine -pr chr10:24593442-24600682 -o ~/Desktop/SparK

SparK Version 2.4.2 initiated
Plotting region: chr10:24593442-24600682
Error: Some tracks not plotted as Sine plots require at least 2 control and treatment files per plot
Traceback (most recent call last):
  File "SparK.py", line 506, in <module>
    max_value = get_max_value(control_data, treat_data)
  File "SparK.py", line 127, in get_max_value
    return max([max(max_1), max(max_2)])
ValueError: max() arg is an empty sequence

I checked and all the tracks have signal.

leiendeckerlu commented 4 years ago

Error: Some tracks not plotted as Sine plots require at least 2 control and treatment files per plot

you only provide one control and one treatment track. The sine mode needs replicates. Don't use the merged bedGraph file but the individual ones from the duplicates you sequenced.

Here is a minimal working example code:

python ./SparK/SparK.py \ -pr chr20:31601144-31612886 \ -tf ./merged/100nM_LOL_d6.mRp.clN.bedGraph \ -cf ./merged/ROFL_d6.mRp.clN.bedGraph \ -tg 1 \ -cg 1 \ -gl ATACseq \ -l DMSO LSD1i \ -gff ./gff/gencode.v24.primary_assembly.annotation.gtf \ -dg ID1 \ -o ./plots/blabla

Lukas

harbourlab commented 4 years ago

Thanks Lukas! Indeed version 2.4.2 of SparK required 2 files per condition for each plot. I just uploaded version 2.4.3 which works with one file now, and while I was at it, tweeked the spacing between the plots a bit. Let me know if it works for you! Cheers, Stefan