示例#1
0
	SUB_ID=[]
	for i in gen:
		SUB_ID.append(i.folder._data.get_id())
	mapper.cluster=args.cluster
	mapper.node=args.node

	while True:
		if args.cluster=='n':
			SNPs_index, keys=mapper.get_next()
		else:
			chunk=mapper.chunk_pop()
			if chunk is None:
				SNPs_index=None
				break
			print chunk
			SNPs_index, keys=mapper.get_chunk(chunk)

		if SNPs_index is None:
			break
		RSID.append(keys)

		data=merge_genotype(gen, SNPs_index) #TODO (high) add mapper
		print data.shape
		if args.cluster=='n':
			h5_gen_file = tables.openFile(
				os.path.join(args.out,str(hdf5_iter)+'_'+h5_name+'.h5'), 'w', title=args.save_name)
		else:#TODO (high) check!
			h5_gen_file = tables.openFile(
				os.path.join(args.out,str(chunk[0])+'_' +str(chunk[1])+'_'+h5_name+'.h5'), 'w', title=args.save_name)
		hdf5_iter+=1