How to parse a dat file into FASTA format?
2
0
Entering edit mode
6.7 years ago
yuevine • 0

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

biopython dat file FASTA UniProt • 5.9k views
ADD COMMENT
0
Entering edit mode

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

ADD REPLY
1
Entering edit mode
6.7 years ago

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

ADD COMMENT
0
Entering edit mode
2.9 years ago

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)
ADD COMMENT

Login before adding your answer.

Traffic: 2553 users visited in the last hour
Help About
FAQ
Access RSS
API
Stats

Use of this site constitutes acceptance of our User Agreement and Privacy Policy.

Powered by the version 2.3.6