Solved

Shell Mod

Posted on 2012-04-05
7
647 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 39

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
Maximize Your Threat Intelligence Reporting

Reporting is one of the most important and least talked about aspects of a world-class threat intelligence program. Here’s how to do it right.

 
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 27

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

Why You Should Analyze Threat Actor TTPs

After years of analyzing threat actor behavior, it’s become clear that at any given time there are specific tactics, techniques, and procedures (TTPs) that are particularly prevalent. By analyzing and understanding these TTPs, you can dramatically enhance your security program.

Join & Write a Comment

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…
Background Still having to process all these year-end "csv" files received from all these sources (including Government entities), sometimes we have the need to examine the contents due to data error, etc... As a "Unix" shop, our only readily …
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…
This demo shows you how to set up the containerized NetScaler CPX with NetScaler Management and Analytics System in a non-routable Mesos/Marathon environment for use with Micro-Services applications.

744 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

12 Experts available now in Live!

Get 1:1 Help Now