Solved

Shell Mod

Posted on 2012-04-05
7
652 Views
Last Modified: 2012-06-15
Hi,

I have two scripts:- pipeline.sh and fastacutter.pl

These are scripts which are pre-made and therefore I'm trying to modify.

There is a section in pipeline.sh which uses a program called formatdb:

#Formatdb
echo formatdb host and controls ...
$BLASTBIN/formatdb -i $PROTEOMEDIR/$HOST.fasta
$BLASTBIN/formatdb -i $PROTEOMEDIR/$CONTROL1.fasta
$BLASTBIN/formatdb -i $PROTEOMEDIR/$CONTROL2.fasta
$BLASTBIN/formatdb -i $PROTEOMEDIR/$CONTROL3.fasta
$BLASTBIN/formatdb -i $PROTEOMEDIR/$CONTROL4.fasta
$BLASTBIN/formatdb -i $PROTEOMEDIR/$CONTROL5.fasta

Basically, I don't need to do this, as I already have the results from the above code stored in a folder called 'database' found at:

/fs/nas15/home/mqbpgsm4/permanalysis/database

So essentially what I'm trying to do is remove the above code, and instead, whenever HOST, CONTROL1, CONTROL2, CONTROL3, CONTROL4 or CONTROL 5 are needed by pipeline.sh or fastacutter.pl, direct the script to /fs/nas15/home/mqbpgsm4/permanalysis/database to pick up the relevant file.

Any advice would be very much appreciated.

Thanks,

Stephen.
pipeline.sh
fastacutter.txt
0
Comment
Question by:StephenMcGowan
7 Comments
 
LVL 34

Expert Comment

by:Duncan Roe
ID: 37814716
How often would you run these scripts and how long does the bit you are trying to remove take? I would strongly urge that you not mess with them - it could easily lead to support issues down the track. In Breif:

If you need to ask, you shouldn't do it.
0
 
LVL 51

Expert Comment

by:ahoffmann
ID: 37815141
> .. direct the script to  ..
what does this mean? can you please give an example
0
 
LVL 40

Expert Comment

by:noci
ID: 37815237
Would it be wise to strip the appearant creation of an empty database out of the middle of a script?

Do you want to merge the results of 2 consecutive runs?
0
Free learning courses: Active Directory Deep Dive

Get a firm grasp on your IT environment when you learn Active Directory best practices with Veeam! Watch all, or choose any amount, of this three-part webinar series to improve your skills. From the basics to virtualization and backup, we got you covered.

 
LVL 28

Expert Comment

by:Jan Springer
ID: 37815962
Please post an example of the 'database' file.  If I understand correctly, you want to read in the values from this file to be used in pipeline.sh instead of it calling formatdb.

If it isn't obvious what lines are for what variables, please let us know.
0
 
LVL 29

Accepted Solution

by:
serialband earned 500 total points
ID: 37816835
It seems that you just have to comment out the lines you've listed and change the PROTEOMEDIR assignment in line 55 and line 140 to match the directory you need.
0
 

Author Comment

by:StephenMcGowan
ID: 37932458
I've requested that this question be deleted for the following reason:

Abandoned
0

Featured Post

Master Your Team's Linux and Cloud Stack

Come see why top tech companies like Mailchimp and Media Temple use Linux Academy to build their employee training programs.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

A year or so back I was asked to have a play with MongoDB; within half an hour I had downloaded (http://www.mongodb.org/downloads),  installed and started the daemon, and had a console window open. After an hour or two of playing at the command …
Checking the Alert Log in AWS RDS Oracle can be a pain through their user interface.  I made a script to download the Alert Log, look for errors, and email me the trace files.  In this article I'll describe what I did and share my script.
Learn how to get help with Linux/Unix bash shell commands. Use help to read help documents for built in bash shell commands.: Use man to interface with the online reference manuals for shell commands.: Use man to search man pages for unknown command…
Connecting to an Amazon Linux EC2 Instance from Windows Using PuTTY.

830 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question