def get_pairs(db, collection, experiment=None, subject=None, group=None, name='<STR_LIT>',<EOL>delim=None, delim_occurance=<NUM_LIT:1>, pairs_only=False, h_selection_func=None, l_selection_func=None):
match = {}<EOL>if subject is not None:<EOL><INDENT>if type(subject) in (list, tuple):<EOL><INDENT>match['<STR_LIT>'] = {'<STR_LIT>': subject}<EOL><DEDENT>elif type(subject) in STR_TYPES:<EOL><INDENT>match['<STR_LIT>'] = subject<EOL><DEDENT><DEDENT>if group is not None:<EOL><INDENT>if type(group) in (list, tuple):<EOL><INDENT>match['<STR_LIT>'] = {'<STR_LIT>': group}<EOL><DEDENT>elif type(group) in STR_TYPES:<EOL><INDENT>match['<STR_LIT>'] = group<EOL><DEDENT><DEDENT>if experiment is not None:<EOL><INDENT>if type(experiment) in (list, tuple):<EOL><INDENT>match['<STR_LIT>'] = {'<STR_LIT>': experiment}<EOL><DEDENT>elif type(experiment) in STR_TYPES:<EOL><INDENT>match['<STR_LIT>'] = experiment<EOL><DEDENT><DEDENT>seqs = list(db[collection].find(match))<EOL>return assign_pairs(seqs, name=name, delim=delim,<EOL>delim_occurance=delim_occurance, pairs_only=pairs_only,<EOL>h_selection_func=h_selection_func, l_selection_func=l_selection_func)<EOL>
Gets sequences and assigns them to the appropriate mAb pair, based on the sequence name.

Inputs:

::db:: is a pymongo database connection object
::collection:: is the collection name, as a string
If ::subject:: is provided, only sequences with a 'subject' field matching ::subject:: will
    be included. ::subject:: can be either a single subject (as a string) or an iterable
    (list or tuple) of subject strings.
If ::group:: is provided, only sequences with a 'group' field matching ::group:: will
    be included. ::group:: can be either a single group (as a string) or an iterable
    (list or tuple) of group strings.
::name:: is the dict key of the field to be used to group the sequences into pairs.
    Default is 'seq_id'
::delim:: is an optional delimiter used to truncate the contents of the ::name:: field.
    Default is None, which results in no name truncation.
::delim_occurance:: is the occurance of the delimiter at which to trim. Trimming is performed
    as delim.join(name.split(delim)[:delim_occurance]), so setting delim_occurance to -1 will
    trucate after the last occurance of delim. Default is 1.
::pairs_only:: setting to True results in only truly paired sequences (pair.is_pair == True)
    will be returned. Default is False.

Returns a list of Pair objects, one for each mAb pair.