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?
Seqanswers Leaderboard Ad
Collapse
Announcement
Collapse
No announcement yet.
X
-
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=43749Grab 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.
-
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
-
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
-
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...-
Channel: Articles
04-22-2024, 07:01 AM -
-
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...-
Channel: Articles
04-04-2024, 04:25 PM -
ad_right_rmr
Collapse
News
Collapse
Topics | Statistics | Last Post | ||
---|---|---|---|---|
Started by seqadmin, Yesterday, 11:49 AM
|
0 responses
15 views
0 likes
|
Last Post
by seqadmin
Yesterday, 11:49 AM
|
||
Started by seqadmin, 04-24-2024, 08:47 AM
|
0 responses
16 views
0 likes
|
Last Post
by seqadmin
04-24-2024, 08:47 AM
|
||
Started by seqadmin, 04-11-2024, 12:08 PM
|
0 responses
62 views
0 likes
|
Last Post
by seqadmin
04-11-2024, 12:08 PM
|
||
Started by seqadmin, 04-10-2024, 10:19 PM
|
0 responses
60 views
0 likes
|
Last Post
by seqadmin
04-10-2024, 10:19 PM
|
Comment