Python package to make interacting with life sciences manufacturing data quick and intuitive.
Project description
fathomdata
Python package to make interacting with life sciences manufacturing data quick and intuitive. Getting the data should be the easy part.
Usage
API setup
import fathomdata as fd
fd.set_api_key('xxx')
Get structured dataframes for documents that have been ingested
documents = fd.get_documents_df()
for index, row in documents.iterrows():
document = fd.get_document(row['DocumentId'])
print(document.get_materials_df())
print(document.get_steps_df())
print(document.get_parameters_df())
Ingest a new document into the dataset
new_document_id = fd.ingest_document("/path/to/document.pdf")
Create control charts for continuous process validation
import matplotlib.pyplot as plt
document_ids = documents['DocumentId'].tolist()
actuals = fd.get_parameter_actuals_across_documents(document_ids)
print(actuals)
titer_actuals = actuals.loc['Titer']
yield_actuals = actuals.loc['Yield']
first_document_params_df = fd.get_document(document_ids[0]).get_parameters_df()
titer_operating_limits = {
'lower': first_document_params_df.at['Titer', 'Lower Operating Limit'],
'upper': first_document_params_df.at['Titer', 'Upper Operating Limit']
}
yield_operating_limits = {
'lower': first_document_params_df.at['Yield', 'Lower Operating Limit'],
'upper': first_document_params_df.at['Yield', 'Upper Operating Limit']
}
fig, axes = plt.subplots(2, 1, sharex=True, figsize=(8,12))
titer_control_chart = fd.create_control_chart(axes[0], titer_actuals, titer_operating_limits['lower'], titer_operating_limits['upper'])
yield_control_chart = fd.create_control_chart(axes[1], yield_actuals, yield_operating_limits['lower'], yield_operating_limits['upper'])
Project details
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
fathomdata-0.0.4.tar.gz
(9.0 kB
view hashes)
Built Distribution
Close
Hashes for fathomdata-0.0.4-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | c5d831311595f95fc5b235e5de9a5b6126e73e95de5bf5c24b67a78909e2e5d0 |
|
MD5 | 4f296983a36c7a8f00efb9abc4b26aab |
|
BLAKE2b-256 | ebd30a6013f51b085d9b8924d477e13ab321d10e99bda9ae14ad901dccfb339c |