Boyle-Lab / F-Seq2

Improving the feature density based peak caller with dynamic statistics
GNU General Public License v3.0
6 stars 0 forks source link

Value error & invalid value in multiply statement #4

Open Michael-Geuenich opened 3 years ago

Michael-Geuenich commented 3 years ago

Hi,

I'm trying to run F-Seq2 on 3' RNA single end sequencing data to identify polyadenylation peaks. I'm running the following

fseq2 callpeak input.bam -chrom_size_file mm10.chromsizes.bed -o output_dir -name sample1 -sig_format bigwig -standard_narrowpeak -l 50 -t 8.0

However, this results in the following error:

multiprocessing.pool.RemoteTraceback:
"""
Traceback (most recent call last):
  File "/usr/lib64/python3.8/multiprocessing/pool.py", line 125, in worker
    result = (True, func(*args, **kwds))
  File "/usr/lib64/python3.8/multiprocessing/pool.py", line 51, in starmapstar
    return list(itertools.starmap(args[0], args[1]))
  File "/home/campbell/mgeuenic/.local/share/virtualenvs/schramek-3p-analysis-XaDVbhKH/lib64/python3.8/site-packages/fseq2/fseq2.py", line 342, in run_kde_wo_control
    result_df = call_peaks(chrom=chrom, first_cut=first_cut, kdepy_result=kdepy_result,
  File "/home/campbell/mgeuenic/.local/share/virtualenvs/schramek-3p-analysis-XaDVbhKH/lib64/python3.8/site-packages/fseq2/fseq2.py", line 528, in call_peaks
    peak_indexes, properties = find_peaks(kdepy_result, height=min_height, distance=min_distance,
  File "/home/campbell/mgeuenic/.local/share/virtualenvs/schramek-3p-analysis-XaDVbhKH/lib64/python3.8/site-packages/scipy/signal/_peak_finding.py", line 934, in find_peaks
    raise ValueError('`distance` must be greater or equal to 1')
ValueError: `distance` must be greater or equal to 1
  File "/home/campbell/mgeuenic/.local/share/virtualenvs/schramek-3p-analysis-XaDVbhKH/bin/fseq2", line 440, in <module>
    main(temp_dir_name)
  File "/home/campbell/mgeuenic/.local/share/virtualenvs/schramek-3p-analysis-XaDVbhKH/bin/fseq2", line 49, in main
    submain(args)
  File "/home/campbell/mgeuenic/.local/share/virtualenvs/schramek-3p-analysis-XaDVbhKH/lib64/python3.8/site-packages/fseq2/callpeak_main.py", line 183, in main
    results = pool.starmap(fseq2.run_kde_wo_control, input_param_ls)
  File "/usr/lib64/python3.8/multiprocessing/pool.py", line 372, in starmap
    return self._map_async(func, iterable, starmapstar, chunksize).get()
  File "/usr/lib64/python3.8/multiprocessing/pool.py", line 771, in get
    raise self._value
ValueError: `distance` must be greater or equal to 1

Because the error mentioned distance I tried adding -f 150 to my call. This made the program run longer (and hence I think further). However, then I got the following error:

/home/campbell/mgeuenic/.local/share/virtualenvs/schramek-3p-analysis-XaDVbhKH/lib64/python3.8/site-packages/scipy/signal/signaltools.py:507: RuntimeWarning: invalid value encountered in multiply
  ret = ifft(sp1 * sp2, fshape, axes=axes)

Ultimately I want to estimate the fragment size from the data though, rather than setting it. Is this possible?

nsamzhao commented 2 years ago

Hi Michael,

Sorry for the late reply! Can you show me the settings in the run log, especially what is the est. fragment size in your run? I suspect the est. fragment size is causing the issue. In the meanwhile, try setting -f 0 to treat it as DNase or ATAC-seq and see if any problem there for us to debug.

Sam