# HG changeset patch # User fubar # Date 1721371278 0 # Node ID 8d0b8a75350ff5736a1f7a6fbc1c2be40c37653e # Parent 94c5f834c0ccee9f4745032b44a170de4db4a8db planemo upload for repository https://github.com/fubar2/microsatbed commit d952bc313f408735456747c3d33e09a3170c8f59-dirty diff -r 94c5f834c0cc -r 8d0b8a75350f dibed.bw Binary file dibed.bw has changed diff -r 94c5f834c0cc -r 8d0b8a75350f find_str.py --- a/find_str.py Fri Jul 19 05:20:35 2024 +0000 +++ b/find_str.py Fri Jul 19 06:41:18 2024 +0000 @@ -21,7 +21,7 @@ dw = [ (name, (x * winwidth)+1, (x + 1) * winwidth, float(d[x])) for x in range(nwin + 1) - if (x + 1) * winwidth <= chrlen + if (x + 1) * winwidth <= chrlen - 1 ] return dw @@ -42,6 +42,8 @@ specific = args.specific.upper().split(",") fa = Fastx(args.fasta, uppercase=True) for name, seq in fa: + chrlen = len(seq) + chrlens[name] = chrlen cbed = [] for ssr in pytrf.STRFinder( name, @@ -78,15 +80,12 @@ cbed.append(row) bed += cbed if args.bigwig: - chrlen = len(seq) - chrlens[name] = chrlen w = getDensity(name, cbed, chrlen, args.winwidth) wig += w if args.bigwig: wig.sort() bw = pybigtools.open("temp.bw", "w") bw.write(chrlens, wig) - bw.close() shutil.move("temp.bw", args.bed) else: bed.sort() diff -r 94c5f834c0cc -r 8d0b8a75350f humsamp.bed Binary file humsamp.bed has changed diff -r 94c5f834c0cc -r 8d0b8a75350f test.bw Binary file test.bw has changed