generate

This command generates an ELISpot experiment configuration.

usage: ace generate [-h]
    (--num-peptides NUM_PEPTIDES | --peptides-file PEPTIDES_FILE)
    --num-peptides-per-pool NUM_PEPTIDES_PER_POOL
    --num-coverage NUM_COVERAGE
    --output-excel-file OUTPUT_EXCEL_FILE
    [--plate-size PLATE_SIZE]
    [--mode {golfy,cpsat_solver}]
    [--cluster-peptides CLUSTER_PEPTIDES]
    [--sequence-similarity-function {cosine,euclidean,levenshtein}]
    [--sequence-similarity-threshold SEQUENCE_SIMILARITY_THRESHOLD]
    [--golfy-random-seed GOLFY_RANDOM_SEED]
    [--golfy-max-iters GOLFY_MAX_ITERS]
    [--golfy-strategy {greedy,random,valid,singleton,repeat}]
    [--golfy-allow-extra-pools {True,False}]
    [--cpsat-solver-num-processes CPSAT_SOLVER_NUM_PROCESSES]
    [--cpsat-solver-shuffle-iters CPSAT_SOLVER_SHUFFLE_ITERS]
    [--cpsat-solver-max-peptides-per-block CPSAT_SOLVER_MAX_PEPTIDES_PER_BLOCK]
    [--cpsat-solver-max-peptides-per-pool CPSAT_SOLVER_MAX_PEPTIDES_PER_POOL]
    [--verbose VERBOSE]
Required Parameter Description
--num-peptides Total number of peptides.
--peptides-file Peptides file (.csv or .xlsx) with the following expected columns: peptide_id, peptide_sequence. Please note that only either this parameter or --num-peptides can be supplied. An example .xlsx file can be found here
--num-peptides-per-pool Number of peptides per pool
--num-coverage Coverage (i.e. number of peptide replicates).
--output-excel-file Output Excel (.xlsx) file.
Optional Parameter Description
--plate-size Number of wells on plate. Allowed values: 24, 48, 96, 384 (default: 96).
--mode Configuration generation mode. Allowed values: golfy, cpsat_solver (default: golfy).
--cluster-peptides Cluster peptides if set to true (default: true).
--sequence-similarity-function Sequence similarity function. Allowed values: cosine, euclidean, levenshtein (default: euclidean).
--sequence-similarity-threshold Sequence similarity threshold (default: 0.7). A higher threshold leads to more stringent peptide pairing. Values can range form 0.0 to 1.0.
--verbose If True, prints messages. Otherwise, messages are not printed (default: True).


The following optional parameters apply when --mode golfy

Optional Parameter Description
--golfy-random-seed Random seed for golfy (default: 42).
--golfy-max-iters Number of maximum iterations for golfy (default: 2000).
--golfy-strategy Strategy for golfy. Allowed value (default: greedy).
--golfy-allow-extra-pools Allow extra pools for golfy (default: False).


The following optional parameters apply when --mode cpsat_solver

Optional Parameter Description
--cpsat-solver-num-processes Number of processes for CP-SAT solver (default: 2).
--cpsat-solver-shuffle-iters Number of iterations to shuffle pool IDs to minimize number of non-unique pool assignment violations for CP-SAT solver (default: 1000).
--cpsat-solver-max-peptides-per-block Maximum number of peptides per block (default: 100).
The CPSAT-solver divides peptides into the specified number of peptides if the total number of peptides is bigger than the specified number
(e.g. 220 peptides are divided into 2 blocks of 100 peptides and 1 block of 20 peptides if –max-peptides-per-block is 100).
Increasing this number from the current default value will likely make the computation intractable so it is recommended that you keep this at 100.
--cpsat-solver-max-peptides-per-pool Maximum number of peptides per pool (default: 10). Increasing this number from the current default value will likely make the computation intractable so it is recommended that you keep this at 10.

Example

In the example below, you want to generate an ELISpot configuration that pools 5 peptides per pool (i.e. well) for a total of 25 unique peptides specified in a file named 25peptide_sequences.xlsx. You also want to repeat each peptide 3 times (i.e. 3x coverage); each peptide will appear in 3 different pools.

ace generate \
  --peptides-file 25peptide_sequences.xlsx \
  --num-peptides-per-pool 5 \
  --num-coverage 3 \
  --output-excel-file 25peptides_5perpool_3x_configuration.xlsx

Running the above example will result in the following output file: 25peptides_5perpool_3x_configuration.xlsx