Seqanswers Leaderboard Ad

Collapse

Announcement

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

  • 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

  • #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:
    How do you create a Bash script to activate a Python virtualenv? I have a directory structure like: .env bin activate ...other virtualenv files... src shell.sh ...my c...


    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


    • #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


      • #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

        • 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
        31 views
        0 likes
        Last Post seqadmin  
        Started by seqadmin, 04-10-2024, 10:19 PM
        0 responses
        33 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