Error during creating a hisat2 index
1
0
Entering edit mode
7.1 years ago
XBria ▴ 90

Hi, when running the following command

extract_splice_sites.py chrX_data/genes/chrX.gtf > chrX.ss

error comes up :

bash: /home/XBria/bin/extract_splice_sites.py: /opt/anaconda1anaconda2anaconda3/bin/python: bad interpreter: No such file or directory

anyone has experienced the same ? Please help !

  • which python /home/XBria/anaconda2/bin/python
Python • 1.8k views
ADD COMMENT
1
Entering edit mode
7.1 years ago

Can you show me the top lines of /home/XBria/bin/extract_splice_sites.py? Looks like you have an odd shebang which should be changed to /home/XBria/anaconda2/bin/python

ADD COMMENT
0
Entering edit mode
#!/opt/anaconda1anaconda2anaconda3/bin/python

This is the first line of the script.

ADD REPLY
0
Entering edit mode

You are right, I forgot to change that :)

Thanks

ADD REPLY
0
Entering edit mode

Dear Wouter,

The problem solved, although I still cannot run the program, since there is a syntax error :

extract_splice_sites.py chrX_data/genes/chrX.gtf > chrX.ss
  File "/home/XBria/bin/extract_splice_sites.py", line 105
    file=stderr)
        ^
SyntaxError: invalid syntax

I checked the code in github too. the same codes. How may I solve this one ?

ADD REPLY
0
Entering edit mode

I added markup to your post for increased readability. You can do this by selecting the text and clicking the 101010 button. When you compose or edit a post that button is in your toolbar, see image below:

101010 Button

I guess your error is caused by using python2, while the script is written for python3. Or maybe it will work with Python2.7 but you are using an older one.

Anyway: unless you have good reasons to use something older, use Python3.

ADD REPLY
0
Entering edit mode

It worked. someone wrote on the internet so I add that here for someone who has the same problem and needs help. As you said, it is because of the different version of the written script and running python. I just fix the problem by removing file= it worked.

Thanks Wouter for the comment.

ADD REPLY

Login before adding your answer.

Traffic: 1613 users visited in the last hour
Help About
FAQ
Access RSS
API
Stats

Use of this site constitutes acceptance of our User Agreement and Privacy Policy.

Powered by the version 2.3.6