This is a test version of Biostars. For the public version, visit https://www.biostars.org.
extract the longest isoform from multi fasta file

Hi; I have a fasta file of transcript sequences and some of the transcripts are in multiple isoforms. I want to make a uniq list of the transcripts and choose the longest sequence where a transcript has several isoforms. Original:

PB.1.1|1:94-3818(+)|c14521/f1p1/240(240 is the sequence length)

AATGGGAGAAGGCTGGCATTGAACAAGACTATGTTAGTAGGATGTTGTTGAAGTATCCAT GGATTCTTTCAACGAGTGTGATAGAGAACTACAGTCAAATGCTGTTGTTTTTCAACCAAA AAAGGATTTCCAGTACAGTCCTCGCTATTGCTGTGAAAAGTTGGCCTCATATTCTTGGCT CCTCTTCAAAAAGAATGAATTCAGTTTTGGAGCTGTTTCATGTTCTGGGCATCAGTAAAA

PB.1.2|1:1699-3803(+)|c70289/f1p2/124(124 is the sequence length)

TTACAGTATTGAATTTGTTATGAAACCAAAGCTTGAGTTTCTGCTAAGAACCATGAAGAA GCCACTTAAAGCAGTTGTAGAATACCCAAGGTACTTCAGTTATTCACTCGAGGGGAAGATTTAC

ideal Unique isoform:

PB.1.1|1:94-3818(+)|c14521/f1p1/214 AATGGGAGAAGGCTGGCATTGAACAAGACTATGTTAGTAGGATGTTGTTGAAGTATCCAT GGATTCTTTCAACGAGTGTGATAGAGAACTACAGTCAAATGCTGTTGTTTTTCAACCAAA AAAGGATTTCCAGTACAGTCCTCGCTATTGCTGTGAAAAGTTGGCCTCATATTCTTGGCT CCTCTTCAAAAAGAATGAATTCAGTTTTGGAGCTGTTTCATGTTCTGGGCATCAGTAAAA

Have any awk scripts or tools to obtain the sequence,Thank you very much

Thanks

Alex

rna-seq

1 answer

Your problem looks like clustering problem. you want to cluster sequences if they are subset of each other and represent longest one. You can solve this using CD-HIT clustering program. here is the link http://weizhongli-lab.org/cd-hit/ to download software. If you don't want to install you can use web version as well.

~C.

There may not work well while use the cd-hit,have any methods to do it ?

Thanks

Alex

Log in to answer this question.