Solved

Shell Mod

Posted on 2012-04-05
7
651 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
Simplifying Server Workload Migrations

This use case outlines the migration challenges that organizations face and how the Acronis AnyData Engine supports physical-to-physical (P2P), physical-to-virtual (P2V), virtual to physical (V2P), and cross-virtual (V2V) migration scenarios to address these challenges.

 
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!

The average business loses $13.5M per year to ineffective training (per 1,000 employees). Keep ahead of the competition and combine in-person quality with online cost and flexibility by training with Linux Academy.

Question has a verified solution.

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

Suggested Solutions

SSH (Secure Shell) - Tips and Tricks As you all know SSH(Secure Shell) is a network protocol, which we use to access/transfer files securely between two networked devices. SSH was actually designed as a replacement for insecure protocols that sen…
Recently, an awarded photographer, Selina De Maeyer (http://www.selinademaeyer.com/), completed a photo shoot of a beautiful event (http://www.sintjacobantwerpen.be/verslag-en-fotoreportage-van-de-sacramentsprocessie-door-antwerpen#thumbnails) in An…
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…
Get a first impression of how PRTG looks and learn how it works.   This video is a short introduction to PRTG, as an initial overview or as a quick start for new PRTG users.

832 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