#!/usr/bin/env python

import sys,os,re
from Bio.Seq import Seq

mapping_fp = sys.argv[1]
out = open(sys.argv[2], "w")

with open(mapping_fp) as mapping:
    for line in mapping:
        if line[0] == "#":
            out.write(line)
        else:
            line_contents = line.split("\t")        
            barcode_seq = Seq(line_contents[1])
            new_line = re.sub(line_contents[1], barcode_seq.reverse_complement().strip(), line)
            out.write("{0}\n".format(new_line))
            
        

cc3f16fe3ffd42f8ae37cab9fe5f4391c96527e1
<mask token>

<mask token>
with open(mapping_fp) as mapping:
    for line in mapping:
        if line[0] == '#':
            out.write(line)
        else:
            line_contents = line.split('\t')
            barcode_seq = Seq(line_contents[1])
            new_line = re.sub(line_contents[1], barcode_seq.
                reverse_complement().strip(), line)
            out.write('{0}\n'.format(new_line))

<mask token>
mapping_fp = sys.argv[1]
out = open(sys.argv[2], 'w')
with open(mapping_fp) as mapping:
    for line in mapping:
        if line[0] == '#':
            out.write(line)
        else:
            line_contents = line.split('\t')
            barcode_seq = Seq(line_contents[1])
            new_line = re.sub(line_contents[1], barcode_seq.
                reverse_complement().strip(), line)
            out.write('{0}\n'.format(new_line))

import sys, os, re
from Bio.Seq import Seq
mapping_fp = sys.argv[1]
out = open(sys.argv[2], 'w')
with open(mapping_fp) as mapping:
    for line in mapping:
        if line[0] == '#':
            out.write(line)
        else:
            line_contents = line.split('\t')
            barcode_seq = Seq(line_contents[1])
            new_line = re.sub(line_contents[1], barcode_seq.
                reverse_complement().strip(), line)
            out.write('{0}\n'.format(new_line))

#!/usr/bin/env python

import sys,os,re
from Bio.Seq import Seq

mapping_fp = sys.argv[1]
out = open(sys.argv[2], "w")

with open(mapping_fp) as mapping:
    for line in mapping:
        if line[0] == "#":
            out.write(line)
        else:
            line_contents = line.split("\t")        
            barcode_seq = Seq(line_contents[1])
            new_line = re.sub(line_contents[1], barcode_seq.reverse_complement().strip(), line)
            out.write("{0}\n".format(new_line))
            
        
