Aug-22-2017, 05:37 AM
(This post was last modified: Aug-22-2017, 05:37 AM by baronmontesqieu.)
Hello; Im trying to make a code that converts a specific column into binary.
I keep on getting an error code.
Could Someone tell me what I am doing wrong please?
thank you.
btw the type of file i am dealing with is a SAM file
I keep on getting an error code.
Could Someone tell me what I am doing wrong please?
thank you.
btw the type of file i am dealing with is a SAM file
import re
import csv
f = 'filedirectory'
d = '\t'
g=open(f,'r')
reader = csv.reader(g,delimiter=d)
ncol=len(next(reader))
f.seek(0)
indata = open("filedirectory")
for line in indata:
print (bin(int(line.split()[1])), ', ', [1], ', ', [5])
