How to parse a dat file into FASTA format?
I downloaded the dat files from Uniprot taxonomic division and I need to use them in FASTA format. Is it complicated to convert or parse dat files into FASTA? Does anyone can know how to do it? Thanks. T_T
• 6,872 views
•
link
2 answers
I recommend that you have a look at these threads and the answers I gave there:
How to makeblastdb Uniprot's Taxonomic Divisions? A: How to makeblastdb Uniprot's Taxonomic Divisions?
Converting Uniprot File to a Fasta File in Perl A: Converting Uniprot File to a Fasta File in Perl
• 0 views
•
link
install biopython then
make the following python script dat2fasta.py file and run the script using python dat2fasta.py
script dat2fasta.py
#!/usr/bin/env python
from Bio import SeqIO
records = SeqIO.parse("uniprot_trembl_mammals.dat", "swiss")
count = SeqIO.write(records, "uniprot_trembl_mammals.fasta", "fasta")
print("Converted %i records" % count)
• 0 views
•
link
Log in to answer this question.
It is not really clear what kind of data you have downloaded.
See these posts in any case:
How To Download Swiss-Prot .Dat File From Uniprot
Parsing uniprot .dat files
See this site as well:
https://omics.pnl.gov/software/uniprot-dat-file-parser