changeset 3:984b342d03a6 draft default tip

planemo upload for repository https://github.com/BMCV/galaxy-image-analysis/tree/master/tools/imagecoordinates_flipaxis/ commit 2286a6c9da88596349ed9d967c51541409c0a7bf
author imgteam
date Mon, 13 Nov 2023 22:11:12 +0000
parents f8f1100d0701
children
files imagecoordinates_flipaxis.py imagecoordinates_flipaxis.xml
diffstat 2 files changed, 13 insertions(+), 8 deletions(-) [+]
line wrap: on
line diff
--- a/imagecoordinates_flipaxis.py	Wed Dec 18 05:02:25 2019 -0500
+++ b/imagecoordinates_flipaxis.py	Mon Nov 13 22:11:12 2023 +0000
@@ -1,17 +1,17 @@
 import argparse
+
 import pandas as pd
 
 
-def imagecoordinates_flipyaxis(input_file, output_file, image_height, offset=[0,0]): 
-    df = pd.read_csv(input_file, sep='\t') 
+def imagecoordinates_flipyaxis(input_file, output_file, image_height, offset=[0, 0]):
+    df = pd.read_csv(input_file, sep='\t')
 
-    x = df.copy().y # create copy instead of view
-    df.y = image_height-(df.x + 1) + offset[1] # since maximal y index = height-1 
+    x = df.copy().y  # create copy instead of view
+    df.y = image_height - (df.x + 1) + offset[1]  # since maximal y index = height-1
     df.x = x + offset[0]
     df.to_csv(output_file, sep="\t", index=False)
 
 
-
 if __name__ == "__main__":
     parser = argparse.ArgumentParser()
     parser.add_argument('input_file', type=argparse.FileType('r'), help='original file')
@@ -21,4 +21,3 @@
     parser.add_argument('offset_y', type=int, help='offset in y direction (height)', default=0)
     args = parser.parse_args()
     imagecoordinates_flipyaxis(args.input_file.name, args.out_file_str, args.image_height, [args.offset_x, args.offset_y])
-    # imagecoordinates_flipyaxis(args.input_file.name, args.out_file_str, int(args.image_height))
--- a/imagecoordinates_flipaxis.xml	Wed Dec 18 05:02:25 2019 -0500
+++ b/imagecoordinates_flipaxis.xml	Mon Nov 13 22:11:12 2023 +0000
@@ -1,5 +1,11 @@
-<tool id="imagecoordinates_flipaxis" name="Switch axis coordinates" version="0.1"> 
-  <description>Switches the axes of an image and flips the y axis.</description>
+<tool id="imagecoordinates_flipaxis" name="Switch axis coordinates" version="0.1-2"> 
+  <description></description>
+  <edam_operations>
+    <edam_operation>operation_3443</edam_operation>
+  </edam_operations>
+  <xrefs>
+    <xref type="bio.tools">galaxy_image_analysis</xref>
+  </xrefs>
   <requirements> 
         <requirement type="package" version="0.23.4" >pandas</requirement>
   </requirements>