Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
def test_shortener():
read = Sequence('read1', 'ACGTTTACGTA', '##456789###')
shortener = Shortener(0)
assert shortener(read, ModificationInfo(read)) == Sequence('read1', '', '')
shortener = Shortener(1)
assert shortener(read, ModificationInfo(read)) == Sequence('read1', 'A', '#')
shortener = Shortener(5)
assert shortener(read, ModificationInfo(read)) == Sequence('read1', 'ACGTT', '##456')
shortener = Shortener(100)
assert shortener(read, ModificationInfo(read)) == read
def test_shortener():
read = Sequence('read1', 'ACGTTTACGTA', '##456789###')
shortener = Shortener(0)
assert shortener(read, ModificationInfo(read)) == Sequence('read1', '', '')
shortener = Shortener(1)
assert shortener(read, ModificationInfo(read)) == Sequence('read1', 'A', '#')
shortener = Shortener(5)
assert shortener(read, ModificationInfo(read)) == Sequence('read1', 'ACGTT', '##456')
shortener = Shortener(100)
assert shortener(read, ModificationInfo(read)) == read
def test_shortener():
read = Sequence('read1', 'ACGTTTACGTA', '##456789###')
shortener = Shortener(0)
assert shortener(read, ModificationInfo(read)) == Sequence('read1', '', '')
shortener = Shortener(1)
assert shortener(read, ModificationInfo(read)) == Sequence('read1', 'A', '#')
shortener = Shortener(5)
assert shortener(read, ModificationInfo(read)) == Sequence('read1', 'ACGTT', '##456')
shortener = Shortener(100)
assert shortener(read, ModificationInfo(read)) == read
def test_shortener():
read = Sequence('read1', 'ACGTTTACGTA', '##456789###')
shortener = Shortener(0)
assert shortener(read, ModificationInfo(read)) == Sequence('read1', '', '')
shortener = Shortener(1)
assert shortener(read, ModificationInfo(read)) == Sequence('read1', 'A', '#')
shortener = Shortener(5)
assert shortener(read, ModificationInfo(read)) == Sequence('read1', 'ACGTT', '##456')
shortener = Shortener(100)
assert shortener(read, ModificationInfo(read)) == read
def modifiers_applying_to_both_ends_if_paired(args) -> Iterator[SingleEndModifier]:
if args.length is not None:
yield Shortener(args.length)
if args.trim_n:
yield NEndTrimmer()
if args.length_tag:
yield LengthTagModifier(args.length_tag)
for suffix in args.strip_suffix:
yield SuffixRemover(suffix)
if args.prefix or args.suffix:
yield PrefixSuffixAdder(args.prefix, args.suffix)
if args.zero_cap:
yield ZeroCapper(quality_base=args.quality_base)