Error - running clipper

299 views
Skip to first unread message

Nejc Haberman

unread,
Jan 3, 2017, 1:08:20 PM1/3/17
to CLIPper-discuss
I tried to run CLIPper with mapped reads from STAR and TopHat aligner. In both cases I received the same error and all needed python packages are installed and up to date.

clipper -b mapped_reads_sorted.bam -s hg19

/usr/local/lib/python2.7/dist-packages/matplotlib/font_manager.py:273: UserWarning: Matplotlib is building the font cache using fc-list. This may take a moment.
  warnings.warn('Matplotlib is building the font cache using fc-list. This may take a moment.')
Traceback (most recent call last):
  File "/usr/local/bin/clipper", line 9, in <module>
    load_entry_point('clipper==0.2.0', 'console_scripts', 'clipper')()
  File "/usr/local/lib/python2.7/dist-packages/clipper-0.2.0-py2.7-linux-x86_64.egg/clipper/src/peakfinder.py", line 688, in call_main
    main(options)
  File "/usr/local/lib/python2.7/dist-packages/clipper-0.2.0-py2.7-linux-x86_64.egg/clipper/src/peakfinder.py", line 590, in main
    with multiprocessing.Pool(int(options.np)) as pool:
AttributeError: __exit__


Nejc Haberman

unread,
Jan 6, 2017, 4:54:29 AM1/6/17
to Gabriel Pratt, CLIPper-discuss
Thank you for your help. Here is the output with --debug option and goes like this forever.

Cheers,
Nejc

On Thu, 5 Jan 2017 at 00:41 Gabriel Pratt <gpr...@ucsd.edu> wrote:
can you run it with the --debug option and post the error?

Thank you

Gabriel Pratt
Bioinformatics Graduate Student, Yeo Lab
University of California San Diego
CLIPper.log.gz

Martin Smith

unread,
Jan 9, 2017, 6:50:09 PM1/9/17
to CLIPper-discuss, gpr...@ucsd.edu
Had this error; turns out I was using an hg38 bam file with "-s hg19" 
make sure you bam is also hg19, or use the custom  bed options (which I can;t get to work)

Martin Smith

unread,
Jan 9, 2017, 6:54:42 PM1/9/17
to Gabriel Pratt, CLIPper-discuss
So… are you saying there is no support for hg38?

On 10 Jan 2017, at 10:52, Gabriel Pratt <gpr...@ucsd.edu> wrote:

I think I removed the custom bed option in the latest version.  Its a feature I was experimenting with about 4 years ago, but never got working quite to my liking. Finally decided to stop giving people false hope.  

Gabriel Pratt
Bioinformatics Graduate Student, Yeo Lab
University of California San Diego

Nejc Haberman

unread,
Jan 10, 2017, 5:47:56 AM1/10/17
to Gabriel Pratt, CLIPper-discuss
Hi Gabriel,
this version worked on eCLIP BAM data. Now I tried it on iCLIP single-end data and received the following error: 

clipper -b test-small.bam -s hg19 --debug
/usr/local/lib/python2.7/dist-packages/matplotlib/font_manager.py:273: UserWarning: Matplotlib is building the font cache using fc-list. This may take a moment.
  warnings.warn('Matplotlib is building the font cache using fc-list. This may take a moment.')
Traceback (most recent call last):
  File "/usr/local/bin/clipper", line 9, in <module>
    load_entry_point('clipper==0.2.0', 'console_scripts', 'clipper')()
  File "/usr/local/lib/python2.7/dist-packages/clipper-0.2.0-py2.7-linux-x86_64.egg/clipper/src/peakfinder.py", line 695, in call_main
    main(options)
  File "/usr/local/lib/python2.7/dist-packages/clipper-0.2.0-py2.7-linux-x86_64.egg/clipper/src/peakfinder.py", line 585, in main
    jobs.append(func_star(job))
  File "/usr/local/lib/python2.7/dist-packages/clipper-0.2.0-py2.7-linux-x86_64.egg/clipper/src/peakfinder.py", line 146, in func_star
    return call_peaks(*varables)
  File "/usr/local/lib/python2.7/dist-packages/clipper-0.2.0-py2.7-linux-x86_64.egg/clipper/src/call_peak.py", line 966, in call_peaks
    subset_reads = list(bam_fileobj.fetch(reference=str(interval.chrom), start=interval.start, end=interval.stop))
  File "/usr/local/lib/python2.7/dist-packages/clipper-0.2.0-py2.7-linux-x86_64.egg/clipper/src/bam_helpers.py", line 25, in fetch
    yield SAM_Alignment.from_pysam_AlignedRead( pa, sf )
  File "_HTSeq.pyx", line 1234, in HTSeq._HTSeq.SAM_Alignment.from_pysam_AlignedRead (src/_HTSeq.c:23901)
  File "_HTSeq.pyx", line 771, in HTSeq._HTSeq.SequenceWithQualities.__init__ (src/_HTSeq.c:15627)
TypeError: object of type 'NoneType' has no len()

The data was mapped with STAR and here is a small input file for example if you have any ideas why it wouldn't work?
Thank you for your help!

best,
Nejc

On Sat, 7 Jan 2017 at 01:53 Gabriel Pratt <gpr...@ucsd.edu> wrote:
Thats odd... It shouldn't print that out.  

You might be using an outdated version of clipper.  

Can you try running it again, except this time install it from the encode branch?



Gabriel Pratt
Bioinformatics Graduate Student, Yeo Lab
University of California San Diego

test-small.bam
Reply all
Reply to author
Forward
0 new messages