Exemplo n.º 1
0
 def __init__(self, fileName, isRdb=False, idIsUniq=False):
     self.idIsUniq = idIsUniq
     if idIsUniq:
         uniqKeyCols="acc"
         multiKeyCols=None
     else:
         uniqKeyCols=None
         multiKeyCols="acc"
     TsvTable.__init__(self, fileName, typeMap=typeMap, isRdb=isRdb, uniqKeyCols=uniqKeyCols, multiKeyCols=multiKeyCols)
     self.idIndex = self.indices.acc
Exemplo n.º 2
0
 def testAddColumn(self):
     tsv = TsvTable(self.getInputFile("mrna1.tsv"), uniqKeyCols="qName")
     tsv.addColumn("joke")
     i = 0
     for row in tsv:
         row.joke = i
         i += 1
     fh = open(self.getOutputFile(".tsv"), "w")
     tsv.write(fh)
     fh.close()
     self.diffExpected(".tsv")
Exemplo n.º 3
0
 def __init__(self, fileName):
     TsvTable.__init__(self, fileName, typeMap=typeMap, multiKeyCols=("inId","selectId"))
Exemplo n.º 4
0
 def testWrite(self):
     tsv = TsvTable(self.getInputFile("mrna1.tsv"), uniqKeyCols="qName")
     fh = open(self.getOutputFile(".tsv"), "w")
     tsv.write(fh)
     fh.close()
     self.diffExpected(".tsv")
 def __init__(self, fspec):
     TsvTable.__init__(self, fspec, typeMap=typeMap)
Exemplo n.º 6
0
 def __init__(self, fileName, isRdb=False):
     TsvTable.__init__(self, fileName, typeMap=typeMap, isRdb=isRdb)