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?
Unconfigured Ad
Collapse
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 kinpict.comThe part about this topic feels surprisingly grounded, and the details on the page is the bit that made me slow down. I’d keep <a href="https://kinpict.com/">ai family photo generator</a> bookmarked for later.
-
Channel: Articles
Today, 06:37 PM -
-
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,...-
Channel: Articles
10-30-2026, 06:46 AM -
ad_right_rmr
Collapse
News
Collapse
| Topics | Statistics | Last Post | ||
|---|---|---|---|---|
|
Started by SEQadmin2, 11-12-2026, 07:59 AM
|
0 responses
27 views
0 reactions
|
Last Post
by SEQadmin2
11-12-2026, 07:59 AM
|
||
|
Started by SEQadmin2, 11-05-2026, 09:25 AM
|
0 responses
35 views
0 reactions
|
Last Post
by SEQadmin2
11-05-2026, 09:25 AM
|
||
|
Started by SEQadmin2, 11-03-2026, 11:54 AM
|
2 responses
56 views
0 reactions
|
Last Post
by kinpict.com
Today, 06:49 PM
|
||
|
Genome Sequencing Reveals Large, Repeat-Rich DNA in Trapdoor Spider Named for Stephen Colbert
by SEQadmin2
Started by SEQadmin2, 10-28-2026, 09:57 AM
|
0 responses
175 views
0 reactions
|
Last Post
by SEQadmin2
10-28-2026, 09:57 AM
|
Comment