YeoLab / rbp-maps

splicing and feature maps for RBPs
23 stars 10 forks source link

asked for help about 'TypeError' when running plot_map #14

Closed lizhao-git closed 1 year ago

lizhao-git commented 1 year ago

Dear developers, I tried to use rbp-maps to plot splicing maps of specific RBPs. But I got an error about 'TypeError' and don't know how to resolve this. Specifically, I installed rbp-maps by conda following the suggestions on GitHub. When I run the following code,

plot_map --inputbam rbp-control-1.bam \ 
--ip_pos_bw rbp-control-plus-1.bigWig \ 
--ip_neg_bw rbp-control-minus-1.bigWig \ 
--inputbam rbp-knockdown-1.bam \ 
--input_pos_bw rbp-knockdown-plus-1.bigWig \ 
--input_neg_bw rbp-knockdown-minus-1.bigWig \ 
--annotations rbp-rmats-output/se.included.upon.knockdown.txt rbp-rmats-output/se.excluded.upon.knockdown.txt \ 
--annotation_type rmats rmats \ 
--output rbp.svg

I got the following error,

Traceback (most recent call last):
  File "/.conda/envs/rbp-maps/bin/plot_map", line 11, in <module>
    load_entry_point('rbp-maps==0.1.4', 'console_scripts', 'plot_map')()
  File "build/bdist.linux-x86_64/egg/maps/plot_map.py", line 574, in main
  File "build/bdist.linux-x86_64/egg/maps/plot_map.py", line 292, in check_for_index
  File "/.conda/envs/rbp-maps/lib/python2.7/genericpath.py", line 26, in exists
    os.stat(path)
TypeError: coercing to Unicode: need string or buffer, NoneType found

So it seems that I missed some nessesary file paths, I guess this error may be caused by the miss of native_cassette_exons_all,natively_included_cassette_exons,natively_excluded_cassette_exons,native_cassette_exons_all. But I got the same error when I added these files into my command:

plot_map --inputbam rbp-control-1.bam \ 
--ip_pos_bw rbp-control-plus-1.bigWig \ 
--ip_neg_bw rbp-control-minus-1.bigWig \ 
--inputbam rbp-knockdown-1.bam \ 
--input_pos_bw rbp-knockdown-plus-1.bigWig \ 
--input_neg_bw rbp-knockdown-minus-1.bigWig \ 
--annotations rbp-rmats-output/se.included.upon.knockdown.txt rbp-rmats-output/se.excluded.upon.knockdown.txt \ 
k562.constitutive.exons.txt \ 
k562.natively.included.cassette.exons.txt \ 
k562.natively.excluded.cassette.exons.txt \ 
k562.natively.cassette.exons.all.txt \ 
--annotation_type rmats rmats tab tab tab tab\ 
--output rbp.svg

So this error is not introduced by missing files, I have no ideas about how to resove it. In addition, whether the data using to plot the splicing map can be exported? So I can plot by ggplot2. Thanks for any help you can provide.