sr320 / course-fish546-2016

6 stars 5 forks source link

Pausing analysis in Unix w/ reboot #50

Closed aspanjer closed 8 years ago

aspanjer commented 8 years ago

I know that you can use ctrl-Z to pause a process in Unix. Is there a way to not only pause, but reboot the machine and then restart the analysis where it left off?

sr320 commented 8 years ago

For this I break up jobs - I will post tutorials

sr320 commented 8 years ago

Here is what I do for blast

!../scripts/fasta-splitter.pl \
--n-parts 10 \
query.fasta 

This breaks up my query into 10 parts.

%%bash
for f in query.part*
do
blastx \
-query $f \
-db /usr/local/bioinformatics/dbs/uniprot_sprot \
-evalue 1e-5 \
-max_target_seqs 1 \
-max_hsps 1 \
-outfmt 6 \
-num_threads 16 \
-out blastout_"$f"_sp \
2> error-blastout_"$f"_sp
done

Then I use a loop to do each of the 10 parts consecutively, writing out output and standard error.

!cat blastout* > blastx_sprot.tab

concatenating all together