LIMS module
Benchling API module
Easy to use benchling functions to fetch sequences and objects
- constrain.lims.benchling_api.from_benchling(bname: str, schema: str = '')[source]
Extract information of object on benchling. Parameters: ———– bname : str
The name of the object on Benchling.
- schemastr, optional
The schema of the object, by default “”
Returns:
- object :
The extracted object from Benchling.
- constrain.lims.benchling_api.sequence_to_benchling(folder_name, oligo_name, oligo_bases, schema)[source]
This function uploads sequences to Benchling. Parameters: ———- folder_name : str
The name of the folder in which to upload the sequence.
- oligo_namestr
The name of the oligo.
- oligo_basesstr
The base sequence of the oligo.
- schemastr
The schema to use for the oligo. Should be one of the following: “Primer”, “DNA Fragment”, “Plasmid”, “Gene”, “gRNA”, “Marker”,”Promoter”, “Terminator”, “Tag”, “Origin of Replication”.
Returns:
None
- constrain.lims.benchling_api.session = <benchlingapi.session.Session object>
This part of the LIMS module is used for importing sequences and exporting sequences to benchling
- constrain.lims.benchling_api.update_loc_vol_conc(seqRecord, DBpath: str = '')[source]
Update with location volume and concentration information downloaded from benchling if possible. Parameters: ———– seqRecord : Bio.SeqRecord.SeqRecord
The SeqRecord object to update.
- DBpathstr, optional
The path to the csv file containing the location, volume and concentration information.
Returns:
- seqRecordBio.SeqRecord.SeqRecord
The updated SeqRecord object.
CSV database module
Easy to use functions to fetch sequences and objects from local csv database
- constrain.lims.csv_database.add_annotations(list_of_parts: list, concentration: float = 0.0, reference: str = '', volume: float = 0.0, comments: str = '', location: str = '') list[source]
Adds the neccessary annotations to a list of SeqRecord objects to be uploaded to the database
- constrain.lims.csv_database.add_sequences_to_dataframe(list_of_DNA: list, csv_database_as_df, index=0) None[source]
Adds sequences to local csv databse.
- Parameters:
list_of_DNA (list) – BioSeqrecord objects
csv_database_as_df (pd.DataFrame) – your temporary csv database made into a pandas dataframe
index (int) – designating which index you want the dna i.e could choose index= 288 which is plate 3 A1
- Returns:
updates the dateframe with your sequences
- Return type:
None
- constrain.lims.csv_database.add_unique_ids(list_of_parts: list, path='../data/csv_database') None[source]
Adds unique ids to a list of SeqRecords.
- constrain.lims.csv_database.change_row(row_index: int, csv_database_as_df, biopython_object)[source]
inserts a biopyton object into the database at a specific index
- constrain.lims.csv_database.delete_row_df(row_index, which_df)[source]
Deletes a row in the database without changing the namse of
- constrain.lims.csv_database.get_box(box_number: int, csv_database_as_df)[source]
Returns the plate from a specified csv_database. :param box_number: designating which plate to fetch :type box_number: int :param csv_database_as_df: your temporary csv database made into a pandas dataframe :type csv_database_as_df: pd.DataFrame
- Returns:
dataframe with the specified plate
- Return type:
pd.Dataframe
- constrain.lims.csv_database.get_database(name: str, path='../data/csv_database/')[source]
Fetches the csv database as a pd.dataframe
- constrain.lims.csv_database.get_dna_from_box_name(name: str, database_name: str, database_path='../data/csv_database/', genbank_files_path='../data/genbank_files/', genbank=False) SeqRecord[source]
fetch dna based on the name from the BOX database of choice.
- Parameters:
name (str) – name of the sequence you want to fetch
database_name (str) – name of the database u want the sequence to be fetched from
genbank_files_path (str) – filepath to your genbank files
genbank (bool) – if True the function will fetch thegenbank file based on the unique ID.
- Returns:
Record – biopython object with values attached to its instances.
- Return type:
Bio.SeqRecord
- constrain.lims.csv_database.get_dna_from_plate_name(name: str, database_name: str, database_path='../data/csv_database/', genbank_files_path='../data/genbank_files/', genbank=False) SeqRecord[source]
fetch dna based on the name from the PLATE database of choice.
- Parameters:
name (str) – name of the sequence you want to fetch
database_name (str) – name of the database u want the sequence to be fetched from
genbank_files_path (str) – filepath to your genbank files
genbank (bool) – if True the function will fetch thegenbank file based on the unique ID.
- Returns:
Record – biopython object with values attached to its instances.
- Return type:
Bio.SeqRecord
- constrain.lims.csv_database.get_plate(plate_number: int, csv_database_as_df)[source]
Returns the plate from a specified csv_database. :param plate_number: designating which plate to fetch :type plate_number: int :param csv_database_as_df: your temporary csv database made into a pandas dataframe :type csv_database_as_df: pd.DataFrame
- Returns:
dataframe with the specified plate
- Return type:
pd.Dataframe