CGI/Perl Guide | Learning Center | Forums | Advertise | Login
Site Search: in

  Main Index MAIN
Search Posts SEARCH
Who's Online WHO'S
Log in LOG

Home: Perl Programming Help: Beginner:
Perl for bioinformatrics...



Oct 27, 2009, 4:07 AM

Post #1 of 3 (729 views)
Perl for bioinformatrics... Can't Post

Hello to all,

My name is Alvaro and Im new here (and also in perl programming). Ive started my PhD studies in Molecular Biology, and my supervisor has encouraged me to learn Perl in order to use it to perform some bioinformatic tasks.
Im a Biologists with no programming experience, and its being very hard to me learn Perl programming at the moment.
It seems that since my programming background was null at the moment, I cannot run a perl program correctly since I came across "syntax" errors all the time and you (people in this forum) are the only expertise advice I can get, so please forgive me if any script I ask you about has what you may call as "basic mistakes"...
I tried to create a program that reads a list of Protein Accesion Numbers (PAN) from a plain text file, assign those PAN to an array. Then using a loop, each of these PAN should be extracted from a database using a Bioperl script.
My program doesnt seem to work at all, and I wonder if you could take a look at it an tell me what Im doing wrong.
You will save my neck if you help me.
Here is the program Ive written:

#!/usr/bin/perl -w
use Bio::DB::GenPept;
use Bio::DB::GenBank;
use Bio::SeqIO;
# Enter the list trough STDIN
print "Enter your list name:";
@list = <STDIN>;
chomp @list
# The loop to retrieve each of the list PAN
# and write them to a file
foreach $list (@list)
my $out = new Bio::SeqIO (-file => ">remote_seqs.fasta",
-format => 'fasta');
$db = new Bio::DB::GenPept();
$seq = $db->get_Seq_by_acc('');

Thanks in advance



Oct 27, 2009, 8:42 AM

Post #2 of 3 (717 views)
Re: [alfumao] Perl for bioinformatrics... [In reply to] Can't Post

You need to provide more details about your specific problem.
"My program doesnt seem to work at all" is not very descriptive.

I can see 1 syntax error -- you need to add a semicolon
after "chomp @list":

chomp @list;

You should also add this to the top of your code because
it will help you to avoid common Perl programming mistakes:

use strict;

I have no experience with the Bio Perl modules,
and I do not have them installed on my computer.
So, I will not be able to run your code. If you show
the error messages you are getting, we may be able
to give you more specific advice. Please use 'code'
tags around the code and error messages you post.

Have you researched the BioPerl websites thoroughly:

Another general Perl programming resource:
"Basic Perl debugging checklist"

(This post was edited by toolic on Oct 27, 2009, 8:53 AM)


Oct 27, 2009, 9:53 AM

Post #3 of 3 (708 views)
Re: [toolic] Perl for bioinformatrics... [In reply to] Can't Post

Thank you very much for your help Toolic,
Ill try to do what youve just told me about the error mesages and post that info.
The only problem is, taht Im running Perl on windows and those mesagges appear only as a flash on the screen and then dissapear...but Ill try to collect the info anyway ;)
Thank you again ;)


Search for (options) Powered by Gossamer Forum v.1.2.0

Web Applications & Managed Hosting Powered by Gossamer Threads
Visit our Mailing List Archives