changeo.Gene¶
Gene annotations
-
changeo.Gene.
buildClonalGermline
(receptors, references, seq_field='sequence_imgt', v_field='v_call', d_field='d_call', j_field='j_call', amino_acid=False)¶ Determine consensus clone sequence and create germline for clone
- Parameters
receptors (changeo.Receptor.Receptor) – list of Receptor objects
references (dict) – dictionary of IMGT gapped germline sequences
seq_field (str) – Receptor attribute in which to look for sequence
v_field (str) – Receptor attributein which to look for V call
d_field (str) – Receptor attributein which to look for D call
j_field (str) – Receptor attributein which to look for J call
amino_acid (bool) – if True then use the amino acid positional fields, otherwise use the nucleotide fields.
- Returns
- log dictionary, dictionary of {germline_type: germline_sequence},
dictionary of consensus {segment: gene call}
- Return type
-
changeo.Gene.
buildGermline
(receptor, references, seq_field='sequence_imgt', v_field='v_call', d_field='d_call', j_field='j_call', amino_acid=False)¶ Join gapped germline sequences aligned with sample sequences
- Parameters
receptor (changeo.Receptor.Receptor) – Receptor object.
references (dict) – dictionary of IMGT gapped germline sequences.
seq_field (str) – Receptor attribute in which to look for sequence.
v_field (str) – Receptor attribute in which to look for V call.
d_field (str) – Receptor attribute in which to look for V call.
j_field (str) – Receptor attribute in which to look for V call.
amino_acid (bool) – if True then use the amino acid positional fields, otherwise use the nucleotide fields.
- Returns
log dictionary, dictionary of {germline_type: germline_sequence}, dictionary of {segment: gene call}
- Return type
-
changeo.Gene.
getAllele
(gene, action='first')¶ Extract allele from gene call string
-
changeo.Gene.
getAlleleNumber
(gene, action='first')¶ Extract allele number from gene call string
-
changeo.Gene.
getCGene
(gene, action='first')¶ Extract C-region gene from gene call string
-
changeo.Gene.
getDAllele
(gene, action='first')¶ Extract D allele gene from gene call string
-
changeo.Gene.
getDGermline
(receptor, references, d_field='d_call', amino_acid=False)¶ Extract D allele and germline sequence
- Parameters
receptor (changeo.Receptor.Receptor) – Receptor object
references (dict) – dictionary of germline sequences
d_field (str) – Receptor attribute containing the D allele assignment
amino_acid (bool) – if True then use the amino acid positional fields, otherwise use the nucleotide fields.
- Returns
D allele name, D segment germline sequence
- Return type
-
changeo.Gene.
getFamily
(gene, action='first')¶ Extract family from gene call string
-
changeo.Gene.
getGene
(gene, action='first')¶ Extract gene from gene call string
-
changeo.Gene.
getJAllele
(gene, action='first')¶ Extract J allele gene from gene call string
-
changeo.Gene.
getJGermline
(receptor, references, j_field='j_call', amino_acid=False)¶ Extract J allele and germline sequence
- Parameters
receptor (changeo.Receptor.Receptor) – Receptor object
references (dict) – dictionary of germline sequences
j_field (str) – Receptor attribute containing the J allele assignment
amino_acid (bool) – if True then use the amino acid positional fields, otherwise use the nucleotide fields.
- Returns
J allele name, J segment germline sequence
- Return type
-
changeo.Gene.
getLocus
(gene, action='first')¶ Extract locus from gene call string
-
changeo.Gene.
getVAllele
(gene, action='first')¶ Extract V allele gene from gene call string
-
changeo.Gene.
getVGermline
(receptor, references, v_field='v_call', amino_acid=False)¶ Extract V allele and germline sequence
- Parameters
receptor (changeo.Receptor.Receptor) – Receptor object
references (dict) – dictionary of germline sequences
v_field (str) – Receptor attribute containing the V allele assignment
amino_acid (bool) – if True then use the amino acid positional fields, otherwise use the nucleotide fields.
- Returns
V allele name, V segment germline sequence
- Return type
-
changeo.Gene.
parseGeneCall
(gene, regex, action='first')¶ Extract alleles from strings
- Parameters
- Returns
String of the allele when action is ‘first’; tuple: Tuple of allele calls for ‘set’ or ‘list’ actions.
- Return type
-
changeo.Gene.
stitchRegions
(receptor, v_seq, d_seq, j_seq, amino_acid=False)¶ Assemble full length region encoding
- Parameters
receptor (changeo.Receptor.Receptor) – Receptor object
v_seq (str) – V segment germline sequence as a string
d_seq (str) – D segment germline sequence as a string
j_seq (str) – J segment germline sequence as a string
amino_acid (bool) – if True use amino acid positional fields, otherwise use nucleotide fields.
- Returns
string defining germline regions
- Return type
-
changeo.Gene.
stitchVDJ
(receptor, v_seq, d_seq, j_seq, amino_acid=False)¶ Assemble full length germline sequence
- Parameters
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
full germline sequence
- Return type