Seqanswers Leaderboard Ad

Collapse

Announcement

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

  • execute VelvetOptimiser from perl script

    Hello,
    I am trying to run velvetoptimiser using the perl system command my script is like this:
    my @velvetcmd;
    my $velvetpath="/opt/software/velvet/1.2.10/contrib/VelvetOptimiser-2.2.4/VelvetOptimiser.pl";
    push @velvetcmd,$velvetpath;
    my $velvetarg=" -v -s 27 -e 31 -f '-fastq -shortPaired $reportdir/velvet/$nameseq.shuffled.fastq.gz' -p $velvetdir/$nameseq\_assembly";
    push @velvetcmd,$velvetarg;
    my $velvetcmdstr= join (" ",@velvetcmd);
    system ('perl',$velvetpath,$velvetcmdstr) or die ;

    I have the error message from :
    You must supply the velveth parameter line in quotes. eg -f '-short .....'
    Usage: /opt/software/velvet/1.2.10/contrib/VelvetOptimiser-2.2.4/VelvetOptimiser.pl [options] -f 'velveth input line'

    Thanks for helping
    b

  • #2
    Have you tried "escaping" single quotes (e.g. http://stackoverflow.com/questions/5...single-quote)?

    Comment


    • #3
      yes, it returns the same error!

      Comment


      • #4
        Any reason why you are doing this via Perl and not directly on the command line? BTW you appear to be missing velveth in the -f part of your command line.

        Comment


        • #5
          I' d like to call velvetoptimiser as part of a perl script which loop through list of sequences.
          what do you mean missing velveth?
          When I run the same string on command line it works! Should I change the argument I pass through system?

          Comment


          • #6
            I don't think you have to specify velveth.

            This is from the VelvetOptimiser manual:

            VelvetOptimiser.pl [options] -f 'velveth input line'

            and an example:

            % VelvetOptimiser.pl -s 27 -e 31 -f '-short -fastq s_1_sequence.txt'

            Comment


            • #7
              Usage: /opt/software/velvet/1.2.10/contrib/VelvetOptimiser-2.2.4/VelvetOptimiser.pl [options] -f 'velveth input line'.

              Above message from your first post threw me off but looking at the VelvetOptimiser.pl help that is not needed. Trying to understand how you are constructing the command line.

              Comment


              • #8
                @bpich

                I'm not that familiar with the system() command,

                but it seems that you are givng the path twice, once in $velvetpath, and again in $velvetcmdstr.

                what happens if you try:
                system ('perl',$velvetpath,$velvetarg) or die ;

                Comment


                • #9
                  See if this modification to the two lines works with rest of your code (with @mastal's suggestion).

                  Code:
                  my @velvetcmd;
                  my $velvetpath="/opt/software/velvet/1.2.10/contrib/VelvetOptimiser-2.2.4/VelvetOptimiser.pl";
                  push @velvetcmd,$velvetpath;
                  my $velvetarg=" -v -s 27 -e 31 -f '-fastq -shortPaired $reportdir/velvet/$nameseq.shuffled.fastq.gz' -p $velvetdir/$nameseq\_assembly";
                  push @velvetcmd,$velvetarg;
                  my $velvetcmdstr= join (" ",@velvetcmd);
                  system ("perl ",$velvetpath,$velvetarg) or die ;
                  Last edited by GenoMax; 10-23-2015, 04:39 AM.

                  Comment


                  • #10
                    Thanks! modifications work well
                    b

                    Comment

                    Latest Articles

                    Collapse

                    • seqadmin
                      Current Approaches to Protein Sequencing
                      by seqadmin


                      Proteins are often described as the workhorses of the cell, and identifying their sequences is key to understanding their role in biological processes and disease. Currently, the most common technique used to determine protein sequences is mass spectrometry. While still a valuable tool, mass spectrometry faces several limitations and requires a highly experienced scientist familiar with the equipment to operate it. Additionally, other proteomic methods, like affinity assays, are constrained...
                      04-04-2024, 04:25 PM
                    • seqadmin
                      Strategies for Sequencing Challenging Samples
                      by seqadmin


                      Despite advancements in sequencing platforms and related sample preparation technologies, certain sample types continue to present significant challenges that can compromise sequencing results. Pedro Echave, Senior Manager of the Global Business Segment at Revvity, explained that the success of a sequencing experiment ultimately depends on the amount and integrity of the nucleic acid template (RNA or DNA) obtained from a sample. “The better the quality of the nucleic acid isolated...
                      03-22-2024, 06:39 AM

                    ad_right_rmr

                    Collapse

                    News

                    Collapse

                    Topics Statistics Last Post
                    Started by seqadmin, 04-11-2024, 12:08 PM
                    0 responses
                    30 views
                    0 likes
                    Last Post seqadmin  
                    Started by seqadmin, 04-10-2024, 10:19 PM
                    0 responses
                    32 views
                    0 likes
                    Last Post seqadmin  
                    Started by seqadmin, 04-10-2024, 09:21 AM
                    0 responses
                    28 views
                    0 likes
                    Last Post seqadmin  
                    Started by seqadmin, 04-04-2024, 09:00 AM
                    0 responses
                    53 views
                    0 likes
                    Last Post seqadmin  
                    Working...
                    X