Commit 6a22244c authored by hmueller's avatar hmueller
Browse files

Translate location identifiers into more verbose representations.

parent 1c531d81
......@@ -8,6 +8,8 @@ parser.add_argument('--result', '-r', required = True, help = 'The targetp resul
parser.add_argument('--output', '-o', required = True, help = 'The converted results json file')
args = parser.parse_args()
loc_dict = {"C": "chloroplast", "M": "mitochondrion", "S": "secretory pathway", "_": "other", "*": "undetermined"}
filename = args.result
documents = {}
with open(filename) as f:
......@@ -27,6 +29,8 @@ with open(filename) as f:
if field_index[field] is not None:
if field in ["cTP", "mTP", "SP"]:
results[field.lower()] = float(split[field_index[field]])
elif field == "Loc":
results[field.lower()] = loc_dict[split[field_index[field]]]
else:
results[field.lower()] = split[field_index[field]]
else:
......
Supports Markdown
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