else: for elem in restricts[restrictType]: otherElems.append(elem['name'] + " (" + elem['termid'] + ")") networkDRdict['Cells'] = "\makecell[l]{" + "\\\\".join( sorted(cellElems)) + "}" networkDRdict['Disease'] = "\makecell[l]{" + "\\\\".join( sorted(diseaseElems)) + "}" networkDRdict['Other'] = "\makecell[l]{" + "\\\\".join( sorted(otherElems)) + "}" dr = DataRow.fromDict(networkDRdict) restrictDF.addRow(dr) print(restrictDF._makeLatex()) #exit() allMissing = {} figidx = 0 mirna2cellOut = open("/mnt/d/yanc_network/important_process.txt", 'w') for network in networks: figidx += 1 networkGraph = nx.Graph() if network in ignoreNetworks: continue
for pset in allPowerSets: if len(pset) == 0: continue setPMIDs = set([x for x in allPMIDs]) for dim in pset: setPMIDs = setPMIDs.intersection( dbs2pmids[dim] ) print(pset, len(setPMIDs)) drdict = { "Subset": ", ".join(pset), "Number of PMIDs": len(setPMIDs) } dr = DataRow.fromDict(drdict) outdf.addRow(dr) print(outdf._makeLatex())
else: for elem in restricts[restrictType]: otherElems.append(elem['name'] + " (" + elem['termid'] + ")") networkDRdict['Cells'] = "\makecell[l]{" + "\\\\".join( sorted(cellElems)) + "}" networkDRdict['Disease'] = "\makecell[l]{" + "\\\\".join( sorted(diseaseElems)) + "}" networkDRdict['Other'] = "\makecell[l]{" + "\\\\".join( sorted(otherElems)) + "}" dr = DataRow.fromDict(networkDRdict) restrictDF.addRow(dr) print(restrictDF._makeLatex()) mirna2cellOut = open("/mnt/d/yanc_network/important_networks.txt", 'w') def acceptEvidence(ev): return True figidx = 0 for network in networks: figidx += 1 networkGraph = nx.Graph() if network in ignoreNetworks: