rmats2sashimiplot SyntaxError

26 views
Skip to first unread message

Shannon T

unread,
Feb 4, 2025, 1:43:17 AMFeb 4
to rMATS User Group
Hi, I was trying to plot RI events from rMATS turbo v4.3.0, using rmats2sashimiplot which was installed in a python 2.7 environment, then I ran the following command and got a syntax error. Can anyone please help solve this issue? Thanks very much in advance!

rmats2sashimiplot --b1 W.txt \
                  --b2 Q.txt \
                  --event-type RI \
                  -e ./result/RI.MATS.JCEC.txt \
                  --l1 WT \
                  --l2 Q_i  \
                  -o  ./sashimi \
                  -c ../supportive/Drosophila_melanogaster.BDGP6.46.112.gff3 \


>
Traceback (most recent call last):
  File "/home/xxxx/.conda/envs/darts/bin/rmats2sashimiplot", line 11, in <module>
    load_entry_point('rmats2sashimiplot==3.0.0', 'console_scripts', 'rmats2sashimiplot')()
  File "/home/xxxx/.conda/envs/darts/lib/python2.7/site-packages/pkg_resources/__init__.py", line 489, in load_entry_point
    return get_distribution(dist).load_entry_point(group, name)
  File "/home/xxxx/.conda/envs/darts/lib/python2.7/site-packages/pkg_resources/__init__.py", line 2852, in load_entry_point
    return ep.load()
  File "/home/xxxx/.conda/envs/darts/lib/python2.7/site-packages/pkg_resources/__init__.py", line 2443, in load
    return self.resolve()
  File "/home/xxxx/.conda/envs/darts/lib/python2.7/site-packages/pkg_resources/__init__.py", line 2449, in resolve
    module = __import__(self.module_name, fromlist=['__name__'], level=0)
  File "/home/xxxx/.conda/envs/darts/lib/python2.7/site-packages/rmats2sashimiplot-3.0.0-py2.7.egg/rmats2sashimiplot/rmats2sashimiplot.py", line 283
    .format(id_str), file=sys.stderr)
                                     ^
SyntaxError: invalid syntax

kutsc...@gmail.com

unread,
Feb 4, 2025, 12:33:32 PMFeb 4
to rMATS User Group
That syntax error could happen if you attempt to install the python 3 version of the rmats2sashimplot code in a python 2 environment. I was able to install the python 2 code with:

conda create --prefix ./conda_env
conda activate ./conda_env
conda install -c conda-forge -c bioconda python=2.7 pysam samtools matplotlib-base scipy
git clone https://github.com/Xinglab/rmats2sashimiplot.git
cd rmats2sashimiplot
git checkout v3.0.0
python ./setup.py install

And then run the test data with:

curl -L 'https://sourceforge.net/projects/rnaseq-mats/files/rmats2sashimiplot/rmats2sashimiplot_test_data.tar.gz/download' -o rmats2sashimiplot_test_data.tar.gz
tar -xvf rmats2sashimiplot_test_data.tar.gz
rmats2sashimiplot --s1 ./rmats2sashimiplot_test_data/sample_1_replicate_1.sam,./rmats2sashimiplot_test_data/sample_1_replicate_2.sam,./rmats2sashimiplot_test_data/sample_1_replicate_3.sam --s2 ./rmats2sashimiplot_test_data/sample_2_replicate_1.sam,./rmats2sashimiplot_test_data/sample_2_replicate_2.sam,./rmats2sashimiplot_test_data/sample_2_replicate_3.sam --event-type SE -e ./rmats2sashimiplot_test_data/SE.MATS.JC.txt --l1 SampleOne --l2 SampleTwo --exon_s 1 --intron_s 5 -o test_events_output

Eric
Reply all
Reply to author
Forward
0 new messages