Solved

Shell Mod

Posted on 2012-04-05
7
650 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
Enterprise Mobility and BYOD For Dummies

Like “For Dummies” books, you can read this in whatever order you choose and learn about mobility and BYOD; and how to put a competitive mobile infrastructure in place. Developed for SMBs and large enterprises alike, you will find helpful use cases, planning, and implementation.

 
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 28

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

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

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

Email validation in proper way is  very important validation required in any web pages. This code is self explainable except that Regular Expression which I used for pattern matching. I originally published as a thread on my website : http://www…
It’s 2016. Password authentication should be dead — or at least close to dying. But, unfortunately, it has not traversed Quagga stage yet. Using password authentication is like laundering hotel guest linens with a washboard — it’s Passé.
Learn several ways to interact with files and get file information from the bash shell. ls lists the contents of a directory: Using the -a flag displays hidden files: Using the -l flag formats the output in a long list: The file command gives us mor…
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…

939 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

Need Help in Real-Time?

Connect with top rated Experts

1 Experts available now in Live!

Get 1:1 Help Now