about summary refs log tree commit diff
diff options
context:
space:
mode:
authorPjotr Prins2015-03-09 13:54:24 +0300
committerPjotr Prins2015-03-09 13:54:24 +0300
commit60ef29c2b003f9d9a76d901ca4107b8cce3b9799 (patch)
tree152ae46fad50034f4336a7bdeb78292ecd5d7a79
parent0919dd489deeb736b08c50d4b7636b6af00d92c8 (diff)
downloadgenenetwork2-60ef29c2b003f9d9a76d901ca4107b8cce3b9799.tar.gz
Now we can use print in lamdba
-rw-r--r--wqflask/wqflask/my_pylmm/pyLMM/convertlmm.py7
1 files 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 <http://www.gnu.org/licenses/>.
 
+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")