Mercurial > repos > bgruening > protein_properties
view protein_properties.py @ 0:836fdda98fd1 draft
planemo upload for repository https://github.com/bgruening/galaxytools/tree/master/tools/protein_properties commit 4c7cdec2503b54d1726912fb04a5f796cd5d0bf1
author | bgruening |
---|---|
date | Fri, 13 May 2016 03:37:56 -0400 |
parents | |
children |
line wrap: on
line source
#!/usr/bin/env python import sys from Bio import SeqIO from Bio.SeqUtils.ProtParam import ProteinAnalysis sys.stdout.write("ID\tMW\tIP\tgravy\tlength\tinstability\tmonoisotpoic\tSequence\n") for record in SeqIO.parse(sys.stdin, "fasta"): a = ProteinAnalysis(str(record.seq)) properties = list() properties.append(record.id) properties.append(a.molecular_weight()) properties.append(a.isoelectric_point()) properties.append(a.gravy()) properties.append(a.length) properties.append(a.instability_index()) properties.append(a.aromaticity()) # always last column to make the output more readable properties.append(a.sequence) sys.stdout.write( '\t'.join(map(str, properties))+"\n" )