Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

post demultiplexing script as example #72

Open
ctb opened this issue Aug 10, 2017 · 0 comments
Open

post demultiplexing script as example #72

ctb opened this issue Aug 10, 2017 · 0 comments

Comments

@ctb
Copy link
Member

ctb commented Aug 10, 2017

see below:

#! /usr/bin/env python
from __future__ import print_function
import screed
import sys
import argparse

p = argparse.ArgumentParser()
p.add_argument('r1_file')
p.add_argument('r2_file')
p.add_argument('code_r1')
p.add_argument('code_r2')
args = p.parse_args()

for record1, record2 in zip(screed.open(args.r1_file),
                            screed.open(args.r2_file)):
    if record1.sequence[8:].startswith(args.code_r1) and \
       record2.sequence[0:].startswith(args.code_r2):
       
       print('@{}\n{}\n+\n{}'.format(record1.name, record1.sequence,
                                     record1.quality))
       print('@{}\n{}\n+\n{}'.format(record2.name, record2.sequence,
                                     record2.quality))

# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant