Demo entry 6177763

py3cs

   

Submitted by anonymous on Oct 10, 2016 at 17:14
Language: Python. Code size: 282 Bytes.

import json  
  
j = json.load(open("disprot7.0.json"))  
  
d = {e['protein']['uniprot_accession']: e['protein']['sequence'] for e in j}  
  
with open('disprot7.0.fasta', 'w') as of:  
    for uac, seq in d.iteritems():  
        of.write('>{}\n{}\n'.format(uac, seq))  

This snippet took 0.00 seconds to highlight.

Back to the Entry List or Home.

Delete this entry (admin only).