For Programmers: Free Programming Magazines  


Home > Archive > PERL CGI Beginners > August 2004 > RE: pl file run problem?









You are viewing an archived Text-only version of the thread. To view this thread in it's original format and/or if you want to reply to this thread please [click here]

 

Author RE: pl file run problem?
Jian Sun

2004-08-05, 3:55 pm

Dear All;
I tried a Clustw Alignment script as shown below, ClustAln.pl. It =
runs successfully under MS-Dos command line (perl ClustAln.pl), while =
when I tried to run it through the CGI approach =
(http://localhost/cgi-bin/ClustAln.pl)=20
, I get this error message:
****************************************
*********************************=
*************
Error in tempdir() using \\\\XXXXXXXXXX: Could not create directory =
\\\\zsClfr1b9g: Invalid argument at C:/Perl/site/lib/Bio/Root/IO.pm line =
677.
****************************************
*********************************=
*************
;;;;;;ClustAln.pl;;;;;;;;
/////////////////////////////////////////////////////////////////////////=
///////////////////////////////////////////////////////////////
#!C:\Perl\bin\perl.exe
use lib "C:\Perl\lib";
use FileIO;
use SeqFileIO;
use IO::String;
use CGI qw/:standard/;
=20
use Bio::Perl;
use Bio::Tools::Run::Alignment::Clustalw;
use Bio::SimpleAlign;
use Bio::AlignIO;
=20
use strict;
use warnings;
=20
my @params =3D ('ktuple' =3D> 2, 'matrix' =3D> 'BLOSUM');
my $factory =3D Bio::Tools::Run::Alignment::Clustalw->new(@params);
my $ktuple =3D 3;
$factory->ktuple($ktuple); # change the parameter before executing
my $str =3D Bio::SeqIO->new(-file=3D> 'Clustseq.fa',=20
'-format' =3D> 'Fasta');
my @seq_array =3D();
while ( my $seq =3D $str->next_seq() ) {push (@seq_array, $seq) ;}
my $seq_array_ref =3D \@seq_array; =20
# where @seq_array is an array of Bio::Seq objects

my $aln =3D $factory->align($seq_array_ref);
my $out =3D Bio::AlignIO->new(-file =3D> ">alout.aln",
-format =3D> 'clustalw',
-flush =3D> 0);
$out->write_aln($aln);
/////////////////////////////////////////////////////////////////////////=
///////////////////////////////////////////////////////////////
=20
Could anybody point me what the problem here?=20
Thanks in advance
=20
Jane
Sponsored Links







Also available: Server administration forum archive | Web Design forum archive | Software forum archive | Hardware reviews archive

Copyright 2008 codecomments.com