tgen
authorPierre Ratinaud <ratinaud@univ-tlse2.fr>
Thu, 31 Mar 2016 11:27:43 +0000 (13:27 +0200)
committerPierre Ratinaud <ratinaud@univ-tlse2.fr>
Thu, 31 Mar 2016 11:27:43 +0000 (13:27 +0200)
PrintRScript.py

index 53c2aae..f0a2390 100644 (file)
@@ -946,7 +946,7 @@ class PrintSimiScript(PrintRScript) :
         seuil <- %s
         if (!is.null(seuil)) {
             if (method!='cooc') {
         seuil <- %s
         if (!is.null(seuil)) {
             if (method!='cooc') {
-                seuil <- seuil/100
+                seuil <- seuil/1000
             } 
         }
         """ % seuil
             } 
         }
         """ % seuil
@@ -1266,10 +1266,18 @@ class TgenProfScript(PrintRScript):
         tgen <- read.csv2("%s", row.names = 1, sep = '\\t')
         """ % ffr(self.parametres['tgeneff'])
         txt += """
         tgen <- read.csv2("%s", row.names = 1, sep = '\\t')
         """ % ffr(self.parametres['tgeneff'])
         txt += """
+        tgenlem <- read.csv2("%s", row.names = 1, sep = '\\t')
+        """ % ffr(self.parametres['tgenlemeff'])
+        txt += """
         res <- build.prof.tgen(tgen)
         write.table(res$chi2, file = "%s", sep='\\t', col.names = NA)
         write.table(res$pchi2, file = "%s", sep='\\t', col.names = NA)
         """ % (ffr(self.pathout['tgenchi2.csv']), ffr(self.pathout['tgenpchi2.csv']))
         res <- build.prof.tgen(tgen)
         write.table(res$chi2, file = "%s", sep='\\t', col.names = NA)
         write.table(res$pchi2, file = "%s", sep='\\t', col.names = NA)
         """ % (ffr(self.pathout['tgenchi2.csv']), ffr(self.pathout['tgenpchi2.csv']))
+        txt += """
+        reslem <- build.prof.tgen(tgenlem)
+        write.table(reslem$chi2, file = "%s", sep='\\t', col.names = NA)
+        write.table(reslem$pchi2, file = "%s", sep='\\t', col.names = NA)
+        """ % (ffr(self.pathout['tgenlemchi2.csv']), ffr(self.pathout['tgenlempchi2.csv']))        
         self.add(txt)
         
 class FreqMultiScript(PrintRScript):
         self.add(txt)
         
 class FreqMultiScript(PrintRScript):