Created
November 18, 2017 08:30
-
-
Save sxv/2ce375ba6a4fb1ade1c6234188f8414e to your computer and use it in GitHub Desktop.
take ENS gene id and gene name and append col[2:] from input files
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import sys | |
rows = [] | |
for line in open('gene_names.csv'): | |
a,b,c = line.replace('\n','').split(',') | |
rows.append([a,c]) | |
for file in sys.argv[1:]: | |
for i, line in enumerate(open(file)): | |
rows[i] += line.replace('\n','').split(',')[2:] | |
for row in rows: | |
print ','.join(row) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment