changeset 1:f03b4da203d0 draft

planemo upload for repository https://github.com/BMCV/galaxy-image-analysis/tools/2d_feature_extraction/ commit e45ba62aae80d942bbf1cbf572bd9aec64297900
author imgteam
date Tue, 09 Jul 2019 08:35:50 -0400
parents 96909b9d1df1
children 6fdb3542a406
files 2d_feature_extraction.py 2d_feature_extraction.xml
diffstat 2 files changed, 4 insertions(+), 2 deletions(-) [+]
line wrap: on
line diff
--- a/2d_feature_extraction.py	Sat Feb 09 14:28:26 2019 -0500
+++ b/2d_feature_extraction.py	Tue Jul 09 08:35:50 2019 -0400
@@ -118,7 +118,9 @@
 if args.moments or args.all_features:
     df['moments'] = df['it'].map(lambda ait: regions[ait].moments)
 if args.convexity or args.all_features:
-    df['convexity'] = df.area/(df.perimeter*df.perimeter)
+    perimeter = df['it'].map(lambda ait: regions[ait].perimeter)
+    area = df['it'].map(lambda ait: regions[ait].area)
+    df['convexity'] = area/(perimeter*perimeter)
 
 del df['it']
 df.to_csv(out_file, sep='\t', line_terminator='\n', index=False)
--- a/2d_feature_extraction.xml	Sat Feb 09 14:28:26 2019 -0500
+++ b/2d_feature_extraction.xml	Tue Jul 09 08:35:50 2019 -0400
@@ -1,4 +1,4 @@
-<tool id="ip_2d_feature_extraction" name="2D Feature Extraction" version="0.0.8">
+<tool id="ip_2d_feature_extraction" name="2D Feature Extraction" version="0.0.9">
     <description>Feature Extraction</description>
     <requirements>
         <requirement type="package" version="0.23.4">pandas</requirement>