Unconfigured Ad

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • huan
    Member
    • Oct 2010
    • 56

    #1

    How to run TOFU analysis in the perl ?

    Now I am working on the Iso_seq Analysis using the Tofu program, I am intended to intergrated all the analysis (including classify,cluster,Removing Redundant Transcripts Analysis,find fusion) in a perl script. But I run into an error when I run the Tofu program by using the following perl script :
    `/share/biosoft/smrtanalysis/current/smrtcmds/bin/smrtshell && source /share/software/python_virtualenv/bin/activate && collapse_isoforms_by_sam.py --input $fafile -s $fafile.sorted.sam -o $fafile.sorted.5merge>$fafile.sorted.5merge.log`;.
    The program only go into the smrtshell and doesn't run the following script. What is the matter?
    Is there any advice to intergrated the Iso_seq Analysis workflow and the TOFU workflow into a perl script?
    Thanks a lot!
    happy
  • Magdoll
    Member
    • Aug 2011
    • 31

    #2
    Hi,

    I don't really use Perl anymore but I think this issue is not coming from Perl but the fact that you are trying to activate a virtualenv within a script in a shell.

    I found a post that encountered the same issue trying to activate a virtualenv in a bash script:
    http://stackoverflow.com/questions/1...-a-bash-script

    Unfortunately the solution provided in the post (activating a subshell) did not work for me. I'm tempted to suggest that you do the smrtshell -> virtualenv *before* you launch a series of Perl scripts that would string together ToFU script calls. Or you can try googling a bit more to see if people have success with activating virtualenv inside Perl (or bash...)

    Best,
    --Liz

    Comment

    • bowhan
      Member
      • Sep 2015
      • 27

      #3
      Like `bash` command itself, when you directly call "smrtshell" it creates an interactive shell and breaks your flow. But if you gives it a script as an option, it will execute it and return to the parent shell when it finishes. So you can probably do it in this way:
      1. wrap Iso-Seq code in a bash script "run_iso-seq.sh"
      Code:
      #! /bin/bash
      . /path/to/virtualenv/bin/activate && \
      /path/to/collapse_isoforms_by_sam.py ...
      2. wrap the above bash script in another bash script "smrtshell_wrap.sh", which calls "smrtshell" to run "run_iso-seq.sh"
      Code:
      #! /bin/bash
      /path/to/smrtshell /path/to/run_iso-seq.sh
      3. call "smrtshell_wrap.sh" in perl
      Code:
      $ret = `/path/to/smrtshell_wrap.sh 2>&1`

      Comment

      • huan
        Member
        • Oct 2010
        • 56

        #4
        Thanks bowhan and MagdollO(∩_∩)O! This problem has troubled me a a lot! Your suggestion solves the problem prefectly~\(≧▽≦)/~
        happy

        Comment

        Latest Articles

        Collapse

        • SEQadmin2
          The Factors Reshaping Genome Assembly
          by SEQadmin2



          When the Human Genome Project declared the human genome finished in 2003, portions of the sequence were still missing, including many of its most repetitive and structurally complex regions.1 Still, for the next two decades, researchers analyzed their sequencing data against the single linear reference that came out of this effort. Released in 2013 as GRCh38, that reference has powered countless discoveries, but it has gaps and cannot capture the genetic diversity of the world’s...
          Yesterday, 07:04 AM
        • SEQadmin2
          16S/ITS Profiling vs. Shotgun Metagenomics: What Changes in Your Workflow?
          by SEQadmin2





          NGS has revolutionized clinical microbiology by offering new ways to identify and surveil pathogens without prior knowledge of the target. One popular approach is 16S rRNA and ITS amplicon sequencing, which targets specific microbial markers. But studies are increasingly incorporating shotgun metagenomics, a technique that sequences all DNA from a sample without targeting specific microbial markers. This approach allows more detailed taxonomic classification,...
          10-30-2026, 06:46 AM

        ad_right_rmr

        Collapse

        News

        Collapse

        Topics Statistics Last Post
        Started by SEQadmin2, 11-23-2026, 11:11 AM
        0 responses
        19 views
        0 reactions
        Last Post SEQadmin2  
        Started by SEQadmin2, 11-17-2026, 06:27 AM
        0 responses
        40 views
        0 reactions
        Last Post SEQadmin2  
        Started by SEQadmin2, 11-12-2026, 07:59 AM
        0 responses
        58 views
        0 reactions
        Last Post SEQadmin2  
        Started by SEQadmin2, 11-05-2026, 09:25 AM
        0 responses
        65 views
        0 reactions
        Last Post SEQadmin2  
        Working...