Mercurial > repos > fubar > microsatbed
annotate find_str.py @ 25:8d0b8a75350f draft
planemo upload for repository https://github.com/fubar2/microsatbed commit d952bc313f408735456747c3d33e09a3170c8f59-dirty
author | fubar |
---|---|
date | Fri, 19 Jul 2024 06:41:18 +0000 |
parents | 94c5f834c0cc |
children | 26e9575c2c83 |
rev | line source |
---|---|
1
1085e094cf5f
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/microsatbed commit 7ceb6658309a7ababe622b5d92e729e5470e22f0-dirty
fubar
parents:
diff
changeset
|
1 import argparse |
20
410144c7b2d6
planemo upload for repository https://github.com/fubar2/microsatbed commit d952bc313f408735456747c3d33e09a3170c8f59-dirty
fubar
parents:
19
diff
changeset
|
2 import shutil |
410144c7b2d6
planemo upload for repository https://github.com/fubar2/microsatbed commit d952bc313f408735456747c3d33e09a3170c8f59-dirty
fubar
parents:
19
diff
changeset
|
3 |
410144c7b2d6
planemo upload for repository https://github.com/fubar2/microsatbed commit d952bc313f408735456747c3d33e09a3170c8f59-dirty
fubar
parents:
19
diff
changeset
|
4 import pybigtools |
1
1085e094cf5f
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/microsatbed commit 7ceb6658309a7ababe622b5d92e729e5470e22f0-dirty
fubar
parents:
diff
changeset
|
5 import pytrf # 1.3.0 |
1085e094cf5f
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/microsatbed commit 7ceb6658309a7ababe622b5d92e729e5470e22f0-dirty
fubar
parents:
diff
changeset
|
6 from pyfastx import Fastx # 0.5.2 |
1085e094cf5f
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/microsatbed commit 7ceb6658309a7ababe622b5d92e729e5470e22f0-dirty
fubar
parents:
diff
changeset
|
7 |
1085e094cf5f
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/microsatbed commit 7ceb6658309a7ababe622b5d92e729e5470e22f0-dirty
fubar
parents:
diff
changeset
|
8 """ |
1085e094cf5f
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/microsatbed commit 7ceb6658309a7ababe622b5d92e729e5470e22f0-dirty
fubar
parents:
diff
changeset
|
9 Allows all STR or those for a subset of motifs to be written to a bed file |
1085e094cf5f
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/microsatbed commit 7ceb6658309a7ababe622b5d92e729e5470e22f0-dirty
fubar
parents:
diff
changeset
|
10 Designed to build some of the microsatellite tracks from https://github.com/arangrhie/T2T-Polish/tree/master/pattern for the VGP. |
1085e094cf5f
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/microsatbed commit 7ceb6658309a7ababe622b5d92e729e5470e22f0-dirty
fubar
parents:
diff
changeset
|
11 """ |
1085e094cf5f
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/microsatbed commit 7ceb6658309a7ababe622b5d92e729e5470e22f0-dirty
fubar
parents:
diff
changeset
|
12 |
24
94c5f834c0cc
planemo upload for repository https://github.com/fubar2/microsatbed commit d952bc313f408735456747c3d33e09a3170c8f59-dirty
fubar
parents:
23
diff
changeset
|
13 |
23
45f690db0eaf
planemo upload for repository https://github.com/fubar2/microsatbed commit d952bc313f408735456747c3d33e09a3170c8f59-dirty
fubar
parents:
20
diff
changeset
|
14 def getDensity(name, bed, chrlen, winwidth): |
24
94c5f834c0cc
planemo upload for repository https://github.com/fubar2/microsatbed commit d952bc313f408735456747c3d33e09a3170c8f59-dirty
fubar
parents:
23
diff
changeset
|
15 nwin = int(chrlen / winwidth) |
94c5f834c0cc
planemo upload for repository https://github.com/fubar2/microsatbed commit d952bc313f408735456747c3d33e09a3170c8f59-dirty
fubar
parents:
23
diff
changeset
|
16 d = [0.0 for x in range(nwin + 1)] |
20
410144c7b2d6
planemo upload for repository https://github.com/fubar2/microsatbed commit d952bc313f408735456747c3d33e09a3170c8f59-dirty
fubar
parents:
19
diff
changeset
|
17 for b in bed: |
410144c7b2d6
planemo upload for repository https://github.com/fubar2/microsatbed commit d952bc313f408735456747c3d33e09a3170c8f59-dirty
fubar
parents:
19
diff
changeset
|
18 nt = b[5] |
24
94c5f834c0cc
planemo upload for repository https://github.com/fubar2/microsatbed commit d952bc313f408735456747c3d33e09a3170c8f59-dirty
fubar
parents:
23
diff
changeset
|
19 bin = int(b[1] / winwidth) |
20
410144c7b2d6
planemo upload for repository https://github.com/fubar2/microsatbed commit d952bc313f408735456747c3d33e09a3170c8f59-dirty
fubar
parents:
19
diff
changeset
|
20 d[bin] += nt |
24
94c5f834c0cc
planemo upload for repository https://github.com/fubar2/microsatbed commit d952bc313f408735456747c3d33e09a3170c8f59-dirty
fubar
parents:
23
diff
changeset
|
21 dw = [ |
94c5f834c0cc
planemo upload for repository https://github.com/fubar2/microsatbed commit d952bc313f408735456747c3d33e09a3170c8f59-dirty
fubar
parents:
23
diff
changeset
|
22 (name, (x * winwidth)+1, (x + 1) * winwidth, float(d[x])) |
94c5f834c0cc
planemo upload for repository https://github.com/fubar2/microsatbed commit d952bc313f408735456747c3d33e09a3170c8f59-dirty
fubar
parents:
23
diff
changeset
|
23 for x in range(nwin + 1) |
25
8d0b8a75350f
planemo upload for repository https://github.com/fubar2/microsatbed commit d952bc313f408735456747c3d33e09a3170c8f59-dirty
fubar
parents:
24
diff
changeset
|
24 if (x + 1) * winwidth <= chrlen - 1 |
24
94c5f834c0cc
planemo upload for repository https://github.com/fubar2/microsatbed commit d952bc313f408735456747c3d33e09a3170c8f59-dirty
fubar
parents:
23
diff
changeset
|
25 ] |
20
410144c7b2d6
planemo upload for repository https://github.com/fubar2/microsatbed commit d952bc313f408735456747c3d33e09a3170c8f59-dirty
fubar
parents:
19
diff
changeset
|
26 return dw |
1
1085e094cf5f
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/microsatbed commit 7ceb6658309a7ababe622b5d92e729e5470e22f0-dirty
fubar
parents:
diff
changeset
|
27 |
24
94c5f834c0cc
planemo upload for repository https://github.com/fubar2/microsatbed commit d952bc313f408735456747c3d33e09a3170c8f59-dirty
fubar
parents:
23
diff
changeset
|
28 |
1
1085e094cf5f
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/microsatbed commit 7ceb6658309a7ababe622b5d92e729e5470e22f0-dirty
fubar
parents:
diff
changeset
|
29 def write_ssrs(args): |
1085e094cf5f
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/microsatbed commit 7ceb6658309a7ababe622b5d92e729e5470e22f0-dirty
fubar
parents:
diff
changeset
|
30 """ |
1085e094cf5f
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/microsatbed commit 7ceb6658309a7ababe622b5d92e729e5470e22f0-dirty
fubar
parents:
diff
changeset
|
31 The integers in the call change the minimum repeats for mono-, di-, tri-, tetra-, penta-, hexa-nucleotide repeats |
1085e094cf5f
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/microsatbed commit 7ceb6658309a7ababe622b5d92e729e5470e22f0-dirty
fubar
parents:
diff
changeset
|
32 ssrs = pytrf.STRFinder(name, seq, 10, 6, 4, 3, 3, 3) |
1085e094cf5f
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/microsatbed commit 7ceb6658309a7ababe622b5d92e729e5470e22f0-dirty
fubar
parents:
diff
changeset
|
33 NOTE: Dinucleotides GA and AG are reported separately by https://github.com/marbl/seqrequester. |
1085e094cf5f
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/microsatbed commit 7ceb6658309a7ababe622b5d92e729e5470e22f0-dirty
fubar
parents:
diff
changeset
|
34 The reversed pair STRs are about as common in the documentation sample. |
1085e094cf5f
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/microsatbed commit 7ceb6658309a7ababe622b5d92e729e5470e22f0-dirty
fubar
parents:
diff
changeset
|
35 Sequence read bias might be influenced by GC density or some other specific motif. |
1085e094cf5f
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/microsatbed commit 7ceb6658309a7ababe622b5d92e729e5470e22f0-dirty
fubar
parents:
diff
changeset
|
36 """ |
1085e094cf5f
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/microsatbed commit 7ceb6658309a7ababe622b5d92e729e5470e22f0-dirty
fubar
parents:
diff
changeset
|
37 bed = [] |
20
410144c7b2d6
planemo upload for repository https://github.com/fubar2/microsatbed commit d952bc313f408735456747c3d33e09a3170c8f59-dirty
fubar
parents:
19
diff
changeset
|
38 wig = [] |
410144c7b2d6
planemo upload for repository https://github.com/fubar2/microsatbed commit d952bc313f408735456747c3d33e09a3170c8f59-dirty
fubar
parents:
19
diff
changeset
|
39 chrlens = {} |
1
1085e094cf5f
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/microsatbed commit 7ceb6658309a7ababe622b5d92e729e5470e22f0-dirty
fubar
parents:
diff
changeset
|
40 specific = None |
1085e094cf5f
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/microsatbed commit 7ceb6658309a7ababe622b5d92e729e5470e22f0-dirty
fubar
parents:
diff
changeset
|
41 if args.specific: |
1085e094cf5f
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/microsatbed commit 7ceb6658309a7ababe622b5d92e729e5470e22f0-dirty
fubar
parents:
diff
changeset
|
42 specific = args.specific.upper().split(",") |
1085e094cf5f
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/microsatbed commit 7ceb6658309a7ababe622b5d92e729e5470e22f0-dirty
fubar
parents:
diff
changeset
|
43 fa = Fastx(args.fasta, uppercase=True) |
1085e094cf5f
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/microsatbed commit 7ceb6658309a7ababe622b5d92e729e5470e22f0-dirty
fubar
parents:
diff
changeset
|
44 for name, seq in fa: |
25
8d0b8a75350f
planemo upload for repository https://github.com/fubar2/microsatbed commit d952bc313f408735456747c3d33e09a3170c8f59-dirty
fubar
parents:
24
diff
changeset
|
45 chrlen = len(seq) |
8d0b8a75350f
planemo upload for repository https://github.com/fubar2/microsatbed commit d952bc313f408735456747c3d33e09a3170c8f59-dirty
fubar
parents:
24
diff
changeset
|
46 chrlens[name] = chrlen |
20
410144c7b2d6
planemo upload for repository https://github.com/fubar2/microsatbed commit d952bc313f408735456747c3d33e09a3170c8f59-dirty
fubar
parents:
19
diff
changeset
|
47 cbed = [] |
19
db5523378e5c
planemo upload for repository https://github.com/fubar2/microsatbed commit d952bc313f408735456747c3d33e09a3170c8f59-dirty
fubar
parents:
17
diff
changeset
|
48 for ssr in pytrf.STRFinder( |
24
94c5f834c0cc
planemo upload for repository https://github.com/fubar2/microsatbed commit d952bc313f408735456747c3d33e09a3170c8f59-dirty
fubar
parents:
23
diff
changeset
|
49 name, |
94c5f834c0cc
planemo upload for repository https://github.com/fubar2/microsatbed commit d952bc313f408735456747c3d33e09a3170c8f59-dirty
fubar
parents:
23
diff
changeset
|
50 seq, |
94c5f834c0cc
planemo upload for repository https://github.com/fubar2/microsatbed commit d952bc313f408735456747c3d33e09a3170c8f59-dirty
fubar
parents:
23
diff
changeset
|
51 args.monomin, |
94c5f834c0cc
planemo upload for repository https://github.com/fubar2/microsatbed commit d952bc313f408735456747c3d33e09a3170c8f59-dirty
fubar
parents:
23
diff
changeset
|
52 args.dimin, |
94c5f834c0cc
planemo upload for repository https://github.com/fubar2/microsatbed commit d952bc313f408735456747c3d33e09a3170c8f59-dirty
fubar
parents:
23
diff
changeset
|
53 args.trimin, |
94c5f834c0cc
planemo upload for repository https://github.com/fubar2/microsatbed commit d952bc313f408735456747c3d33e09a3170c8f59-dirty
fubar
parents:
23
diff
changeset
|
54 args.tetramin, |
94c5f834c0cc
planemo upload for repository https://github.com/fubar2/microsatbed commit d952bc313f408735456747c3d33e09a3170c8f59-dirty
fubar
parents:
23
diff
changeset
|
55 args.pentamin, |
94c5f834c0cc
planemo upload for repository https://github.com/fubar2/microsatbed commit d952bc313f408735456747c3d33e09a3170c8f59-dirty
fubar
parents:
23
diff
changeset
|
56 args.hexamin, |
94c5f834c0cc
planemo upload for repository https://github.com/fubar2/microsatbed commit d952bc313f408735456747c3d33e09a3170c8f59-dirty
fubar
parents:
23
diff
changeset
|
57 ): |
1
1085e094cf5f
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/microsatbed commit 7ceb6658309a7ababe622b5d92e729e5470e22f0-dirty
fubar
parents:
diff
changeset
|
58 row = ( |
1085e094cf5f
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/microsatbed commit 7ceb6658309a7ababe622b5d92e729e5470e22f0-dirty
fubar
parents:
diff
changeset
|
59 ssr.chrom, |
19
db5523378e5c
planemo upload for repository https://github.com/fubar2/microsatbed commit d952bc313f408735456747c3d33e09a3170c8f59-dirty
fubar
parents:
17
diff
changeset
|
60 ssr.start, |
1
1085e094cf5f
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/microsatbed commit 7ceb6658309a7ababe622b5d92e729e5470e22f0-dirty
fubar
parents:
diff
changeset
|
61 ssr.end, |
1085e094cf5f
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/microsatbed commit 7ceb6658309a7ababe622b5d92e729e5470e22f0-dirty
fubar
parents:
diff
changeset
|
62 ssr.motif, |
1085e094cf5f
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/microsatbed commit 7ceb6658309a7ababe622b5d92e729e5470e22f0-dirty
fubar
parents:
diff
changeset
|
63 ssr.repeat, |
1085e094cf5f
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/microsatbed commit 7ceb6658309a7ababe622b5d92e729e5470e22f0-dirty
fubar
parents:
diff
changeset
|
64 ssr.length, |
1085e094cf5f
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/microsatbed commit 7ceb6658309a7ababe622b5d92e729e5470e22f0-dirty
fubar
parents:
diff
changeset
|
65 ) |
1085e094cf5f
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/microsatbed commit 7ceb6658309a7ababe622b5d92e729e5470e22f0-dirty
fubar
parents:
diff
changeset
|
66 # pytrf reports a 1 based start position so start-1 fixes the bed interval lengths |
19
db5523378e5c
planemo upload for repository https://github.com/fubar2/microsatbed commit d952bc313f408735456747c3d33e09a3170c8f59-dirty
fubar
parents:
17
diff
changeset
|
67 if args.specific and ssr.motif in specific: |
20
410144c7b2d6
planemo upload for repository https://github.com/fubar2/microsatbed commit d952bc313f408735456747c3d33e09a3170c8f59-dirty
fubar
parents:
19
diff
changeset
|
68 cbed.append(row) |
1
1085e094cf5f
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/microsatbed commit 7ceb6658309a7ababe622b5d92e729e5470e22f0-dirty
fubar
parents:
diff
changeset
|
69 elif args.mono and len(ssr.motif) == 1: |
20
410144c7b2d6
planemo upload for repository https://github.com/fubar2/microsatbed commit d952bc313f408735456747c3d33e09a3170c8f59-dirty
fubar
parents:
19
diff
changeset
|
70 cbed.append(row) |
1
1085e094cf5f
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/microsatbed commit 7ceb6658309a7ababe622b5d92e729e5470e22f0-dirty
fubar
parents:
diff
changeset
|
71 elif args.di and len(ssr.motif) == 2: |
20
410144c7b2d6
planemo upload for repository https://github.com/fubar2/microsatbed commit d952bc313f408735456747c3d33e09a3170c8f59-dirty
fubar
parents:
19
diff
changeset
|
72 cbed.append(row) |
1
1085e094cf5f
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/microsatbed commit 7ceb6658309a7ababe622b5d92e729e5470e22f0-dirty
fubar
parents:
diff
changeset
|
73 elif args.tri and len(ssr.motif) == 3: |
20
410144c7b2d6
planemo upload for repository https://github.com/fubar2/microsatbed commit d952bc313f408735456747c3d33e09a3170c8f59-dirty
fubar
parents:
19
diff
changeset
|
74 cbed.append(row) |
1
1085e094cf5f
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/microsatbed commit 7ceb6658309a7ababe622b5d92e729e5470e22f0-dirty
fubar
parents:
diff
changeset
|
75 elif args.tetra and len(ssr.motif) == 4: |
20
410144c7b2d6
planemo upload for repository https://github.com/fubar2/microsatbed commit d952bc313f408735456747c3d33e09a3170c8f59-dirty
fubar
parents:
19
diff
changeset
|
76 cbed.append(row) |
1
1085e094cf5f
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/microsatbed commit 7ceb6658309a7ababe622b5d92e729e5470e22f0-dirty
fubar
parents:
diff
changeset
|
77 elif args.penta and len(ssr.motif) == 5: |
20
410144c7b2d6
planemo upload for repository https://github.com/fubar2/microsatbed commit d952bc313f408735456747c3d33e09a3170c8f59-dirty
fubar
parents:
19
diff
changeset
|
78 cbed.append(row) |
1
1085e094cf5f
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/microsatbed commit 7ceb6658309a7ababe622b5d92e729e5470e22f0-dirty
fubar
parents:
diff
changeset
|
79 elif args.hexa and len(ssr.motif) == 6: |
20
410144c7b2d6
planemo upload for repository https://github.com/fubar2/microsatbed commit d952bc313f408735456747c3d33e09a3170c8f59-dirty
fubar
parents:
19
diff
changeset
|
80 cbed.append(row) |
410144c7b2d6
planemo upload for repository https://github.com/fubar2/microsatbed commit d952bc313f408735456747c3d33e09a3170c8f59-dirty
fubar
parents:
19
diff
changeset
|
81 bed += cbed |
410144c7b2d6
planemo upload for repository https://github.com/fubar2/microsatbed commit d952bc313f408735456747c3d33e09a3170c8f59-dirty
fubar
parents:
19
diff
changeset
|
82 if args.bigwig: |
24
94c5f834c0cc
planemo upload for repository https://github.com/fubar2/microsatbed commit d952bc313f408735456747c3d33e09a3170c8f59-dirty
fubar
parents:
23
diff
changeset
|
83 w = getDensity(name, cbed, chrlen, args.winwidth) |
20
410144c7b2d6
planemo upload for repository https://github.com/fubar2/microsatbed commit d952bc313f408735456747c3d33e09a3170c8f59-dirty
fubar
parents:
19
diff
changeset
|
84 wig += w |
410144c7b2d6
planemo upload for repository https://github.com/fubar2/microsatbed commit d952bc313f408735456747c3d33e09a3170c8f59-dirty
fubar
parents:
19
diff
changeset
|
85 if args.bigwig: |
410144c7b2d6
planemo upload for repository https://github.com/fubar2/microsatbed commit d952bc313f408735456747c3d33e09a3170c8f59-dirty
fubar
parents:
19
diff
changeset
|
86 wig.sort() |
24
94c5f834c0cc
planemo upload for repository https://github.com/fubar2/microsatbed commit d952bc313f408735456747c3d33e09a3170c8f59-dirty
fubar
parents:
23
diff
changeset
|
87 bw = pybigtools.open("temp.bw", "w") |
94c5f834c0cc
planemo upload for repository https://github.com/fubar2/microsatbed commit d952bc313f408735456747c3d33e09a3170c8f59-dirty
fubar
parents:
23
diff
changeset
|
88 bw.write(chrlens, wig) |
20
410144c7b2d6
planemo upload for repository https://github.com/fubar2/microsatbed commit d952bc313f408735456747c3d33e09a3170c8f59-dirty
fubar
parents:
19
diff
changeset
|
89 shutil.move("temp.bw", args.bed) |
410144c7b2d6
planemo upload for repository https://github.com/fubar2/microsatbed commit d952bc313f408735456747c3d33e09a3170c8f59-dirty
fubar
parents:
19
diff
changeset
|
90 else: |
410144c7b2d6
planemo upload for repository https://github.com/fubar2/microsatbed commit d952bc313f408735456747c3d33e09a3170c8f59-dirty
fubar
parents:
19
diff
changeset
|
91 bed.sort() |
410144c7b2d6
planemo upload for repository https://github.com/fubar2/microsatbed commit d952bc313f408735456747c3d33e09a3170c8f59-dirty
fubar
parents:
19
diff
changeset
|
92 obed = ["%s\t%d\t%d\t%s_%d\t%d" % x for x in bed] |
410144c7b2d6
planemo upload for repository https://github.com/fubar2/microsatbed commit d952bc313f408735456747c3d33e09a3170c8f59-dirty
fubar
parents:
19
diff
changeset
|
93 with open(args.bed, "w") as outbed: |
410144c7b2d6
planemo upload for repository https://github.com/fubar2/microsatbed commit d952bc313f408735456747c3d33e09a3170c8f59-dirty
fubar
parents:
19
diff
changeset
|
94 outbed.write("\n".join(obed)) |
410144c7b2d6
planemo upload for repository https://github.com/fubar2/microsatbed commit d952bc313f408735456747c3d33e09a3170c8f59-dirty
fubar
parents:
19
diff
changeset
|
95 outbed.write("\n") |
1
1085e094cf5f
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/microsatbed commit 7ceb6658309a7ababe622b5d92e729e5470e22f0-dirty
fubar
parents:
diff
changeset
|
96 |
1085e094cf5f
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/microsatbed commit 7ceb6658309a7ababe622b5d92e729e5470e22f0-dirty
fubar
parents:
diff
changeset
|
97 |
1085e094cf5f
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/microsatbed commit 7ceb6658309a7ababe622b5d92e729e5470e22f0-dirty
fubar
parents:
diff
changeset
|
98 if __name__ == "__main__": |
1085e094cf5f
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/microsatbed commit 7ceb6658309a7ababe622b5d92e729e5470e22f0-dirty
fubar
parents:
diff
changeset
|
99 parser = argparse.ArgumentParser() |
1085e094cf5f
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/microsatbed commit 7ceb6658309a7ababe622b5d92e729e5470e22f0-dirty
fubar
parents:
diff
changeset
|
100 a = parser.add_argument |
1085e094cf5f
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/microsatbed commit 7ceb6658309a7ababe622b5d92e729e5470e22f0-dirty
fubar
parents:
diff
changeset
|
101 a("--di", action="store_true") |
1085e094cf5f
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/microsatbed commit 7ceb6658309a7ababe622b5d92e729e5470e22f0-dirty
fubar
parents:
diff
changeset
|
102 a("--tri", action="store_true") |
1085e094cf5f
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/microsatbed commit 7ceb6658309a7ababe622b5d92e729e5470e22f0-dirty
fubar
parents:
diff
changeset
|
103 a("--tetra", action="store_true") |
1085e094cf5f
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/microsatbed commit 7ceb6658309a7ababe622b5d92e729e5470e22f0-dirty
fubar
parents:
diff
changeset
|
104 a("--penta", action="store_true") |
1085e094cf5f
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/microsatbed commit 7ceb6658309a7ababe622b5d92e729e5470e22f0-dirty
fubar
parents:
diff
changeset
|
105 a("--hexa", action="store_true") |
1085e094cf5f
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/microsatbed commit 7ceb6658309a7ababe622b5d92e729e5470e22f0-dirty
fubar
parents:
diff
changeset
|
106 a("--mono", action="store_true") |
1085e094cf5f
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/microsatbed commit 7ceb6658309a7ababe622b5d92e729e5470e22f0-dirty
fubar
parents:
diff
changeset
|
107 a("--dimin", default=2, type=int) |
1085e094cf5f
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/microsatbed commit 7ceb6658309a7ababe622b5d92e729e5470e22f0-dirty
fubar
parents:
diff
changeset
|
108 a("--trimin", default=2, type=int) |
1085e094cf5f
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/microsatbed commit 7ceb6658309a7ababe622b5d92e729e5470e22f0-dirty
fubar
parents:
diff
changeset
|
109 a("--tetramin", default=2, type=int) |
1085e094cf5f
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/microsatbed commit 7ceb6658309a7ababe622b5d92e729e5470e22f0-dirty
fubar
parents:
diff
changeset
|
110 a("--pentamin", default=2, type=int) |
1085e094cf5f
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/microsatbed commit 7ceb6658309a7ababe622b5d92e729e5470e22f0-dirty
fubar
parents:
diff
changeset
|
111 a("--hexamin", default=2, type=int) |
1085e094cf5f
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/microsatbed commit 7ceb6658309a7ababe622b5d92e729e5470e22f0-dirty
fubar
parents:
diff
changeset
|
112 a("--monomin", default=2, type=int) |
1085e094cf5f
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/microsatbed commit 7ceb6658309a7ababe622b5d92e729e5470e22f0-dirty
fubar
parents:
diff
changeset
|
113 a("-f", "--fasta", default="humsamp.fa") |
1085e094cf5f
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/microsatbed commit 7ceb6658309a7ababe622b5d92e729e5470e22f0-dirty
fubar
parents:
diff
changeset
|
114 a("-b", "--bed", default="humsamp.bed") |
20
410144c7b2d6
planemo upload for repository https://github.com/fubar2/microsatbed commit d952bc313f408735456747c3d33e09a3170c8f59-dirty
fubar
parents:
19
diff
changeset
|
115 a("--bigwig", action="store_true") |
410144c7b2d6
planemo upload for repository https://github.com/fubar2/microsatbed commit d952bc313f408735456747c3d33e09a3170c8f59-dirty
fubar
parents:
19
diff
changeset
|
116 a("--winwidth", default=128, type=int) |
1
1085e094cf5f
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/microsatbed commit 7ceb6658309a7ababe622b5d92e729e5470e22f0-dirty
fubar
parents:
diff
changeset
|
117 a("--specific", default=None) |
1085e094cf5f
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/microsatbed commit 7ceb6658309a7ababe622b5d92e729e5470e22f0-dirty
fubar
parents:
diff
changeset
|
118 a("--minreps", default=2, type=int) |
1085e094cf5f
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/microsatbed commit 7ceb6658309a7ababe622b5d92e729e5470e22f0-dirty
fubar
parents:
diff
changeset
|
119 args = parser.parse_args() |
1085e094cf5f
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/microsatbed commit 7ceb6658309a7ababe622b5d92e729e5470e22f0-dirty
fubar
parents:
diff
changeset
|
120 write_ssrs(args) |