Previous changeset 2:8f76184ca03f (2024-04-04) |
Commit message:
planemo upload for repository https://github.com/BMCV/galaxy-image-analysis/tree/master/tools/2d_filter_segmentation_by_features/ commit c86a1b93cb7732f7331a981d13465653cc1a2790 |
modified:
2d_filter_segmentation_by_features.py 2d_filter_segmentation_by_features.xml |
b |
diff -r 8f76184ca03f -r 9d47aabda459 2d_filter_segmentation_by_features.py --- a/2d_filter_segmentation_by_features.py Thu Apr 04 15:23:28 2024 +0000 +++ b/2d_filter_segmentation_by_features.py Wed Apr 24 08:11:47 2024 +0000 |
[ |
@@ -1,6 +1,7 @@ import argparse import sys +import giatools.io import pandas as pd import skimage.io import skimage.util @@ -14,14 +15,14 @@ parser.add_argument('rule_file', type=argparse.FileType('r'), default=sys.stdin, help='file with rules per feature (cols: ,f1,2, rows: feature_name, min, max)') args = parser.parse_args() - img_in = skimage.io.imread(args.input_file.name) + img_in = giatools.io.imread(args.input_file.name) features = pd.read_csv(args.feature_file, delimiter="\t") rules = pd.read_csv(args.rule_file, delimiter="\t") cols = [a for a in rules.columns if 'Unnamed' not in a] for a_c in cols: - a_min = rules[rules.ix[:, 0] == 'min'][a_c] - a_max = rules[rules.ix[:, 0] == 'max'][a_c] + a_min = rules[rules.iloc[:, 0] == 'min'][a_c] + a_max = rules[rules.iloc[:, 0] == 'max'][a_c] for a_l in features.label: a_val = float(features[features['label'] == a_l][a_c]) if a_val < float(a_min) or a_val > float(a_max): |
b |
diff -r 8f76184ca03f -r 9d47aabda459 2d_filter_segmentation_by_features.xml --- a/2d_filter_segmentation_by_features.xml Thu Apr 04 15:23:28 2024 +0000 +++ b/2d_filter_segmentation_by_features.xml Wed Apr 24 08:11:47 2024 +0000 |
[ |
@@ -1,4 +1,4 @@ -<tool id="ip_2d_filter_segmentation_by_features" name="Filter label map by rules" version="0.0.1-3" profile="20.05"> +<tool id="ip_2d_filter_segmentation_by_features" name="Filter label map by rules" version="0.0.1-4" profile="20.05"> <description></description> <macros> <import>creators.xml</import> @@ -14,10 +14,10 @@ <xref type="bio.tools">galaxy_image_analysis</xref> </xrefs> <requirements> - <requirement type="package" version="0.14.2">scikit-image</requirement> - <requirement type="package" version="5.3.0">pillow</requirement> - <requirement type="package" version="0.23.4">pandas</requirement> - <requirement type="package" version="0.15.1">tifffile</requirement> + <requirement type="package" version="0.18.1">scikit-image</requirement> + <requirement type="package" version="2.2.2">pandas</requirement> + <requirement type="package" version="2020.10.1">tifffile</requirement> + <requirement type="package" version="0.1">giatools</requirement> </requirements> <command detect_errors="aggressive"><![CDATA[ |