def stitchVDJ(receptor, v_seq, d_seq, j_seq, amino_acid=False):
    """
    Assemble full length germline sequence

    Arguments:
      receptor (changeo.Receptor.Receptor): Receptor object
      v_seq (str): V segment sequence as a string
      d_seq (str): D segment sequence as a string
      j_seq (str): J segment sequence as a string
      amino_acid (bool): if True use X for N/P regions and amino acid positional fields,
                         otherwise use N and nucleotide fields.

    Returns:
      str: full germline sequence
    """
    if not amino_acid:
        np_char = 'N'
        try:
            np1_len = int(receptor.np1_length)
        except (TypeError, ValueError):
            np1_len = 0
        try:
            np2_len = int(receptor.np2_length)
        except (TypeError, ValueError):
            np2_len = 0
    else:
        np_char = 'X'
        try:
            np1_len = int(receptor.np1_aa_length)
        except (TypeError, ValueError, AttributeError):
            np1_len = 0
        try:
            np2_len = int(receptor.np2_aa_length)
        except (TypeError, ValueError, AttributeError):
            np2_len = 0
    sequence = v_seq
    sequence += np_char * np1_len
    sequence += d_seq
    sequence += np_char * np2_len
    sequence += j_seq
    return sequence
