Skip to content

Commit

Permalink
Fixes stranding arg
Browse files Browse the repository at this point in the history
Command line execution was getting empty string, causing failures

[#15]
  • Loading branch information
curtisim0 committed Aug 12, 2024
1 parent 48284d6 commit 28919dd
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 5 deletions.
8 changes: 5 additions & 3 deletions cpt_intersect_adj/intersect_and_adjacent.py
Original file line number Diff line number Diff line change
Expand Up @@ -268,14 +268,16 @@ def intersect(a, b, window, stranding):
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:
Expand Down
4 changes: 2 additions & 2 deletions cpt_intersect_adj/intersect_and_adjacent.xml
Original file line number Diff line number Diff line change
Expand Up @@ -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'
]]>
Expand Down

0 comments on commit 28919dd

Please sign in to comment.