Mercurial > repos > imgteam > 2d_feature_extraction
diff 2d_feature_extraction.py @ 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 |
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)