Currently this is my python script (TagGen) which has one function:
def SJtag(file,len_tag):
import csv
reader = csv.reader(open(file), dialect='excel-tab' )
for row in reader:
qstarts = row[1].split(",")[1:-1]
n = len_tag/2
for i in qstarts:
name = row[0]
start = int(i)-n
if start<0:
start = 0
end = int(i)+n
if end>len(row[2]):
end=len(row[2])
tag = row[2][start:end]
print name, i, tag, len(tag)
SJtag("QstartRefseqhg19.head",80)
I want to give the file and len_tag parameters of the SJtag function using bash comand line, something like this:
python ./TagGen QstartRefseqhg19.head 80
How can I do this, or some thing similar?
Thanks for your help!