Convert XML file to FASTA
1
0
Entering edit mode
6.9 years ago
Tye Kahn ▴ 20

Hi everyone,

I have downloaded polypeptide data which format is called Chado XML. As I opened it, it seems quite a new format in comparison to other formats, so I would like to know if there's any way to convert to FASTA, as it is the format needed as input.

I really appreciate any help you can provide.

CHADO-XML conversion flybase polypeptides • 4.7k views
ADD COMMENT
0
Entering edit mode

According to this wiki page, there's a way to convert TO Chado XML using bioperl, maybe it can be used the other way around as well?

BioPerl has a write-adapter for Chado-XML, Bio::SeqIO::chadoxml. This means that any file format which Bioperl can pass can be exported to Chado-XML.

If you are not familiar with the bioperl SeqIO system, you can do it on the command line, like this:

bp_seqconvert --from genbank --to chadoxml < NT_021877.gbk

ADD REPLY
0
Entering edit mode

Yes, unfortunately, it seems that it only works the other way around, obtaining XML files instead of getting rid of them.

ADD REPLY
1
Entering edit mode
6.9 years ago

write a SAX or Stax parser to extract the data

        <name>CG9570-PA</name>
        <timelastmodified>2004-06-05 04:27:57</timelastmodified>
        <residues>MTCTLVLLIASVLHFRMRGSCLLDIERFPVIPGTIYAGHIAYCAILYFLHDLEILPTRYRSRMGWLTTFLIELVLGVAFMEVLALWLW
CSVEHILHLSTQFVLRRYLGVSTEVYQRWEWAIMGGLMTTLAAMLWINAFEATETTKAERVSKDVKDIRMKAVLCQREEKQKQDHDLEKIEQPAPEPEESQNPDEVQLPENHLK
LLATTTDC</residues>
        <is_obsolete>0</is_obsolete>
        <uniquename>FBpp0070001</uniquename>
        <seqlen>210</seqlen>
        <md5checksum>54d605138ac28e802cdf493751b71b17</md5checksum>
ADD COMMENT
0
Entering edit mode

Thanks for your early answer. Are these parsers usually written in java? My programming languages only comprise Perl, Python, R, bash and MySQL. Even so, I'll see if I can work on it.

ADD REPLY
0
Entering edit mode

In the end I found a site in the same database where the data is included in the desired format, so I didn't need to perform it. Anyway, thanks for your help.

ADD REPLY

Login before adding your answer.

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