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
          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, detection...
          Today, 06:46 AM
        • SEQadmin2
          Multiomic Liquid Biopsy: What DNA/RNA Panels Reveal That DNA Alone Can’t
          by SEQadmin2



          Tumors contain complex mixtures of cell populations that evolve in response to treatment and host-specific factors. Tissue biopsies provide only static snapshots of a tumor’s state. But what if we could follow that evolution over time using a minimally invasive technique?

          Liquid biopsies can detect tumor-derived material circulating in the bloodstream, providing a way to study treatment response, detect emerging resistance, and discover new biomarkers. Circulating
          ...
          10-14-2026, 09:55 AM

        ad_right_rmr

        Collapse

        News

        Collapse

        Topics Statistics Last Post
        Started by SEQadmin2, 10-28-2026, 09:57 AM
        0 responses
        22 views
        0 reactions
        Last Post SEQadmin2  
        Started by SEQadmin2, 10-28-2026, 09:51 AM
        0 responses
        14 views
        0 reactions
        Last Post SEQadmin2  
        Started by SEQadmin2, 10-22-2026, 11:13 AM
        0 responses
        67 views
        0 reactions
        Last Post SEQadmin2  
        Started by SEQadmin2, 10-22-2026, 10:48 AM
        0 responses
        47 views
        0 reactions
        Last Post SEQadmin2  
        Working...