def _extract_cdr3_nucseq_from_adaptive(adapt):
    """
    Extracts the nucleotide sequence coding the CDR3, defined as starting at
    canonical V-gene Cystine Residue

    Parameters
    ----------
    adapt : collections.namedtuple
        instance of named tuple of fields expected in an adaptive file

    Returns
    -------
    cdr3_b_nucseq : str

    Notes
    -----

    ADAPTIVE's output does not provide explict indices for the cdr3 nucleotide
    sequence. Thus, we use the length of the amino acid sequence
    and the start index of cys_residue (see page 18 of their
    manual for 'v_index' defining the start of Cys residue, 'jIndex' is
    start of J gene.

    """
    length_cdr3_nucseq = len(adapt.aminoAcid)*3
    cys_residue    = int(adapt.vIndex)
    start_J_gene   = int(adapt.jIndex)

    length_partial_nuc = len(adapt.nucleotide[cys_residue:start_J_gene])
    remaining_length_nuc = length_cdr3_nucseq - length_partial_nuc
    end_index = start_J_gene + remaining_length_nuc

    cdr3_nucseq = adapt.nucleotide[cys_residue:end_index]
    return cdr3_nucseq