From 60ef29c2b003f9d9a76d901ca4107b8cce3b9799 Mon Sep 17 00:00:00 2001 From: Pjotr Prins Date: Mon, 9 Mar 2015 13:54:24 +0300 Subject: Now we can use print in lamdba --- wqflask/wqflask/my_pylmm/pyLMM/convertlmm.py | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/wqflask/wqflask/my_pylmm/pyLMM/convertlmm.py b/wqflask/wqflask/my_pylmm/pyLMM/convertlmm.py index d374407e..173bae2e 100644 --- a/wqflask/wqflask/my_pylmm/pyLMM/convertlmm.py +++ b/wqflask/wqflask/my_pylmm/pyLMM/convertlmm.py @@ -16,6 +16,7 @@ # You should have received a copy of the GNU Affero General Public License # along with this program. If not, see . +from __future__ import print_function from optparse import OptionParser import sys import os @@ -144,10 +145,10 @@ if options.geno: snps = plink.readbim(options.geno+'.bim') msg("Converting geno "+options.geno+'.bed') - def out(i,x): - print i,x + # def out(i,x): + # print i,x - snps = plink.readbed(options.geno+'.bed',num_inds, out) + snps = plink.readbed(options.geno+'.bed',num_inds, lambda i,x: print(i,x)) msg(str(count)+" geno lines written (with "+str(snps)+" snps)") msg("Converting done") -- cgit v1.2.3