c9790a5fbf8797f8a36430682c51cc68009899bf max Fri Jun 6 09:00:45 2025 -0700 fixing bug where marker parsing used the wrong field for geneId, ds tm-cb/scrna diff --git src/cbPyLib/cellbrowser/cellbrowser.py src/cbPyLib/cellbrowser/cellbrowser.py index 2959574..780f447 100755 --- src/cbPyLib/cellbrowser/cellbrowser.py +++ src/cbPyLib/cellbrowser/cellbrowser.py @@ -3010,31 +3010,31 @@ topMarkers = {} for clusterName, rows in iterItems(data): logging.debug("Cluster: %s" % clusterName) sanName = sanitizeName(clusterName) assert(sanName not in sanNames) # after removing special chars, cluster names must still be unique. this is most likely due to typos in your meta annotation table. If it is not, we need to change the code here. sanNames.add(sanName) outFname = join(outDir, sanName+".tsv") logging.debug("Writing %s" % outFname) ofh = open(outFname, "w") ofh.write("\t".join(newHeaders)) ofh.write("\n") missGeneIds = set() for row in rows: row[2] = "%0.5E" % row[2] # limit score to 5 digits - geneId = row[1] + geneId = row[0] if geneId not in matrixGeneIds: missGeneIds.add(geneId) continue ofh.write("\t".join(row)) ofh.write("\n") if len(missGeneIds)!=0: logging.error("Marker table contains these genes, they were skipped, they are not in the matrix: %s" % (",".join(missGeneIds))) #logging.error("Use --force to accept this.") topSyms = [row[1] for row in rows[:topMarkerCount]] topMarkers[clusterName] = topSyms ofh.close()