Tophat2 command could not get finished/ Broken pipe issue?
0
0
Entering edit mode
8.5 years ago

Hi, I was trying to use Tophat2 to align fastq data to mm9 genome. after trimming to get rid of the adaptors, i used command:

 tophat2 -p 30 --GTF ~/Ref_sequence/mm9_genes.gtf ~/Tool/bowtie2-2.2.9/Mus_musculus/UCSC/mm9/Sequence/Bowtie2Index/Bowtie2Index filename.cut4.fastq &

to in order to get mapping done.

One issue is that the pipe would get broken before the job finishes. Since I used the “&” at the end of my command, so I thought the command will be carried out, anyway. but when I checked the outputs, it seems that the command was not carried out until the end.

So do I need to do something to prevent the pipe from broken to keep the command running?

Or once I put the command in the background by ampersand sign “&”, I do not have to worry about it. the issue was caused by other things?

Do anyone has any suggestions?

Thanks.

alignment RNA-Seq sequencing • 2.1k views
ADD COMMENT
0
Entering edit mode

Broken pipe most likely shows that your login session (ssh?) was interrupted, and thereby you got logged off from the server, which terminates all processes started from within that shell. Run your command using nohup, like nohup tophat2 same params & output will be appended to nohup.out. This is typical for all long-running processes and has nothing to do with tophat. If the process is running already and you forgot nohup, you can achieve the same minus the output redirection with the disown command

ADD REPLY
0
Entering edit mode

@Michael Dondrup. Thanks for your kind suggestion. Could I confirm about two points: 1. using ampersand "&" does not guarantee that the command will be carried out until the end. it has be used together with "nohup". by using " nohup 'command' &" could ensure the command to be finished even under the condition that "login session (ssh?) was interrupted.", loging out of server or turn off the terminal. (assuming that nothing wrong within the command causing breaks) 2. by using "nohup tophat2 same params &" , the default output will be in nohup.out instead of the default output of the command (here tophatout), but the contents will be exactly the same. Did I get the points right?

ADD REPLY
1
Entering edit mode

exactly! nohup is a POSIX standard tool, therefore it will be available on most *NIX like os incl. MacOS X and Linux

  1. using ampersand "&" does not guarantee that the command will be carried out until the end. it has to be used together with "nohup". This is correct, expecially if you log out from your session, nohup will guarantee that the process is not terminated. However program error, server shutdown etc. will still terminate the process. see man nohup. There are more advanced systems which include checkpointing, but they are out of scope.

  2. all output that goes to standard output or standard error of the console will be redirected to ./nohup.out. This does not affect other output the program writes to files. again please check man nohup for details

ADD REPLY

Login before adding your answer.

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