468346fde26973306a94cce63abdd4c4321a89a7,clairvoyante/utils_v2.py,,GetTrainingArray,#Any#Any#Any#Any#,59
Before Change
Y[key] = baseVec
f.stdout.close()
f.wait()
X = {}
f = subprocess.Popen(shlex.split("gzip -fdc %s" % (tensor_fn) ), stdout=subprocess.PIPE, bufsize=8388608)
total = 0
After Change
f.wait()
Y = {}
if var_fn != None:
f = subprocess.Popen(shlex.split("gzip -fdc %s" % (var_fn) ), stdout=subprocess.PIPE, bufsize=8388608)
for row in f.stdout:
row = row.split()
ctgName = row[0]
pos = int(row[1])
if bed_fn != None:
if len(tree[ctgName].search(pos)) == 0:
continue
key = ctgName + ":" + str(pos)
baseVec = [0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0.]
// -------------- ------ ------------ ------------------
// Base chng Zygo. Var type Var length
// A C G T HET HOM REF SNP INS DEL 0 1 2 3 4 >=4
// 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15
if row[4] == "0" and row[5] == "1":
if len(row[2]) == 1 and len(row[3]) == 1:
baseVec[base2num[row[2][0]]] = 0.5
baseVec[base2num[row[3][0]]] = 0.5
elif len(row[2]) > 1 or len(row[3]) > 1:
baseVec[base2num[row[2][0]]] = 0.5
baseVec[4] = 1.
elif row[4] == "1" and row[5] == "1":
if len(row[2]) == 1 and len(row[3]) == 1:
baseVec[base2num[row[3][0]]] = 1
elif len(row[2]) > 1 or len(row[3]) > 1:
pass
baseVec[5] = 1.
if len(row[2]) > 1 and len(row[3]) == 1: baseVec[9] = 1. // deletion
elif len(row[3]) > 1 and len(row[2]) == 1: baseVec[8] = 1. // insertion
else: baseVec[7] = 1. // SNP
varLen = abs(len(row[2])-len(row[3]))
if varLen > 4: baseVec[15] = 1.
else: baseVec[10+varLen] = 1.
Y[key] = baseVec
f.stdout.close()
f.wait()
X = {}
f = subprocess.Popen(shlex.split("gzip -fdc %s" % (tensor_fn) ), stdout=subprocess.PIPE, bufsize=8388608)
total = 0
mat = np.empty(((2*param.flankingBaseNum+1)*4*param.matrixNum), dtype=np.float32)
In pattern: SUPERPATTERN
Frequency: 5
Non-data size: 4
Instances
Project Name: aquaskyline/Clairvoyante
Commit Name: 468346fde26973306a94cce63abdd4c4321a89a7
Time: 2017-09-19
Author: aquaskyline@gmail.com
File Name: clairvoyante/utils_v2.py
Class Name:
Method Name: GetTrainingArray
Project Name: cve-search/cve-search
Commit Name: 069b3b7e45a262a5f29c503abe0896279f938f86
Time: 2015-03-05
Author: a@foo.be
File Name: db_updater.py
Class Name:
Method Name:
Project Name: ilastik/ilastik
Commit Name: d1c33176b090a2b9daa8114cc601a979eb3ca06c
Time: 2013-06-21
Author: bergs@janelia.hhmi.org
File Name: ilastik/applets/splitBodyPostprocessing/opSplitBodyPostprocessing.py
Class Name: OpAccumulateFragmentSegmentations
Method Name: execute
Project Name: ilastik/ilastik
Commit Name: cce08e732636c494c3d17d5faf84dc460733e3c0
Time: 2014-11-11
Author: bergs@janelia.hhmi.org
File Name: lazyflow/utility/io/tiledVolume.py
Class Name: TiledVolume
Method Name: read
Project Name: ilastik/ilastik
Commit Name: 6708c35bfb3864c7e92a59094de4bce23805bc34
Time: 2013-07-01
Author: bergs@janelia.hhmi.org
File Name: ilastik/workflows/carving/splitBodyCarvingWorkflow.py
Class Name: SplitBodyCarvingWorkflow
Method Name: onProjectLoaded