[Bioperl-l] piping to CAP3

James Gregory j1gregor at biomail.ucsd.edu
Tue Jul 6 16:59:43 EDT 2004


I'm trying to write a script that receives either pasted sequences or a
file upload of FASTA format seqs for assembly using CAP3 but i'm having
some trouble.  This doesn't use bioperl but i'm guessing that this
audience will be more familiar with what i'm trying to do.

use strict;
use CGI qw(:standard escapeHTML);

my $input = new CGI;
my $tgicl = "/opt/CAP_update/tgicl_linux/bin/tgicl"; #path to CAP3

# for pasted seqs

my $seq = $input->param("seqs"); # retrieve seqs
open (FILE, ">seqAssembly.txt") || die;
my $file = <FILE>;   # printing seqs to file
print FILE "$seq";
close FILE;

open PIPE_TO_CAP3, "| $tgicl seqAssembly.txt" || die $!;

# not sure how to get to the CAP3 output files at this step or if the
# above syntax for opening the file is correct.
close PIPE_TO_CAP3;

calling CAP3 from the shell would normally just be:

tgicl file_name

there are multiple file outputs and i'm not sure how to retrieve these in
my script.  The way it's written nothing really happens (not
surprising). Any help
would be appreciated.


More information about the Bioperl-l mailing list