Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > Perl > Perl Misc > How do i resolve this error message Please! I need help

Reply
Thread Tools

How do i resolve this error message Please! I need help

 
 
Adebiyi Marion
Guest
Posts: n/a
 
      03-30-2013
the error message is;
Can't modify concatenation (.) or string in scalar assignment at theScript.pl line 67, near ");"

theScript is as below;

use strict;

my $file = shift @ARGV;
open(FILE, "$file") or die "Cannot open file: $!";

while(<FILE>)
{
chomp;
my $gene = $_;
system("wget -O " . $gene . ".fasta
\"http://www.uniprot.org/uniprot/?query=gene%3a" . $gene .
"&format=fasta\"");

open(FASTA, $gene . ".fasta") or die "Cannot open FASTA file
$gene: $!";
my $sequence;

while(<FASTA>)
{
chomp;
$sequence .= $_ unless /^>/;
}
close FASTA;

system("wget -O " . $gene . ".out
\"http://web.expasy.org/cgi-bin/blast/blast.pl?sequence=\"" . $sequence
.. "\"&action=PlainText&protdb_section=HUMAN&showsc=3 &showal=0\"");

open(BLAST, $gene . ".out") or die "Cannot open BLAST file
$gene: $!";
my $idMapping;

while(<BLAST>)
{
if (/^(sp|tr)\!([A-Z\d]+)/)
{
$idMapping .= $2 . " ";
}
}
close BLAST;

if ($idMapping)
{
open(OUT, ">$gene.up2ensembl") or die "Cannot open OUT
for writing: $!";
print OUT &getIdMappingResult($idMapping);
}
}
close FILE;

sub getIdMappingResult
{
my ($list) = (@_);

my $base = 'http://www.uniprot.org';
my $tool = 'mapping';

my $params = {
from => 'ACC',
to => 'ENSEMBL_ID',
format => 'tab',
query => $list
};

my $contact = '(E-Mail Removed)'; # Please set your email address here to help
us debug in case of problems.
my $agent = LWP::UserAgent->new(agent => "libwww-perl $contact");
push @{$agent->requests_redirectable}, 'POST';

my $response = $agent->post("$base/$tool/", $params);

while (my $wait = $response->header('Retry-After')) {
print STDERR "Waiting ($wait) ; Query: $base/$tool/ ;
Parameters: ...\n";
sleep $wait;
$response = $agent->get($response->base);
}

$response->is_success ?
return $response->content :
die 'Failed, got ' . $response->status_line . ' for ' .
$response->request->uri . "\n";
}


My list can be attached asap if need be.

Marion
 
Reply With Quote
 
 
 
 
Rainer Weikusat
Guest
Posts: n/a
 
      03-31-2013
Adebiyi Marion <(E-Mail Removed)> writes:
> the error message is;
> Can't modify concatenation (.) or string in scalar assignment at theScript.pl line 67, near ");"
>
> theScript is as below;


Consider using a less bizarre way of distributing 'long sequences of
somethings' over several lines of file ...

[...]

> my $contact = '(E-Mail Removed)'; # Please set your email address here to help
> us debug in case of problems.


.... the problem that you split this comment incorrectly, causing the perl
compiler to try to compile

us debug in case of problems.

which - in turn - caused the initially quoted error message to be
printed hadn't occured then ...
 
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
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Re: How include a large array? Edward A. Falk C Programming 1 04-04-2013 08:07 PM
Error (10028): Can't resolve multiple constant drivers for net"light" at LED.vhd(25) NEED HELP! willmann817 VHDL 5 01-28-2013 05:31 PM
src-resolve: Cannot resolve the name ... ivanet@gmail.com XML 1 03-23-2007 12:10 PM
Annoying error message re running scripts....please help resolve Arawak Computer Support 2 02-04-2005 06:03 PM
need help to resolve concatenation error TJS ASP .Net 2 01-16-2004 05:39 AM



Advertisments