Mercurial > repos > fubar > microsatbed
diff find_str.py @ 19:db5523378e5c draft
planemo upload for repository https://github.com/fubar2/microsatbed commit d952bc313f408735456747c3d33e09a3170c8f59-dirty
author | fubar |
---|---|
date | Wed, 17 Jul 2024 07:40:00 +0000 |
parents | 264d79548d19 |
children | 410144c7b2d6 |
line wrap: on
line diff
--- a/find_str.py Wed Jul 17 06:19:22 2024 +0000 +++ b/find_str.py Wed Jul 17 07:40:00 2024 +0000 @@ -23,8 +23,7 @@ specific = args.specific.upper().split(",") fa = Fastx(args.fasta, uppercase=True) for name, seq in fa: - if args.specific: - ssrs = pytrf.STRFinder( + for ssr in pytrf.STRFinder( name, seq, args.monomin, @@ -33,29 +32,17 @@ args.tetramin, args.pentamin, args.hexamin, - ) - else: - ssrs = pytrf.STRFinder( - name, - seq, - args.monomin, - args.dimin, - args.trimin, - args.tetramin, - args.pentamin, - args.hexamin, - ) - for ssr in ssrs: + ): row = ( ssr.chrom, - ssr.start - 1, + ssr.start, ssr.end, ssr.motif, ssr.repeat, ssr.length, ) # pytrf reports a 1 based start position so start-1 fixes the bed interval lengths - if args.specific and ssr.motif in specific and ssr.repeat >= args.minreps: + if args.specific and ssr.motif in specific: bed.append(row) elif args.mono and len(ssr.motif) == 1: bed.append(row)