Solved

Shell Mod

Posted on 2012-04-05
7
653 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
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
Comprehensive Backup Solutions for Microsoft

Acronis protects the complete Microsoft technology stack: Windows Server, Windows PC, laptop and Surface data; Microsoft business applications; Microsoft Hyper-V; Azure VMs; Microsoft Windows Server 2016; Microsoft Exchange 2016 and SQL Server 2016.

 
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

The Eight Noble Truths of Backup and Recovery

How can IT departments tackle the challenges of a Big Data world? This white paper provides a roadmap to success and helps companies ensure that all their data is safe and secure, no matter if it resides on-premise with physical or virtual machines or in the cloud.

Question has a verified solution.

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

Suggested Solutions

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 …
Active Directory replication delay is the cause to many problems.  Here is a super easy script to force Active Directory replication to all sites with by using an elevated PowerShell command prompt, and a tool to verify your changes.
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…
In a recent question (https://www.experts-exchange.com/questions/29004105/Run-AutoHotkey-script-directly-from-Notepad.html) here at Experts Exchange, a member asked how to run an AutoHotkey script (.AHK) directly from Notepad++ (aka NPP). This video…

751 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