This is a test version of Biostars. For the public version, visit https://www.biostars.org.
How to make .fasta file

I have downloaded something that looks like a fasta file that from UTRdb 2.0 (http://utrdb.cloud.ba.infn.it/utrdb/). Upon closer look, it is not recognized as a fasta file. I am wondering how to convert the file into fasta. I have attached the file in the link below. Some help please.

https://www.dropbox.com/scl/fi/uuv2tssoxnaeih2vvzqjq/Glossina_fuscipes.Yale_Gfus_2.54.utrs.gz?rlkey=cv02l92iqtypj1t3iez7wlhez&dl=0

Thanks for the help.

fasta utrdb

2 answers

Seems like the file is fasta but has some comments at start of the file like

#genome-build: ASM210954v1
#genome-version: ASM210954v1
#genome-date: 2017-04
#genome-build-accession: GCA_002109545.1
#genebuild-last-updated: 2020-03
>|five_prime_utr|ENSAPOT00000006813|ENSAPOG00000008320|61446_61655_+_MVNR01001590.1
GTTTCAGGACAACGATGCGGAGAATGGCGATAAAATAACACACAAAACTTTGGAAACCCC
CAAAGACATCTACCCCATTCATGTTGTTCCAGAAAATAAAGAGAGGACACAGGGATCATG
TGCCCACTTTAAGGAGAGGAAAGACGTCACAAAGCAGGTCCGCTCCAAGTCCCCCACACT
GTTGGTCAACTTGGAGGAGGCCTTGGAAAG

you can try removing them by

grep -v ^"#" input-file.utrs > output-file.utrs/fasta

output-file.utrs/fasta

Did you mean to say output-file.utrs.fasta?

i meant about the extention. either .utrs or .fasta

I think the output can still be either file.utrs.fasta or just file.fasta.

Let me try get rid of them and see what happens.

This worked very well, thank you.

Your file is a gzipped archive. You must first unpack it with gunzip:

gunzip Glossina_fuscipes.Yale_Gfus_2.54.utrs.gz

That will make a file Glossina_fuscipes.Yale_Gfus_2.54.utrs with your UTRs in FASTA format.

Had done this before and have repeated again but it still does not come up as fasta file but just like any other normal file with fasta file features.

Log in to answer this question.