How to parse a dat file into FASTA format?
2
0
Entering edit mode
3.8 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 • 3.4k 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
3.8 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
4 days 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/perl
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
0
Entering edit mode
#!usr/bin/perl
from Bio import SeqIO

Why are you referencing perl in a python program shebang line? Please edit and correct.

ADD REPLY

Login before adding your answer.

Traffic: 2169 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