API reference
- class seqreport.SeqCollection(records, cost_per_base=0.25, cost_per_seq=0, currency_symbol='£', projectname='', comments='', min_length=100, max_length=3000, name_length=15, assembly_plan='', fasta_name='')
Class to store basic properties of a collection of sequences.
- Parameters:
records (list) – A list of Biopython SeqRecords.
cost_per_base (float) – Cost per nucleotide base.
cost_per_seq (float) – Fix overhead cost for each sequence part (cloning, delivery costs etc).
currency_symbol (str) – The currency symbol (or string) to display in the report.
projectname (str) – The name of the project.
comments (str) – Any comments to be included in the report.
min_length (int) – Check that all sequences are at least this long.
max_length (int) – Check that all sequences are at most this long.
name_length (int) – Check which sequence IDs are longer than this cutoff. Genbank has a character limit.
assembly_plan (str, optional) – Optional assembly plan CSV path for calculating savings by re-using DNA parts.
fasta_name (str, optional) – Optional name of the FASTA file for easy identification.
- class seqreport.read_fasta(fasta)
Read a FASTA sequence file into a list of records.
- Parameters:
fasta (str) – The FASTA filepath.
- class seqreport.seqcollection_from_csv(csv_file, records=None, param_dict={})
Create a SeqCollection, using parameters in a CSV file.
The CSV file parameters override the default class parameters, and this function’s parameters override the CSV file parameters. Either a FASTA file (in the CSV or in param_dict) or a list of SeqRecords must be specified. For the parameter descriptions, see parameters in the docstring of SeqCollection, except records and fasta_name.
- class seqreport.write_pdf_report(target, seqcollection)
Write a sequence collection report with a PDF summary.
- Parameters:
target (str) – Path for PDF file.
seqcollection (SeqCollection) – A SeqCollection instance.