API reference#
Generated from the docstrings, so it cannot drift from the code.
Orders#
the order: a collection of oligos, written out as an IDT bulk-order .xlsx.
- class py_idt_order.idt_order.IDTOrder(scale=None, purification=None, output_dir=None)#
Bases:
objectPython representation of an IDT bulk oligonucleotide order.
- Variables:
scale (str) – The default IDT scale code for oligos on this order.
purification (str) – The default IDT purification code for oligos on this order.
output_dir (str) – The path to the directory where .xlsx files will be stored.
oligos (list) – A list of Oligo objects on this order.
num_oligos (int) – The number of oligos on this order.
- add_oligo(name, seq, scale=None, purification=None)#
Add a new Oligo object to an IDT bulk oligo order.
- Parameters:
name (str) – The name of the oligo to be used when ordering the oligo.
seq (str) – This oligo’s sequence.
scale (str) – Optionally override the default IDT scale code for this oligo.
purification (str) – Optionally override the default IDT purification code for this oligo.
- Returns:
None
- save(path=None)#
Creates an .xlsx file to be uploaded to IDT’s website to create a bulk oligo order.
- Parameters:
path (str) – Optionally write to this exact file instead of a timestamped name in
output_dir. Parent directories are created if needed.- Returns:
str – The path of the file that was written.
- settings = {'output_dir': 'IDT_xlsx_output', 'purification': 'STD', 'scale': '25nm'}#
Oligos#
a single oligo on an order, with its scale and purification validated.
- class py_idt_order.oligo.Oligo(name, seq, scale, purification)#
Bases:
objectPython representation of an IDT oligonucleotide to be ordered.
- Variables:
name (str) – The name of the oligo to be used when ordering the oligo.
seq (str) – This oligo’s sequence.
scale (str) – The IDT scale code to be used when ordering the oligo.
purification (str) – The IDT purification code to be used when ordering the oligo.
length (int) – The length of this oligo’s sequence.
Helpers#
helpers for reporting the valid scale and purification codes.
- py_idt_order.utils.get_purifications()#
Helper function to display valid IDT oligo purification options.
- py_idt_order.utils.get_scales()#
Helper function to display valid IDT oligo scale options.
- py_idt_order.utils.purification_codes()#
The valid IDT purification codes, comma separated.
- Returns:
str – suited to an error message; see get_purifications() for the full table.
- py_idt_order.utils.scale_codes()#
The valid IDT scale codes, comma separated.
- Returns:
str –
- e.g. “25nm, 100nm, 250nm”. Suited to an error message; use get_scales() for the
full table a human reads.
Defaults#
default order settings, and the IDT scale and purification code tables.