elab_loader
This is a tool for the digital and modern lab! Use it to upload tables of data into your elabftw instance.
Science Score: 44.0%
This score indicates how likely this project is to be science-related based on various indicators:
-
✓CITATION.cff file
Found CITATION.cff file -
✓codemeta.json file
Found codemeta.json file -
✓.zenodo.json file
Found .zenodo.json file -
○DOI references
-
○Academic publication links
-
○Academic email domains
-
○Institutional organization owner
-
○JOSS paper metadata
-
○Scientific vocabulary similarity
Low similarity (15.3%) to scientific vocabulary
Keywords
Repository
This is a tool for the digital and modern lab! Use it to upload tables of data into your elabftw instance.
Basic Info
Statistics
- Stars: 2
- Watchers: 2
- Forks: 0
- Open Issues: 0
- Releases: 1
Topics
Metadata Files
Readme.md

ELAB LOADER Beta V 1.6.0
Introduction
This is ELABLOADER, a simple-to-use, no-bullshit, non bloating, console based solution to transfer data between the API provided by elabFTW and tables provided by the physical lab. It is utilized mainly by reading prepared XLSX, CSV, or TXT files. The current version is under development. Please report any bugs! Thanks!
Only works with elabFTW installed A demo version of elabFTW is available at https://demo.elabftw.net/
Installation
You must have Python 3.9 with the following libraries installed
- elabapi_python
- pandas
- numpy
- progress
- validators
Github is the official download source, the place to praise, and the place to complain: Simply clone the project, and you should be good to go.
git clone https://github.com/KJPMolgenLab/ELAB_LOADER.git
Install the required packages vie pip
pip install -r requirements.txt
Getting started
What do I need?
- The elabFTW URL to the API
- e.g. https://demo.elabftw.net/api/v2
- Also, kindly ask your administrator if unsure
- an API Key
- can be generated in the user panel
- needs to have write permission
- Online information see Info
- Kindly ask your administrator if unsure
- The Category ID of the type of item you want to update in Elab:
- The type of item has to be predefined in the labbook
- If you select the type of item in your database view you can get the id from the url
- e.g.
https://demo.elabftw.net/database.php?q=&cat=7&mode=show&limit=15gives category 7 - And you guessed it ask your Admin if unsure
Data preparation
First, carefully prepare a list of the items to be added in XLSX format (Excel sheet). We strongly suggest using XLSX for comforts sake. Make sure the mandatory columns and header names are present in the file. These vary between the different types of data you can upload. For the different modes we provided templates in the Example folders
Everything marked red in the ./Examples Excel files is a mandatory entry and is case SENSITIVE!
You can add as many columns as you wish, they will be added to the items in tabular format
Fill out the mandatory columns. It is recommended to also fill out the existing ones, or remove them if not needed. Any additional columns will be added into the Elab table. Results can vary due to Elab's CSS.
Modes
Mode seqp
This mode will upload sequencing primers onto Elab. The algorithm will check if the primer sequence already exists in the database, if yes the program does not upload or change the primer again and give you feedback about it If the Primer sequence cannot be identified a new entry is generated
Mode qpcr
This mode will upload qpcr primers onto Elab. The template here assumes a primer pair and a Probe If you do not have a Probe in your qPCR designs just leave the column empty
Similarity check will be done on the sequences of the primers and the probe Identical items will be patched, i.e. replaced by the information in the table If no item can be identified to be similar a new entry is generated
Mode rest
This mode will upload restriction enzymes onto Elab. Similarity check will be done based on the Supplier and the Ordernumber If the Restriction enzyme cannot be identified a new entry is generated, otherwise the item is skipped with a feedback
Mode plas
This mode will upload plasmids onto Elab. Similarity check will be done based on the Name/title of the entry If the Plasmid cannot be identified a new entry is generated, otherwise the item is skipped with a feedback
Mode cons
This mode will upload consumables (e.g. Chemicals, Tools, etc.) onto Elab. Similarity check will be done based on the Supplier and the Ordernumber. If the Restriction enzyme cannot be identified a new entry is generated, otherwise the item is skipped with a feedback
Running the algorithm
to test if your program runs go to a command line terminal move to the folder of the Elabloader and check is the elabloader.py file is executable
commandline
cd <PathtoElabloader>
./elabloader.py
if all libraries are installed successfully the following message should appear
```commandline All libraries loaded and ready
______ _ ____ _ ____ _____ ______ _____
| ____| | /\ | _ \| | / __ \ /\ | __ \| ____| __ \
| |__ | | / \ | |_) | | | | | | / \ | | | | |__ | |__) |
| __| | | / /\ \ | _ <| | | | | |/ /\ \ | | | | __| | _ /
| |____| |____ / ____ \| |_) | |___| |__| / ____ \| |__| | |____| | \ \
|______|______/_/ \_\____/|______\____/_/ \_\_____/|______|_| \_\
no arguments provided type --help for more information
```
Arguments and Flags
The program needs arguments to work; so-called "Flags". These are instructions you give via a dash. The following instructions are available and mandatory.
Please make sure you do not miss any, or the program will report back an error:
``` -k, --apikey API key as generated on the ElabFTW user panel needs to have write and read access
-u, --url to parse the url of the elab page.
-f, --file
-c, --cat_id to parse the numeric(int) category ID of the DB type you wish to upload. This can be found out on ELAB. In case of questions ask your administrator.
-m, --mode to select between type of import.
Modes available:
olig uploads Oligos for sgRNA generation
plas uploads Plasmid information
rest uploads restriction enzyme information
seqp uploads Sequencing primer information
qpcr uploads qpcr primer information
cons uploads consumable information
Each mode needs to be provided with a table one at a time.
The table needs to fulfill all the requirements found
in the readme.md and the ./Example folder to work properly.
```
Command examples
Now that you have learned about the flags, it's time to finally send the command. In the "Terminal", enter the following:
shell
./elabloader.py [Flags]
Before you ask, here is a pre-fabbed command:
shell
./elabloader.py --apikey <enteryourkey> \
--url <https://yourelab.yourelabsending.lab/api/v2/> \
--file <./Example/Example_cons.xlsx> \
--cat_id <numberofyourcatid>
For logging, you can dump the output to a file.
shell
./elabloader.py --apikey <enteryourkey> \
--url <https://yourelab.yourelabsending/api/v2/> \
--file </files/ForEndusers/ElabLoader/Input/example.xlsx> \
--cat_id <numberofyourcatid> > Debug/output.log
Legal and Credits
This Script is published under BSD-3-Clause Year 2024 Copyright Holder A. Chiocchetti
ELABLOADER was created by:
Owner
- Name: MolGenLab_CAPPP_FFM
- Login: KJPMolgenLab
- Kind: organization
- Repositories: 2
- Profile: https://github.com/KJPMolgenLab
Citation (CITATION.cff)
# This CITATION.cff file was generated with cffinit.
# Visit https://bit.ly/cffinit to generate yours today!
cff-version: 1.2.0
title: Elabloader
message: >-
python script to upload tabluar data as resources into
elabFTW via APIv2
type: software
authors:
- given-names: Andreas G.
family-names: Chiocchetti
email: andres.chiocchetti@med.uni-frankfurtde
affiliation: 'Goethe University '
orcid: 'https://orcid.org/0000-0002-7329-9985'
- given-names: Luca
family-names: Fries
affiliation: Goethe University
identifiers:
- type: url
value: 'https://github.com/KJPMolgenLab/ELAB_LOADER'
description: Git repository
repository-code: 'https://github.com/KJPMolgenLab/ELAB_LOADER'
keywords:
- elabFTW
license: BSD-3-Clause
GitHub Events
Total
- Watch event: 1
- Push event: 1
Last Year
- Watch event: 1
- Push event: 1
Dependencies
- certifi ==2024.2.2
- charset-normalizer ==3.3.2
- elabapi-python ==5.0.2
- elabapy ==1.1.0
- idna ==3.7
- numpy ==1.26.4
- pandas ==2.2.2
- progress ==1.6
- python-dateutil ==2.9.0.post0
- pytz ==2024.1
- requests ==2.31.0
- setuptools ==69.5.1
- six ==1.16.0
- tzdata ==2024.1
- urllib3 ==2.2.1
- validators ==0.28.1
- wheel ==0.43.0