/tools/peakcalling/GetPath.py
https://bitbucket.org/cistrome/cistrome-harvard/ · Python · 19 lines · 12 code · 2 blank · 5 comment · 4 complexity · 5c180d830ac23d400c99649e7c929a17 MD5 · raw file
- import os, sys, tempfile
- #print os.getcwd()
- fn = tempfile.mkstemp(prefix="paths")[1]
- outf = open(fn, "w")
- for i in sys.argv[1:]:
- i = i.split(",")
- #if len(i)!=3:
- # print i
- # #print "Please input wigfile info correctly. and don't use comma and space."
- # sys.exit(1)
- for j in range(len(i)):
- if i[j][-3:] == "dat":
- if os.path.isfile(i[j]):
- i[j] = os.path.abspath(i[j])
- outf.write(" ".join(i) + "\n")
- outf.close()
- print fn