Seqanswers Leaderboard Ad

Collapse

Announcement

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

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

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


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


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

        • seqadmin
          Recent Advances in Sequencing Analysis Tools
          by seqadmin


          The sequencing world is rapidly changing due to declining costs, enhanced accuracies, and the advent of newer, cutting-edge instruments. Equally important to these developments are improvements in sequencing analysis, a process that converts vast amounts of raw data into a comprehensible and meaningful form. This complex task requires expertise and the right analysis tools. In this article, we highlight the progress and innovation in sequencing analysis by reviewing several of the...
          Yesterday, 07:48 AM
        • seqadmin
          Essential Discoveries and Tools in Epitranscriptomics
          by seqadmin




          The field of epigenetics has traditionally concentrated more on DNA and how changes like methylation and phosphorylation of histones impact gene expression and regulation. However, our increased understanding of RNA modifications and their importance in cellular processes has led to a rise in epitranscriptomics research. “Epitranscriptomics brings together the concepts of epigenetics and gene expression,” explained Adrien Leger, PhD, Principal Research Scientist...
          04-22-2024, 07:01 AM

        ad_right_rmr

        Collapse

        News

        Collapse

        Topics Statistics Last Post
        Started by seqadmin, Today, 06:57 AM
        0 responses
        9 views
        0 likes
        Last Post seqadmin  
        Started by seqadmin, Yesterday, 07:17 AM
        0 responses
        14 views
        0 likes
        Last Post seqadmin  
        Started by seqadmin, 05-02-2024, 08:06 AM
        0 responses
        19 views
        0 likes
        Last Post seqadmin  
        Started by seqadmin, 04-30-2024, 12:17 PM
        0 responses
        23 views
        0 likes
        Last Post seqadmin  
        Working...
        X