diff intersect_and_adjacent.py @ 3:10000414e916 draft

planemo upload commit 28919dd79f328dd09dae92661dc19ffa5757a765
author cpt
date Mon, 12 Aug 2024 04:23:34 +0000
parents 923d2528480d
children 3e3b5ba626b9
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: