Created
October 28, 2012 03:22
-
-
Save anonymous/3967314 to your computer and use it in GitHub Desktop.
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
eFile = [None]*8 | |
mFile = [None]*8 | |
import csv | |
eFile[0] = open('CvR.txt') | |
mFile[0] = open('Selected_C1_D0.07_Comparisons_CG_per_pmt_delta_mean_median.txt') | |
eFile[1] = open('CvR.txt') | |
mFile[1] = open('Selected_C1_D0.11_Comparisons_CG_per_genebody_delta_mean_median.txt') | |
eFile[2] = open('MCvMR.txt') | |
mFile[2] = open('Selected_C2_D0.07_Comparisons_CG_per_pmt_delta_mean_median.txt') | |
eFile[3] = open('MCvMR.txt') | |
mFile[3] = open('Selected_C2_D0.17_Comparisons_CG_per_genebody_delta_mean_median.txt') | |
eFile[4] = open('FCvFR.txt') | |
mFile[4] = open('Selected_C3_D0.06_Comparisons_CG_per_pmt_delta_mean_median.txt') | |
eFile[5] = open('FCvFR.txt') | |
mFile[5] = open('Selected_C3_D0.04_Comparisons_CG_per_genebody_delta_mean_median.txt') | |
eFile[6] = open('FvM.txt') | |
mFile[6] = open('Selected_C4_D0.11_Comparisons_CG_per_pmt_delta_mean_median.txt') | |
eFile[7] = open('FvM.txt') | |
mFile[7] = open('Selected_C4_D0.09_Comparisons_CG_per_genebody_delta_mean_median.txt') | |
savedRows = [] | |
geneSymbols = [] | |
matchedRows = [] | |
for y in range (0,1): #range edited for debugging | |
for line in eFile[y]: | |
line2 = line.split('\t') | |
if line2[2] == 'Olfr1411': | |
print (line) #this outputs the broken values seen in the list from my original post | |
print (str(line2)) | |
savedRows.append(line) | |
geneSymbols.append(line[2]) | |
#for line in eFile[y]: --> this is the actual code, the one above is what I am using to debug.. | |
#line = line.split('\t') | |
#savedRows.append(line) | |
#geneSymbols.append(line[2]) | |
for line in mFile[y]: | |
line = line.split() | |
for x in range(0,len(geneSymbols)): | |
if line[0] == geneSymbols[x]: | |
matchedRows.append(savedRows[x]) | |
######### This would be what would run on your computer since you dont have the source files. I hope I used the \t's right.. | |
line = 'ENSMUSG00000062497\tchr1\tOlfr1411\tolfactory receptor\t1411\tprotein_coding\t972\t0\t0\t0\t0\t0\t0\t0\t#DIV/0!\t0.293586586 1' | |
line2 = line.split('\t') | |
if line2[2] == 'Olfr1411': | |
print (line) #this outputs the broken values seen in the list from my original post | |
print (str(line2)) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment