SEQanswers

Go Back   SEQanswers > Bioinformatics > Bioinformatics



Similar Threads
Thread Thread Starter Forum Replies Last Post
Shell Scripting help *** AnushaC Bioinformatics 19 10-04-2013 02:23 PM
Shell Scripting AnushaC General 1 10-04-2013 03:32 AM
shell script help Kennels Bioinformatics 2 07-15-2013 05:26 PM
running samtools in shell script zorph Bioinformatics 4 03-02-2012 05:46 AM
Mira assembly -shell script robelb4 Bioinformatics 2 07-21-2011 06:57 AM

Reply
 
Thread Tools
Old 02-04-2014, 06:51 PM   #1
AnushaC
Member
 
Location: San Diego

Join Date: Sep 2013
Posts: 78
Default Interconnecting 2 to 3 shell scripts

Hi All,
I have 3 to 4 working shell scripts
for SRA to FASTQ
FASTQ to BAM
BAM to BEDGRAPH
can I write single shell script interconnecting these shell which are working individually fine . If so it is creating me several problem like I am writing fastq files to a temporary folder which is not able is recognize by second shell . If there any online links to these kind of problems I would appreciate help. What are kinds of issues to consider while merging several shell programs .

Thanks in advance,
Anusha.Ch
AnushaC is offline   Reply With Quote
Old 02-05-2014, 01:54 AM   #2
TiborNagy
Senior Member
 
Location: Budapest

Join Date: Mar 2010
Posts: 329
Default

Yes, you can write a single shell script wich is contains only other shell scripts. You need to set the command line parameters to each script get a proper input files. For example:
#!/bin/bash

./first.sh input.sra >/tmp/out.fastq
./second.sh /tmp/out.fastq >/tmp/out.bam

Even better, if you use variables, because there is less chance to misstype. For example:
FASTQ=/tmp/out.fastq
./fist.sh input.sh >$FASTQ
./second.sh $FASTQ ...
TiborNagy is offline   Reply With Quote
Old 02-11-2014, 02:56 AM   #3
gringer
David Eccles (gringer)
 
Location: Wellington, New Zealand

Join Date: May 2011
Posts: 836
Default

If you want to conserve space and get something close to pipe-like functionality, you can use FIFO buffers:

Code:
$ mkfifo test.txt
$ cat test.txt &
[1] 21854
$ echo -e "blah\nblah\nblah" > test.txt
$ blah
blah
blah

[1]+  Fertig                  cat test.txt
gringer is offline   Reply With Quote
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off




All times are GMT -8. The time now is 11:49 PM.


Powered by vBulletin® Version 3.8.9
Copyright ©2000 - 2019, vBulletin Solutions, Inc.
Single Sign On provided by vBSSO