reverse_tab.py 386 Bytes
Newer Older
Marine Bergot's avatar
Marine Bergot committed
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19
#! /usr/bin/env python3
# -*- coding: utf-8 -*-

import sys 


tab_to_write = list()


lines = [line.rstrip() for line in open(sys.argv[1])]

for i in range(len(lines[0].split("\t"))):
	tab_to_write.append(lines[0].split("\t")[i]+"\t"+lines[1].split("\t")[i])
	
with open(sys.argv[2], "w") as output_file:
	for line in tab_to_write:
		output_file.write(line)
		output_file.write("\n")