Mercurial > repos > bgruening > protein_properties
changeset 0:cd211b8c2e51 draft default tip
planemo upload for repository https://github.com/bgruening/galaxytools/tree/master/tools/protein_properties commit 6767a5ffb02052c844e9d862c79912f998f39d8e
author | bgruening |
---|---|
date | Mon, 20 Nov 2017 05:09:21 -0500 |
parents | |
children | |
files | protein_properties.py protein_properties.xml test-data/Q9LHB9.fasta test-data/protein_properties_result1.tabular tool_dependencies.xml |
diffstat | 5 files changed, 84 insertions(+), 0 deletions(-) [+] |
line wrap: on
line diff
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/protein_properties.py Mon Nov 20 05:09:21 2017 -0500 @@ -0,0 +1,23 @@ +#!/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" ) +
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/protein_properties.xml Mon Nov 20 05:09:21 2017 -0500 @@ -0,0 +1,43 @@ +<tool id="bg_protein_properties" name="Calculate protein properties" version="0.1.0"> + <description></description> + <requirements> + <requirement type="package" version="1.65">biopython</requirement> + </requirements> + <command detect_errors="aggressive"><![CDATA[ + '$__tool_directory__/protein_properties.py' < '$input' > '$output' + ]]></command> + <inputs> + <param format="fasta" name="input" type="data" label="Protein sequence" + help="This should be in FASTA format." /> + </inputs> + <outputs> + <data format="tabular" name="output" /> + </outputs> + <tests> + <test> + <param name="input" value="Q9LHB9.fasta" ftype="fasta"/> + <output name="output" file="protein_properties_result1.tabular" ftype="tabular"/> + </test> + </tests> + <help><![CDATA[ + +**What it does** + +This tool will calculate several properties for each given input sequence. The result will contain the following columns: + +- ID of the sequence +- Molecular weight +- Isoelectric point +- *gravy* according to Kyte and Doolittle +- Length of the sequence +- Instability index, according to Guruprasad, 1990. (Any value above 40 means the protein is unstable (has a short half life)) +- Aromaticity, according to Lobry, 1994. (It is simply the relative frequency of Phe+Trp+Tyr) +- Sequence (as given in the input) + +For more information see the `BioPython ProteinAnalysis documentation <http://www.biopython.org/DIST/docs/api/Bio.SeqUtils.ProtParam.ProteinAnalysis-class.html>`_. + + ]]></help> + <citations> + <citation type="doi">10.1093/bioinformatics/btp163</citation> + </citations> +</tool>
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/test-data/Q9LHB9.fasta Mon Nov 20 05:09:21 2017 -0500 @@ -0,0 +1,9 @@ +>sp|Q9LHB9|PER32_ARATH Peroxidase 32 OS=Arabidopsis thaliana GN=PER32 PE=1 SV=3 +MNFSYSSLSTWTTLMTLGCLLLHSSISSAQLTPTFYDNTCPSVFTIVRDTIVNELRSDPR +IAASILRLHFHDCFVNGCDASILLDNTTSFRTEKDAAPNANSARGFPVIDRMKAAVETAC +PRTVSCADILTIAAQQAVNLAGGPSWRVPLGRRDSLQAFFALANTNLPAPFFTLPQLKAS +FQNVGLDRPSDLVALSGGHTFGKNQCQFIMDRLYNFSNTGLPDPTLNTTYLQTLRGQCPR +NGNQTVLVDFDLRTPTVFDNKYYVNLKELKGLIQTDQELFSSPNATDTIPLVREYADGTQ +KFFNAFVEAMNRMGNITPLTGTQGQIRQNCRVVNSNSLLHDVVEIVDFVSSM +>sp|Q9LHB9|PER32_ARATH short +MNFSYSSLSTWTTLMTLGCLLLHSSISSAQLTPTFYDNTCPSVFTIVRDTIVNELRSDPR
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/test-data/protein_properties_result1.tabular Mon Nov 20 05:09:21 2017 -0500 @@ -0,0 +1,3 @@ +ID MW IP gravy length instability monoisotpoic Sequence +sp|Q9LHB9|PER32_ARATH 38846.6361 6.20635986328 -0.0943181818182 352 31.0301420455 0.0880681818182 MNFSYSSLSTWTTLMTLGCLLLHSSISSAQLTPTFYDNTCPSVFTIVRDTIVNELRSDPRIAASILRLHFHDCFVNGCDASILLDNTTSFRTEKDAAPNANSARGFPVIDRMKAAVETACPRTVSCADILTIAAQQAVNLAGGPSWRVPLGRRDSLQAFFALANTNLPAPFFTLPQLKASFQNVGLDRPSDLVALSGGHTFGKNQCQFIMDRLYNFSNTGLPDPTLNTTYLQTLRGQCPRNGNQTVLVDFDLRTPTVFDNKYYVNLKELKGLIQTDQELFSSPNATDTIPLVREYADGTQKFFNAFVEAMNRMGNITPLTGTQGQIRQNCRVVNSNSLLHDVVEIVDFVSSM +sp|Q9LHB9|PER32_ARATH 6733.5899 5.41021728516 0.13 60 35.0618333333 0.1 MNFSYSSLSTWTTLMTLGCLLLHSSISSAQLTPTFYDNTCPSVFTIVRDTIVNELRSDPR
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/tool_dependencies.xml Mon Nov 20 05:09:21 2017 -0500 @@ -0,0 +1,6 @@ +<?xml version="1.0"?> +<tool_dependency> + <package name="biopython" version="1.65"> + <repository changeset_revision="d8185f5631ed" name="package_biopython_1_65" owner="biopython" toolshed="https://toolshed.g2.bx.psu.edu" /> + </package> +</tool_dependency>