replaces elabid with sample name in the names of output files
This commit is contained in:
@@ -222,9 +222,10 @@ if __name__=="__main__":
|
||||
elabid = input("Enter elabid of your starting sample [default= 1111]: ") or 1111
|
||||
data = APIHandler(apikey).get_entry_from_elabid(elabid)
|
||||
sample = Entrypoint(data)
|
||||
sample_name = sample.name.strip().replace(" ","_")
|
||||
substrate_object = chain_entrypoint_to_batch(sample) # Substrate-class object
|
||||
layers = chain_entrypoint_to_layers(sample) # list of Layer-class objects
|
||||
result = make_nexus_schema_dictionary(substrate_object, layers)
|
||||
# print(make_nexus_schema_dictionary(substrate_object, layers)) # debug
|
||||
with open (f"output/sample-{elabid}.json", "w") as f:
|
||||
with open (f"output/sample-{sample_name}.json", "w") as f:
|
||||
json.dump(result, f, indent=3)
|
||||
Reference in New Issue
Block a user