RNA-Seq Differential Expression Bash Scripting Error
0
0
Entering edit mode
5.9 years ago

Hey all,

I am new to this community and not sure how to best write a post. So please let me know if you need more information. I am trying to automate my workflow for differential expression. I would like to turn my lines of code into a script so I can make multiple scripts and eventually pipe them all together... make a pipeline from my workflow. This is my first time attempting to do this. I tried to add some comments in my bourne shell script. I am not sure why it is throwing an error. Please refer to the screenshot. Also, if you have any helpful tips for bash scripting and automating workflows through pipeline development then let me know!

Side note, I am PhD in Biology with Emphasis a Bioinformatics. I familiar with R and MATLAB scripting... not bash scripting. Trying to use the command line because most people in my lab are more familiar with tools on the command line.

enter image description here

RNA-Seq pipeline bash scripting hisat2 samtools • 2.0k views
ADD COMMENT
0
Entering edit mode

Hi @timothfisher101, can you please add the code from your script directly into the post and format as code?

ADD REPLY
0
Entering edit mode

Greetings, I thought the screenshot link worked to view the code from my script and the error. None, the less, I will review the help people suggested.

ADD REPLY
0
Entering edit mode

Hi, I agree that it would be better to post your script as text. Anyway, you seem to use environment modules from http://modules.sourceforge.net/ I haven't seen this done before for bioinformatics tools, but there might be a good reason to do it that way in your case, it is worth finding out the motivation of the person giving you that script. It looks like the module you are attempting to use is not installed and installation can possibly only be done by the administrator of your system. Could you contact the server admin first?

ADD REPLY
1
Entering edit mode

We use modules for managing installation of bioinformatics tools on our institution's general purpose HPC. Although it doesn't seem that Hisat and samtools modules are being found (the problem with samtools is the use of module samtools rather than module load samtools, this doesn't seem to be the problem, because the system is finding the samtools and hisat executables just fine. The main problem appears to be the error:

(ERR): hisat2-align exited with value 141

I'm not familier with this error, but this means not output sam is created, and then samtools can't find it's input file.

ADD REPLY
1
Entering edit mode

Might be, or it could cause a consequential error. Please post the script as a text file (for easy copy paste for us to test). 141 is a SIGPIPE and I guess you have a superfluous pipe character in your call.

ADD REPLY
0
Entering edit mode

Greetings, I thought the screenshot link worked to view the code from my script and the error. None, the less, I will review the help people suggested. I made this script myself. I think the code part works because I just took my previous working code and added some variables ( $1, $2). I am unsure if I have to do the module load for hisat2 and samtools. I have all these packages executable globally in my conda bio-environment. I think the part that is throwing the error is in the beginning. I think the computer can not source activate bio environment, therefore, it cannot run hisat2-align.

ADD REPLY
1
Entering edit mode

The problem is that you have an extra pipe character on line 5 of your hisat2 call. I suspect that your "previously working code" piped the output of hisat2 to somewhere and you have added the -s option at later date.

ADD REPLY
0
Entering edit mode
ADD REPLY
0
Entering edit mode

Greetings, I thought the screenshot link worked to view the code from my script and the error. None, the less, I will review the help people suggested.

ADD REPLY
0
Entering edit mode

I would recommend for a workflow tool. Unless you are already familiar with bash and its a one off analysis its quickly pays off and its not much more difficult than bash. tutorial . It can work with modules.

ADD REPLY
0
Entering edit mode

Please see How to add images to a Biostars post to add your images properly. You need the direct link to the image (https://lh3.googleusercontent.com/rNp7h2tf91pr9PyOwMIVAy_5ZaS0uHaRi9ly3UEUZkxandpLWSh1OvL_qzC-44pfQKcWg82TyPUeMs5_hnbs=w3158-h1834-rw ), not the link to the webpage that has the image embedded (which is what you have used here)

ADD REPLY
0
Entering edit mode

Greetings, I thought the screenshot link worked to view the code from my script and the error. I guess I need to change the permissions of the google drive image to public. Nonetheless, I will try to get the code and another image up.

ADD REPLY

Login before adding your answer.

Traffic: 2822 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