Dear monks,
I am trying to write a simple script to align 2 sequence objects. The problem is that I get the following error message:
Use of uninitialized value in concatenation (.) or string at C:/Perl/site/lib/Bio/Tools/Run/Alignment/Clustalw.pm line 645. Use of uninitialized value in concatenation (.) or string at C:/Perl/site/lib/Bio/Tools/Run/Alignment/Clustalw.pm line 646. 'align' is not recognized as an internal or external command, operable program or batch file.
I would really appreciate some help. Here is my code.
#c:\perl\perl.exe
use strict;
use warnings;
use Bio::Seq;
use Bio::Tools::Run::Alignment::Clustalw;
BEGIN { $ENV{CLUSTALDIR} = 'c:/CLUSTALW2/' }
my $dna_seq = "NACCNANCGGGGGNNAAANTNNNACACTNCNGGGGGGNTNNTTANTGNGTNACAC
+ANNNGNCTNNNGGNNNCNANANTCNACAG +GACTTAGAAGNCTNCANNGGANCATNCCCTGCTANACN
+ANGNNANCACTCTNCAGNNCNNANCNTNGGGCNNCCTNNTCNNTNNNCCATNNGNGCTNC +ANNANCN
+TANANNGATNANTANAGNANNTTNTGTTATGNNGNGTG";
my$tn5_seq = "GGGGNCCCGCTTACGATACTTCGTTATAGCATACATTATACGAAGTTATCAGATCC
+CCCTGGATGGAAAACGGGAAAGGTTCCG +TCCAGGACGCTACTTGTGTATAAGAGTCAGGTT";
$dna_seq =~ s/\s+//g;
$tn5_seq =~ s/\s+//g;
my $id_1 = 'test1_DNA';
my $id_2 = 'test2_DNA';
my $alphabet = 'DNA';
my $seq_obj = Bio::Seq->new(-seq => $dna_seq,
-display_id => $id_1,
-alphabet => $alphabet);
my $tn5_obj = Bio::Seq->new(-seq => $tn5_seq,
-display_id => $id_2,
-alphabet => $alphabet);
my @params = ('ktuple' => 2, 'matrix' => 'BLOSUM');
my $factory = Bio::Tools::Run::Alignment::Clustalw->new(@params);
my @seq_array =(); push @seq_array, $seq_obj, $tn5_obj;
my $seq_array_ref = \@seq_array;
my $aln = $factory->align($seq_array_ref);
Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
Titles consisting of a single word are discouraged, and in most cases are disallowed outright.
Read Where should I post X? if you're not absolutely sure you're posting in the right place.
Please read these before you post! —
Posts may use any of the Perl Monks Approved HTML tags:
- a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, details, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, summary, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
You may need to use entities for some characters, as follows. (Exception: Within code tags, you can put the characters literally.)
| |
For: |
|
Use: |
| & | | & |
| < | | < |
| > | | > |
| [ | | [ |
| ] | | ] |
Link using PerlMonks shortcuts! What shortcuts can I use for linking?
See Writeup Formatting Tips and other pages linked from there for more info.