annotate filter_multihit_paf.py @ 135:21bb464c1d53 draft default tip

planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/jbrowse2 commit 78bf7abb931bf3d348837c7211cd3cff32486691
author fubar
date Sun, 15 Dec 2024 23:47:40 +0000
parents 69c6ea16c148
children
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
131
69c6ea16c148 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/jbrowse2 commit 3cf9ec268c0719caf060b7d6bf5c0159909c348a
fubar
parents:
diff changeset
1 # idea from https://github.com/marbl/MashMap/blob/master/scripts/denovo_repeat_annotation.py
69c6ea16c148 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/jbrowse2 commit 3cf9ec268c0719caf060b7d6bf5c0159909c348a
fubar
parents:
diff changeset
2 # adds filter for more than minMatch denovo repeated paf read locations: >1 gives ~13%, >3 gives 3% of all hits in testing a big and small paf.
69c6ea16c148 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/jbrowse2 commit 3cf9ec268c0719caf060b7d6bf5c0159909c348a
fubar
parents:
diff changeset
3 # A haplotype paf filtered of denovo repeats might give cleaner dotplots, because they add visual noise and repeats are less informative for sequence similarity.
69c6ea16c148 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/jbrowse2 commit 3cf9ec268c0719caf060b7d6bf5c0159909c348a
fubar
parents:
diff changeset
4 # Alternative to use repeatmasked haplotype as the mashmap reference might also be useful.
69c6ea16c148 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/jbrowse2 commit 3cf9ec268c0719caf060b7d6bf5c0159909c348a
fubar
parents:
diff changeset
5 # Also outputs a bed with the multimatch regions filtered from the paf with their repeat count as the score
69c6ea16c148 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/jbrowse2 commit 3cf9ec268c0719caf060b7d6bf5c0159909c348a
fubar
parents:
diff changeset
6 # ross lazarus october 6 2024
69c6ea16c148 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/jbrowse2 commit 3cf9ec268c0719caf060b7d6bf5c0159909c348a
fubar
parents:
diff changeset
7
69c6ea16c148 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/jbrowse2 commit 3cf9ec268c0719caf060b7d6bf5c0159909c348a
fubar
parents:
diff changeset
8 import argparse
69c6ea16c148 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/jbrowse2 commit 3cf9ec268c0719caf060b7d6bf5c0159909c348a
fubar
parents:
diff changeset
9
69c6ea16c148 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/jbrowse2 commit 3cf9ec268c0719caf060b7d6bf5c0159909c348a
fubar
parents:
diff changeset
10 from collections import OrderedDict
69c6ea16c148 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/jbrowse2 commit 3cf9ec268c0719caf060b7d6bf5c0159909c348a
fubar
parents:
diff changeset
11
69c6ea16c148 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/jbrowse2 commit 3cf9ec268c0719caf060b7d6bf5c0159909c348a
fubar
parents:
diff changeset
12
69c6ea16c148 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/jbrowse2 commit 3cf9ec268c0719caf060b7d6bf5c0159909c348a
fubar
parents:
diff changeset
13 def pafDeDupe(inPaf, outDeNovoBed, outPaf, minMatch):
69c6ea16c148 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/jbrowse2 commit 3cf9ec268c0719caf060b7d6bf5c0159909c348a
fubar
parents:
diff changeset
14 """
69c6ea16c148 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/jbrowse2 commit 3cf9ec268c0719caf060b7d6bf5c0159909c348a
fubar
parents:
diff changeset
15 Usage notes:
69c6ea16c148 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/jbrowse2 commit 3cf9ec268c0719caf060b7d6bf5c0159909c348a
fubar
parents:
diff changeset
16 if a segment appears more than once on the left of a paf row, it can be considered a denovo repeat!
69c6ea16c148 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/jbrowse2 commit 3cf9ec268c0719caf060b7d6bf5c0159909c348a
fubar
parents:
diff changeset
17 Contig and start offset are used as the id so approximate-ish.
69c6ea16c148 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/jbrowse2 commit 3cf9ec268c0719caf060b7d6bf5c0159909c348a
fubar
parents:
diff changeset
18 Seems a consistent 13% 1+ denovo repeats with different levels of identity and match length
69c6ea16c148 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/jbrowse2 commit 3cf9ec268c0719caf060b7d6bf5c0159909c348a
fubar
parents:
diff changeset
19 3+ finds a much lower 3% of hits
69c6ea16c148 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/jbrowse2 commit 3cf9ec268c0719caf060b7d6bf5c0159909c348a
fubar
parents:
diff changeset
20
69c6ea16c148 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/jbrowse2 commit 3cf9ec268c0719caf060b7d6bf5c0159909c348a
fubar
parents:
diff changeset
21 With a 181217 row squirrelhaps1k.paf at 1k 99%, get about 13% denovo repeat rows
69c6ea16c148 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/jbrowse2 commit 3cf9ec268c0719caf060b7d6bf5c0159909c348a
fubar
parents:
diff changeset
22 (venv311) ross@pn50:~/rossgit/galaxytools/tools/jbrowse2$ python filter_multihit_paf.py --inpaf squirrelhaps1k.paf --outbed sh1k.bed --outpaf sh1kdedupe.paf --minMatch 1
69c6ea16c148 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/jbrowse2 commit 3cf9ec268c0719caf060b7d6bf5c0159909c348a
fubar
parents:
diff changeset
23 (venv311) ross@pn50:~/rossgit/galaxytools/tools/jbrowse2$ wc -l sh1kdedupe.paf
69c6ea16c148 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/jbrowse2 commit 3cf9ec268c0719caf060b7d6bf5c0159909c348a
fubar
parents:
diff changeset
24 109179 sh1kdedupe.paf
69c6ea16c148 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/jbrowse2 commit 3cf9ec268c0719caf060b7d6bf5c0159909c348a
fubar
parents:
diff changeset
25 (venv311) ross@pn50:~/rossgit/galaxytools/tools/jbrowse2$ wc -l sh1k.bed
69c6ea16c148 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/jbrowse2 commit 3cf9ec268c0719caf060b7d6bf5c0159909c348a
fubar
parents:
diff changeset
26 23015 sh1k.bed
69c6ea16c148 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/jbrowse2 commit 3cf9ec268c0719caf060b7d6bf5c0159909c348a
fubar
parents:
diff changeset
27
69c6ea16c148 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/jbrowse2 commit 3cf9ec268c0719caf060b7d6bf5c0159909c348a
fubar
parents:
diff changeset
28 venv311) ross@pn50:~/rossgit/galaxytools/tools/jbrowse2$ python filter_multihit_paf.py --inpaf squirrelhaps1k.paf --outbed sh1k.bed --outpaf sh1kdedupe.paf --minMatch 3
69c6ea16c148 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/jbrowse2 commit 3cf9ec268c0719caf060b7d6bf5c0159909c348a
fubar
parents:
diff changeset
29 (venv311) ross@pn50:~/rossgit/galaxytools/tools/jbrowse2$ wc -l sh1k.bed
69c6ea16c148 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/jbrowse2 commit 3cf9ec268c0719caf060b7d6bf5c0159909c348a
fubar
parents:
diff changeset
30 7996 sh1k.bed
69c6ea16c148 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/jbrowse2 commit 3cf9ec268c0719caf060b7d6bf5c0159909c348a
fubar
parents:
diff changeset
31
69c6ea16c148 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/jbrowse2 commit 3cf9ec268c0719caf060b7d6bf5c0159909c348a
fubar
parents:
diff changeset
32 with a smaller 26610 10k 95%, get about
69c6ea16c148 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/jbrowse2 commit 3cf9ec268c0719caf060b7d6bf5c0159909c348a
fubar
parents:
diff changeset
33 (venv3row 11) ross@pn50:~/rossgit/galaxytools/tools/jbrowse2$ wc -l squirrelhaps.paf
69c6ea16c148 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/jbrowse2 commit 3cf9ec268c0719caf060b7d6bf5c0159909c348a
fubar
parents:
diff changeset
34 26610 squirrelhaps.paf
69c6ea16c148 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/jbrowse2 commit 3cf9ec268c0719caf060b7d6bf5c0159909c348a
fubar
parents:
diff changeset
35 (venv311) ross@pn50:~/rossgit/galaxytools/tools/jbrowse2$ python filter_multihit_paf.py squirrelhaps.paf sh.bed shdedupe.paf
69c6ea16c148 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/jbrowse2 commit 3cf9ec268c0719caf060b7d6bf5c0159909c348a
fubar
parents:
diff changeset
36 (venv311) ross@pn50:~/rossgit/galaxytools/tools/jbrowse2$ wc -l shdedupe.paf
69c6ea16c148 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/jbrowse2 commit 3cf9ec268c0719caf060b7d6bf5c0159909c348a
fubar
parents:
diff changeset
37 18332 shdedupe.paf
69c6ea16c148 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/jbrowse2 commit 3cf9ec268c0719caf060b7d6bf5c0159909c348a
fubar
parents:
diff changeset
38 (venv311) ross@pn50:~/rossgit/galaxytools/tools/jbrowse2$ wc -l sh.bed
69c6ea16c148 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/jbrowse2 commit 3cf9ec268c0719caf060b7d6bf5c0159909c348a
fubar
parents:
diff changeset
39 3663 sh.bed
69c6ea16c148 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/jbrowse2 commit 3cf9ec268c0719caf060b7d6bf5c0159909c348a
fubar
parents:
diff changeset
40 """
69c6ea16c148 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/jbrowse2 commit 3cf9ec268c0719caf060b7d6bf5c0159909c348a
fubar
parents:
diff changeset
41
69c6ea16c148 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/jbrowse2 commit 3cf9ec268c0719caf060b7d6bf5c0159909c348a
fubar
parents:
diff changeset
42 CHROMOSOMECOL1 = 0
69c6ea16c148 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/jbrowse2 commit 3cf9ec268c0719caf060b7d6bf5c0159909c348a
fubar
parents:
diff changeset
43 STARTCOL1 = 2
69c6ea16c148 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/jbrowse2 commit 3cf9ec268c0719caf060b7d6bf5c0159909c348a
fubar
parents:
diff changeset
44 ENDCOL1 = 3
69c6ea16c148 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/jbrowse2 commit 3cf9ec268c0719caf060b7d6bf5c0159909c348a
fubar
parents:
diff changeset
45 hitTable1 = OrderedDict()
69c6ea16c148 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/jbrowse2 commit 3cf9ec268c0719caf060b7d6bf5c0159909c348a
fubar
parents:
diff changeset
46 hitTable1_lens = {}
69c6ea16c148 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/jbrowse2 commit 3cf9ec268c0719caf060b7d6bf5c0159909c348a
fubar
parents:
diff changeset
47 filterLen = minMatch
69c6ea16c148 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/jbrowse2 commit 3cf9ec268c0719caf060b7d6bf5c0159909c348a
fubar
parents:
diff changeset
48 minMatch = int(minMatch)
69c6ea16c148 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/jbrowse2 commit 3cf9ec268c0719caf060b7d6bf5c0159909c348a
fubar
parents:
diff changeset
49 filterMe = {}
69c6ea16c148 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/jbrowse2 commit 3cf9ec268c0719caf060b7d6bf5c0159909c348a
fubar
parents:
diff changeset
50
69c6ea16c148 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/jbrowse2 commit 3cf9ec268c0719caf060b7d6bf5c0159909c348a
fubar
parents:
diff changeset
51 with open(inPaf) as f:
69c6ea16c148 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/jbrowse2 commit 3cf9ec268c0719caf060b7d6bf5c0159909c348a
fubar
parents:
diff changeset
52 for i, line in enumerate(f):
69c6ea16c148 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/jbrowse2 commit 3cf9ec268c0719caf060b7d6bf5c0159909c348a
fubar
parents:
diff changeset
53 rowElements = line.split()
69c6ea16c148 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/jbrowse2 commit 3cf9ec268c0719caf060b7d6bf5c0159909c348a
fubar
parents:
diff changeset
54 chromosome1 = rowElements[CHROMOSOMECOL1]
69c6ea16c148 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/jbrowse2 commit 3cf9ec268c0719caf060b7d6bf5c0159909c348a
fubar
parents:
diff changeset
55 start1 = int(rowElements[STARTCOL1])
69c6ea16c148 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/jbrowse2 commit 3cf9ec268c0719caf060b7d6bf5c0159909c348a
fubar
parents:
diff changeset
56 end1 = int(rowElements[ENDCOL1])
69c6ea16c148 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/jbrowse2 commit 3cf9ec268c0719caf060b7d6bf5c0159909c348a
fubar
parents:
diff changeset
57 h1key = "%s~%d" % (chromosome1, start1)
69c6ea16c148 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/jbrowse2 commit 3cf9ec268c0719caf060b7d6bf5c0159909c348a
fubar
parents:
diff changeset
58 if hitTable1.get(h1key, None):
69c6ea16c148 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/jbrowse2 commit 3cf9ec268c0719caf060b7d6bf5c0159909c348a
fubar
parents:
diff changeset
59 hitTable1[h1key].append(i)
69c6ea16c148 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/jbrowse2 commit 3cf9ec268c0719caf060b7d6bf5c0159909c348a
fubar
parents:
diff changeset
60 if len(hitTable1[h1key]) > minMatch:
69c6ea16c148 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/jbrowse2 commit 3cf9ec268c0719caf060b7d6bf5c0159909c348a
fubar
parents:
diff changeset
61 filterMe[i] = i
69c6ea16c148 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/jbrowse2 commit 3cf9ec268c0719caf060b7d6bf5c0159909c348a
fubar
parents:
diff changeset
62 else:
69c6ea16c148 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/jbrowse2 commit 3cf9ec268c0719caf060b7d6bf5c0159909c348a
fubar
parents:
diff changeset
63 hitTable1[h1key] = [
69c6ea16c148 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/jbrowse2 commit 3cf9ec268c0719caf060b7d6bf5c0159909c348a
fubar
parents:
diff changeset
64 i,
69c6ea16c148 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/jbrowse2 commit 3cf9ec268c0719caf060b7d6bf5c0159909c348a
fubar
parents:
diff changeset
65 ]
69c6ea16c148 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/jbrowse2 commit 3cf9ec268c0719caf060b7d6bf5c0159909c348a
fubar
parents:
diff changeset
66 hitTable1_lens[h1key] = abs(end1 - start1)
69c6ea16c148 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/jbrowse2 commit 3cf9ec268c0719caf060b7d6bf5c0159909c348a
fubar
parents:
diff changeset
67 with open(outDeNovoBed, "w") as f:
69c6ea16c148 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/jbrowse2 commit 3cf9ec268c0719caf060b7d6bf5c0159909c348a
fubar
parents:
diff changeset
68 for k in hitTable1.keys():
69c6ea16c148 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/jbrowse2 commit 3cf9ec268c0719caf060b7d6bf5c0159909c348a
fubar
parents:
diff changeset
69 # OrderedDict so input paf order preserved - if that's wrong so is the bed.
69c6ea16c148 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/jbrowse2 commit 3cf9ec268c0719caf060b7d6bf5c0159909c348a
fubar
parents:
diff changeset
70 nk = len(hitTable1[k])
69c6ea16c148 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/jbrowse2 commit 3cf9ec268c0719caf060b7d6bf5c0159909c348a
fubar
parents:
diff changeset
71 if nk > minMatch:
69c6ea16c148 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/jbrowse2 commit 3cf9ec268c0719caf060b7d6bf5c0159909c348a
fubar
parents:
diff changeset
72 (chr, start) = k.split("~")
69c6ea16c148 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/jbrowse2 commit 3cf9ec268c0719caf060b7d6bf5c0159909c348a
fubar
parents:
diff changeset
73 end = int(start) + hitTable1_lens.get(k, 0)
69c6ea16c148 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/jbrowse2 commit 3cf9ec268c0719caf060b7d6bf5c0159909c348a
fubar
parents:
diff changeset
74 name= '_'.join([chr,start])
69c6ea16c148 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/jbrowse2 commit 3cf9ec268c0719caf060b7d6bf5c0159909c348a
fubar
parents:
diff changeset
75 row = (chr, start, "%d" % end, name, "%d" % nk)
69c6ea16c148 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/jbrowse2 commit 3cf9ec268c0719caf060b7d6bf5c0159909c348a
fubar
parents:
diff changeset
76 f.write("\t".join(row))
69c6ea16c148 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/jbrowse2 commit 3cf9ec268c0719caf060b7d6bf5c0159909c348a
fubar
parents:
diff changeset
77 f.write("\n")
69c6ea16c148 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/jbrowse2 commit 3cf9ec268c0719caf060b7d6bf5c0159909c348a
fubar
parents:
diff changeset
78 with open(outPaf, "w") as f:
69c6ea16c148 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/jbrowse2 commit 3cf9ec268c0719caf060b7d6bf5c0159909c348a
fubar
parents:
diff changeset
79 f.writelines(
69c6ea16c148 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/jbrowse2 commit 3cf9ec268c0719caf060b7d6bf5c0159909c348a
fubar
parents:
diff changeset
80 line for i, line in enumerate(open(inPaf)) if not filterMe.get(i, None)
69c6ea16c148 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/jbrowse2 commit 3cf9ec268c0719caf060b7d6bf5c0159909c348a
fubar
parents:
diff changeset
81 )
69c6ea16c148 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/jbrowse2 commit 3cf9ec268c0719caf060b7d6bf5c0159909c348a
fubar
parents:
diff changeset
82
69c6ea16c148 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/jbrowse2 commit 3cf9ec268c0719caf060b7d6bf5c0159909c348a
fubar
parents:
diff changeset
83
69c6ea16c148 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/jbrowse2 commit 3cf9ec268c0719caf060b7d6bf5c0159909c348a
fubar
parents:
diff changeset
84 if __name__ == "__main__":
69c6ea16c148 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/jbrowse2 commit 3cf9ec268c0719caf060b7d6bf5c0159909c348a
fubar
parents:
diff changeset
85 VERS = 0.01
69c6ea16c148 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/jbrowse2 commit 3cf9ec268c0719caf060b7d6bf5c0159909c348a
fubar
parents:
diff changeset
86 parser = argparse.ArgumentParser()
69c6ea16c148 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/jbrowse2 commit 3cf9ec268c0719caf060b7d6bf5c0159909c348a
fubar
parents:
diff changeset
87 a = parser.add_argument
69c6ea16c148 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/jbrowse2 commit 3cf9ec268c0719caf060b7d6bf5c0159909c348a
fubar
parents:
diff changeset
88 a("--inpaf", default=None)
69c6ea16c148 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/jbrowse2 commit 3cf9ec268c0719caf060b7d6bf5c0159909c348a
fubar
parents:
diff changeset
89 a("--outbed", default=None)
69c6ea16c148 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/jbrowse2 commit 3cf9ec268c0719caf060b7d6bf5c0159909c348a
fubar
parents:
diff changeset
90 a("--outpaf", default=None)
69c6ea16c148 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/jbrowse2 commit 3cf9ec268c0719caf060b7d6bf5c0159909c348a
fubar
parents:
diff changeset
91 a("--minmatch", default=1, type=int)
69c6ea16c148 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/jbrowse2 commit 3cf9ec268c0719caf060b7d6bf5c0159909c348a
fubar
parents:
diff changeset
92 a('--version', action='version', version='%(prog)s 0.1')
69c6ea16c148 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/jbrowse2 commit 3cf9ec268c0719caf060b7d6bf5c0159909c348a
fubar
parents:
diff changeset
93 args = parser.parse_args()
69c6ea16c148 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/jbrowse2 commit 3cf9ec268c0719caf060b7d6bf5c0159909c348a
fubar
parents:
diff changeset
94 pafDeDupe(args.inpaf, args.outbed, args.outpaf, args.minmatch)