Unconfigured Ad

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • eagb
    Junior Member
    • Feb 2013
    • 3

    #1

    Grab Only Genes from Trinity Assembly FASTA Output

    I'm doing some transcriptome assembly work with Trinity, which outputs a FASTA file full with ID numbers that look something like this: c0000_g1. Only the c0000 part is the ID number, the g bit refers to other transcripts for that gene. I want to go through and grab only the longest sequences per ID number and save that file as a new FASTA. I've been trying to use dictionaries with Python/Biopython but having trouble (new to using python for scientific computing). Here's a made up data set to explain what I'm talking about: https://gist.github.com/anonymous/69b46ddd94a91d30555d. So here, my new FASTA file would contain c00001_g1, c00002_g2, c00003_g1, and c00004_g2 and their respective sequences. Any ideas/code/scripts that would be of use here?
  • bio_boris
    Member
    • Mar 2013
    • 14

    #2
    Hi Eagb,

    I hacked something together in perl, it should work for smaller datasets, but it loads the entire fasta into memory, instead of just sequence lengths.

    Grab Only Genes from Trinity Assembly FASTA Outp http://seqanswers.com/forums/showthread.php?t=43749 - grab.pl


    If two sequences are the same length, the second one would be thrown away.

    Comment

    • Apexy
      Member
      • Apr 2011
      • 62

      #3
      Hi eagb,

      Is this exercise an attempt to reduce redundancy or complexity of the transcriptome assembly? Out of curiosity, what are the odds that the largest sequence per 'gene' is a chimera or that the 'c0000 part' is a collection of paralogs? The last time I checked, the largest sequence per 'c0000 part' is likely the one that is highly expressed. This stems from the behaviour of 'Inchworm'. Perhaps you are interested in achieving something other than reduction of redundancy but I thought I let you know of the possibility of loosing genuine transfrags.

      Comment

      • eagb
        Junior Member
        • Feb 2013
        • 3

        #4
        Reduce redundancy. For the record, this is the solution I hacked together https://gist.github.com/ethanabaker1...38a614ada09e85 .

        Probably not going to actually end up using these results - adopting a different analysis pipeline...

        Comment

        Latest Articles

        Collapse

        • 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
        • SEQadmin2
          New Genomics Technologies Take Aim at Long-Standing Limits
          by SEQadmin2


          Researchers using sequencing and genomics tools often have to make trade-offs. They can choose between speed or scale, short reads or long-range information, or targeted panels or a view of the whole transcriptome. New technologies that have been released this year are built to address those tough choices.

          We asked six companies the same four questions to learn about their latest products. The new technologies bring a lot to the table, including rethinking sequencing
          ...
          09-28-2026, 10:25 AM

        ad_right_rmr

        Collapse

        News

        Collapse

        Topics Statistics Last Post
        Started by SEQadmin2, 10-22-2026, 11:13 AM
        0 responses
        23 views
        0 reactions
        Last Post SEQadmin2  
        Started by SEQadmin2, 10-22-2026, 10:48 AM
        0 responses
        20 views
        0 reactions
        Last Post SEQadmin2  
        Started by SEQadmin2, 10-15-2026, 10:52 AM
        0 responses
        36 views
        0 reactions
        Last Post SEQadmin2  
        Started by SEQadmin2, 10-14-2026, 05:39 AM
        0 responses
        42 views
        0 reactions
        Last Post SEQadmin2  
        Working...