This is a test version of Biostars. For the public version, visit https://www.biostars.org.
SOAP denovo permission denied

Hi! I'm new to bioinformatics and linux. I've downloaded the latest pre-compiled binary version of SOAPdenovo2 and placed it in a directory in my Desktop. I unpacked it using tar -zxf. I also created a config file and have all my fastq, fasta and bam files ready on another directory in my Desktop.

My issue is that when I change directory to /bin to execute (i supposed i have to go there to execute it) and type the command:

/path/SOAPdenovo-63mer all -s /path/config_file -K 63 -R -o graph_prefix 1>ass.log 2>ass.err

I get Bash: ass.log permission denied

I already tried chmod 777 to SOAPdenovo-63mer and to ass.log so that they have all the permissions and even added from /etc with sudo nano /etc/sudoers the user to execute with admin permission eve though there's only one user and is the admin.

What should I do? Thanks!!

assembly
 1>ass.log 2>ass.err

You don't want to write these files to your /bin, direct them to some sensible place like /home/username/experimentname/

Thanks 5heikki for your answer!

I did what you said and solved that but right after came across with another problem which I describe below. I've been reading more about UNIX but still can't realize what im doing wrong.

I'd really appreciate your help :)

Sorry, I am new to all this. Thanks for the advice, wont do it again.

1 answer

You don't have to be in /bin to execute it, assuming /bin is in your $PATH. So that means you can execute it from anywhere.

You get this error because you have no writing permission to /bin You requested the log file (and err file) to be made in /bin and your user has no permission to do so. Instead, execute the script somewhere else and/or point the location of the files to a directory to which you can write.

Hi WouterDeCoster, thanks a lot for your answer.

I executed the script from the directory where SOAPdenovo-63mer is which I can write and I still cant do it. Fist I tried: ./SOAPdenovo-63mer all -s /path/config_file -K 63 -R -o graph_prefix 1>ass.log 2>ass.err and in ass.err I get: bash: ./SOAPdenovo-63mer: binary file cannot be executed so I executed the same but with sudo first. Now in ass.err I get: ./SOAPdenovo-63mer: 4: ./SOAPdenovo-63mer: Syntax error: "(" unexpected

Any idea how to solve it?

Thanks again!

It's not good practice to use sudo to run tools like this, that's only for installing software or performing crucial administrative tasks on your system. I expect SOAPdenovo to be safe, but when you run unknown software with sudo you give it all power on your system to modify/delete whatever it wants to. You are giving full access to everything. That might give nasty results.

Did you install SOAPdenovo yourself?

I downloaded the pre-compiled version that is supposed to be ready to be executed directly. Should I install it?

Which operating system do you use? You could try installing it as described on the GitHub page. Based on that page, Soapdenovo has been replaced by megahit.

Log in to answer this question.