Seqanswers Leaderboard Ad

Collapse

Announcement

Collapse
No announcement yet.
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • anikng
    replied
    Hi Forum Members..

    For Multiple sequence alignment purpose, I installed Bioperl (Wndows 7).But when i use a simple code for MSA, its shows error
    "align is not recognized as internal or external command..etc etc.
    MSG clustalw call...So, kindly suggest me if anyone know the issue..


    anikng,
    seoul

    Here is my code,
    #!/usr/bin/perl



    use Bio::Seq;
    use Bio::Tools::Run::Alignment::Clustalw;


    BEGIN { $ENV{CLUSTALDIR} = 'c:/CLUSTALW2/' }


    @params = ('ktuple' => 2, 'matrix' => 'BLOSUM');
    $factory = Bio::Tools::Run::Alignment::Clustalw->new(@params);
    $inputfilename = 'C:/Users/Anil/Desktop/1.txt';
    $aln = $factory->align($inputfilename);
    print "working";

    Leave a comment:


  • Thorondor
    replied
    seems like your perl module is not correctly installed.
    You did it that way http://www.cpan.org/modules/INSTALL.html ?

    edit: kinrads post helps more. ;-) didnt see it till i posted this one. well done.
    Last edited by Thorondor; 02-23-2011, 07:03 AM.

    Leave a comment:


  • krinard
    replied
    Two ways:

    1)
    Add this line to the very top of your code: use lib 'path/to/install/location/of/BioTools'

    2) Or, at the command prompt:
    export PERL5LIB='path/to/install/locations/of/BioTools:$PERL5LIB
    (or you can add to your .bashrc to make permanent; not just for this login)

    Leave a comment:


  • semna
    replied
    Hi krobison,
    I used your advice but still I have this error:

    Can't locate Bio/Tools/Run/Alignment/Clustalw.pm in @INC (@INC contains: /usr/lib/perl5/site_perl/5.12.1/i586-linux-thread-multi /usr/lib/perl5/site_perl/5.12.1 /usr/lib/perl5/vendor_perl/5.12.1/i586-linux-thread-multi /usr/lib/perl5/vendor_perl/5.12.1 /usr/lib/perl5/5.12.1/i586-linux-thread-multi /usr/lib/perl5/5.12.1 .) at clu.pl line 16.
    BEGIN failed--compilation aborted at clu.pl line 16.

    I know that is because of my location of clustal w, but I don't know how can tranfer it to my path. First I used wget and the link of clustal x and now its in my home directory but not work.thanks

    Leave a comment:


  • krobison
    replied
    Well, for a beginner it looks like you have a good start -- but what is the symptoms of your problem? What error do you get?

    One simple test that might help would be to add the code
    Code:
    unless ( -f "$ENV{'CLUSTALDIR'}/clustalw")
    {
      die "Can't find ClustalW executable\n"
    }
    (though check whether clustalw is indeed in that directory, or perhaps a /bin directory under it)

    In this context, you don't need the BEGIN block around the environment variable setting (though it doesn't hurt).

    Also, I am a strong believer in starting with "use strict" early -- you'll catch a lot of otherwise frustrating bugs. Every variable needs to then be prefixed with "my "

    Leave a comment:


  • semna
    replied
    I want to multiple sequence alignment and I have to use perl script and use clustal w for this purpose.Now for exapmle found something but I have a problem to sure that clustal w installed at executable or not?

    1. Make sure bioperl-run in installed in addition to BioPerl.
    2. Make sure clustalw is installed at executable
    3. Set path using the following command (assuming that clustalw is installed at /usr/local/bin/clustalw2):
    export CLUSTALDIR=/usr/local/bin/clustalw2

    #!/usr/bin/perl
    use Bio::AlignIO;
    use Bio::Root::IO;
    use Bio::Seq;
    use Bio::SeqIO;
    use Bio::SimpleAlign;
    use Bio::TreeIO;

    BEGIN { $ENV{CLUSTALDIR} = '/usr/local/bin/clustalw2/' }
    use Bio::Tools::Run::Alignment::Clustalw;

    # Build a clustalw alignment factory
    @params = ('ktuple' => 2, 'matrix' => 'BLOSUM');
    $factory = Bio::Tools::Run::Alignment::Clustalw->new(@params);

    # Pass the factory a list of sequences to be aligned.
    $inputfilename = 'blastdump/input.fasta';
    $aln = $factory->align($inputfilename); # $aln is a SimpleAlign object.
    # or
    $seq_array_ref = \@seq_array;
    # where @seq_array is an array of Bio::Seq objects
    $aln = $factory->align($seq_array_ref);

    # Or one can pass the factory a pair of (sub)alignments
    #to be aligned against each other, e.g.:
    $aln = $factory->profile_align($aln1,$aln2);
    # where $aln1 and $aln2 are Bio::SimpleAlign objects.

    # Or one can pass the factory an alignment and one or more unaligned
    # sequences to be added to the alignment. For example:
    $aln = $factory->profile_align($aln1,$seq); # $seq is a Bio::Seq object.

    # Get a tree of the sequences
    $tree = $factory->tree(\@seq_array);

    # Get both an alignment and a tree
    ($aln, $tree) = $factory->run(\@seq_array);

    # Do a footprinting analysis on the supplied sequences, getting back the
    # most conserved sub-alignments
    my @results = $factory->footprint(\@seq_array);
    foreach my $result (@results) {
    print $result->consensus_string, "\n";
    }

    # There are various additional options and input formats available.
    # See the DESCRIPTION section that follows for additional details.

    Leave a comment:


  • Thorondor
    replied
    for us it's difficult to get an idea, what your problem is. Give us more details about what you want to do and why you need a perl script for that ......

    Leave a comment:


  • semna
    replied
    thanks.but my problem is actually I am a new user and difficult to figure out what it means!!!

    Leave a comment:


  • krobison
    replied
    Google knows all, Google tells all.

    Leave a comment:


  • semna
    started a topic perl question?????

    perl question?????

    Hi
    I am a new one in perl programming.Does anyone know perl script for running clustalw bye emma??
    Thanks in advance

Latest Articles

Collapse

  • seqadmin
    Recent Advances in Sequencing Technologies
    by seqadmin







    Innovations in next-generation sequencing technologies and techniques are driving more precise and comprehensive exploration of complex biological systems. Current advancements include improved accessibility for long-read sequencing and significant progress in single-cell and 3D genomics. This article explores some of the most impactful developments in the field over the past year.

    Long-Read Sequencing
    Long-read sequencing has...
    12-02-2024, 01:49 PM
  • seqadmin
    Genetic Variation in Immunogenetics and Antibody Diversity
    by seqadmin



    The field of immunogenetics explores how genetic variations influence immune responses and susceptibility to disease. In a recent SEQanswers webinar, Oscar Rodriguez, Ph.D., Postdoctoral Researcher at the University of Louisville, and Ruben Martínez Barricarte, Ph.D., Assistant Professor of Medicine at Vanderbilt University, shared recent advancements in immunogenetics. This article discusses their research on genetic variation in antibody loci, antibody production processes,...
    11-06-2024, 07:24 PM

ad_right_rmr

Collapse

News

Collapse

Topics Statistics Last Post
Started by seqadmin, 12-02-2024, 09:29 AM
0 responses
134 views
0 likes
Last Post seqadmin  
Started by seqadmin, 12-02-2024, 09:06 AM
0 responses
48 views
0 likes
Last Post seqadmin  
Started by seqadmin, 12-02-2024, 08:03 AM
0 responses
38 views
0 likes
Last Post seqadmin  
Started by seqadmin, 11-22-2024, 07:36 AM
0 responses
69 views
0 likes
Last Post seqadmin  
Working...
X