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
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")
def __init__(self, fileName): TsvTable.__init__(self, fileName, typeMap=typeMap, multiKeyCols=("inId","selectId"))
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)
def __init__(self, fileName, isRdb=False): TsvTable.__init__(self, fileName, typeMap=typeMap, isRdb=isRdb)