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
                      Advancing Precision Medicine for Rare Diseases in Children
                      by seqadmin




                      Many organizations study rare diseases, but few have a mission as impactful as Rady Children’s Institute for Genomic Medicine (RCIGM). “We are all about changing outcomes for children,” explained Dr. Stephen Kingsmore, President and CEO of the group. The institute’s initial goal was to provide rapid diagnoses for critically ill children and shorten their diagnostic odyssey, a term used to describe the long and arduous process it takes patients to obtain an accurate...
                      12-16-2024, 07:57 AM
                    • 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 seen remarkable advancements,...
                      12-02-2024, 01:49 PM

                    ad_right_rmr

                    Collapse

                    News

                    Collapse

                    Topics Statistics Last Post
                    Started by seqadmin, 12-17-2024, 10:28 AM
                    0 responses
                    33 views
                    0 likes
                    Last Post seqadmin  
                    Started by seqadmin, 12-13-2024, 08:24 AM
                    0 responses
                    49 views
                    0 likes
                    Last Post seqadmin  
                    Started by seqadmin, 12-12-2024, 07:41 AM
                    0 responses
                    34 views
                    0 likes
                    Last Post seqadmin  
                    Started by seqadmin, 12-11-2024, 07:45 AM
                    0 responses
                    46 views
                    0 likes
                    Last Post seqadmin  
                    Working...
                    X