changeset 3:10000414e916 draft

planemo upload commit 28919dd79f328dd09dae92661dc19ffa5757a765
author cpt
date Mon, 12 Aug 2024 04:23:34 +0000
parents 0dbc7fbad0ab
children 3e3b5ba626b9
files intersect_and_adjacent.py intersect_and_adjacent.xml
diffstat 2 files changed, 7 insertions(+), 5 deletions(-) [+]
line wrap: on
line diff
--- a/intersect_and_adjacent.py	Mon Aug 12 03:04:00 2024 +0000
+++ b/intersect_and_adjacent.py	Mon Aug 12 04:23:34 2024 +0000
@@ -268,14 +268,16 @@
         help="Allows features this far away to still be considered 'adjacent'",
     )
     parser.add_argument(
-        "-stranding",
-        action="store_true",
-        help="Only allow adjacency for same-strand features",
+        "stranding",
+        nargs="?",
+        default="",
+        help="Only allow adjacency for same-strand features if set to '-stranding'",
     )
     parser.add_argument("--oa", type=str, default="a_hits_near_b.gff")
     parser.add_argument("--ob", type=str, default="b_hits_near_a.gff")
     args = parser.parse_args()
 
+    stranding = args.stranding == "-stranding"
     b, a = intersect(args.a, args.b, args.window, args.stranding)
 
     with open(args.oa, "w") as handle:
--- a/intersect_and_adjacent.xml	Mon Aug 12 03:04:00 2024 +0000
+++ b/intersect_and_adjacent.xml	Mon Aug 12 04:23:34 2024 +0000
@@ -10,8 +10,8 @@
     python '$__tool_directory__/intersect_and_adjacent.py'
     '$gff3_data_a'
     '$gff3_data_b'
-    '$window'
-    '$stranding'
+    $window
+    $stranding
     --oa '$oa'
     --ob '$ob'
     ]]>