Commit 85b2036d authored by Philippe BORDRON's avatar Philippe BORDRON
Browse files

Fix 1 gene enrichment output

parent cfca8577
......@@ -296,6 +296,10 @@ for c in conditionVS:
# Building functional enrichment table
templateVars["stringParams"][c["condition1"]+"__vs__"+c["condition2"]]["enrich"] = list()
count = 0
# When enchiched gene list contains 1 gene, the inputGenes list is completed by string with some no DE genes
# We must check them
DEgenes = [x["Gene"] for x in templateVars["deseqres"][c["condition1"]+"__vs__"+c["condition2"]]["genes"]]
# Opening of StringDB file
with open(stringFunctionalEnrichmentFile, "r") as f:
f.readline()
......@@ -334,13 +338,17 @@ for c in conditionVS:
g["ncbiTaxonId"] = taxa
gc = []
for g1, g2 in zip(ls[5].split(','), ls[6].split(',')):
fc = templateVars["deseqres"][c["condition1"]+"__vs__"+c["condition2"]]["fc"][g1]
if fc < 0:
color = "green"
sign = "+"
elif fc > 0:
color = "red"
sign = "-"
if g1 in DEgenes: # We must check if inputGenes are DE genes
fc = templateVars["deseqres"][c["condition1"]+"__vs__"+c["condition2"]]["fc"][g1]
if fc < 0:
color = "green"
sign = "+"
elif fc > 0:
color = "red"
sign = "-"
else:
color = "grey"
sign = ""
else:
color = "grey"
sign = ""
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment