annotate miranda_parser.py @ 3:ed25cd2323a7 draft default tip

planemo upload for repository https://github.com/TGAC/earlham-galaxytools/tree/main/tools/miranda commit 457bb20f9c1c007b42d79b08527f5c558529ab8a-dirty
author earlhaminst
date Mon, 24 Feb 2025 17:08:56 +0000
parents 05bc31ccc323
children
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
0
05bc31ccc323 planemo upload for repository https://github.com/TGAC/earlham-galaxytools/tree/master/tools/miranda commit e24b91d3051c422ee2a20caf8bb12f0896e2c84a-dirty
earlhaminst
parents:
diff changeset
1 import sys
05bc31ccc323 planemo upload for repository https://github.com/TGAC/earlham-galaxytools/tree/master/tools/miranda commit e24b91d3051c422ee2a20caf8bb12f0896e2c84a-dirty
earlhaminst
parents:
diff changeset
2
05bc31ccc323 planemo upload for repository https://github.com/TGAC/earlham-galaxytools/tree/master/tools/miranda commit e24b91d3051c422ee2a20caf8bb12f0896e2c84a-dirty
earlhaminst
parents:
diff changeset
3 # get hits from miranda scans
05bc31ccc323 planemo upload for repository https://github.com/TGAC/earlham-galaxytools/tree/master/tools/miranda commit e24b91d3051c422ee2a20caf8bb12f0896e2c84a-dirty
earlhaminst
parents:
diff changeset
4 with open(sys.argv[1]) as infile1:
05bc31ccc323 planemo upload for repository https://github.com/TGAC/earlham-galaxytools/tree/master/tools/miranda commit e24b91d3051c422ee2a20caf8bb12f0896e2c84a-dirty
earlhaminst
parents:
diff changeset
5 with open(sys.argv[2], "w") as outfile:
05bc31ccc323 planemo upload for repository https://github.com/TGAC/earlham-galaxytools/tree/master/tools/miranda commit e24b91d3051c422ee2a20caf8bb12f0896e2c84a-dirty
earlhaminst
parents:
diff changeset
6 for line1 in infile1:
05bc31ccc323 planemo upload for repository https://github.com/TGAC/earlham-galaxytools/tree/master/tools/miranda commit e24b91d3051c422ee2a20caf8bb12f0896e2c84a-dirty
earlhaminst
parents:
diff changeset
7 if "%" in line1 and "Forward:" not in line1:
05bc31ccc323 planemo upload for repository https://github.com/TGAC/earlham-galaxytools/tree/master/tools/miranda commit e24b91d3051c422ee2a20caf8bb12f0896e2c84a-dirty
earlhaminst
parents:
diff changeset
8 outfile.write(line1)