changeo.Receptor

Sequence manipulation and annotation functions

class changeo.Receptor.IgRecord(row, genotyped=True)

Bases: object

A class defining a V(D)J germline sequence alignment

getAlleleCalls(calls, action='first')

Get multiple allele calls

Parameters:
  • calls – iterable of calls to get; one or more of (‘v’,’d’,’j’)
  • actions – One of (‘first’,’set’)
Returns:

List of requested calls in order

Return type:

list

getDAllele(action='first')

D-region allele getter

Parameters:actions – One of (‘first’,’set’)
Returns:String of the allele when action is ‘first’; tuple : Tuple of allele calls for ‘set’ or ‘list’ actions.
Return type:str
getDFamily(action='first')

D-region family getter

Parameters:actions – One of (‘first’,’set’)
Returns:String of the allele when action is ‘first’; tuple : Tuple of allele calls for ‘set’ or ‘list’ actions.
Return type:str
getDGene(action='first')

D-region gene getter

Parameters:actions – One of (‘first’,’set’)
Returns:String of the allele when action is ‘first’; tuple : Tuple of allele calls for ‘set’ or ‘list’ actions.
Return type:str
getFamilyCalls(calls, action='first')

Get multiple family calls

Parameters:
  • calls – iterable of calls to get; one or more of (‘v’,’d’,’j’)
  • actions – One of (‘first’,’set’)
Returns:

List of requested calls in order

Return type:

list

getField(field)

Get a field value by column name and return it as a string

Parameters:field – Column name
Returns:Value in the field as a string
Return type:str
getGeneCalls(calls, action='first')

Get multiple gene calls

Parameters:
  • calls – iterable of calls to get; one or more of (‘v’,’d’,’j’)
  • actions – One of (‘first’,’set’)
Returns:

List of requested calls in order

Return type:

list

getJAllele(action='first')

J-region allele getter

Parameters:actions – One of (‘first’,’set’)
Returns:String of the allele when action is ‘first’; tuple : Tuple of allele calls for ‘set’ or ‘list’ actions.
Return type:str
getJFamily(action='first')

J-region family getter

Parameters:actions – One of (‘first’,’set’)
Returns:String of the allele when action is ‘first’; tuple : Tuple of allele calls for ‘set’ or ‘list’ actions.
Return type:str
getJGene(action='first')

J-region gene getter

Parameters:actions – One of (‘first’,’set’)
Returns:String of the allele when action is ‘first’; tuple : Tuple of allele calls for ‘set’ or ‘list’ actions.
Return type:str
getSeqField(field)

Get a field value converted to a Seq object by column name

Parameters:field – Column name
Returns:Value in the field as a Seq object
Return type:Seq
getVAllele(action='first')

V-region allele getter

Parameters:actions – One of (‘first’,’set’)
Returns:String of the allele when action is ‘first’; tuple : Tuple of allele calls for ‘set’ or ‘list’ actions.
Return type:str
getVFamily(action='first')

V-region family getter

Parameters:actions – One of (‘first’,’set’)
Returns:String of the allele when action is ‘first’; tuple : Tuple of allele calls for ‘set’ or ‘list’ actions.
Return type:str
getVGene(action='first')

V-region gene getter

Parameters:actions – One of (‘first’,’set’)
Returns:String of the allele when action is ‘first’; tuple : Tuple of allele calls for ‘set’ or ‘list’ actions.
Return type:str
toDict()
changeo.Receptor.parseAllele(alleles, regex, action='first')

Extract alleles from strings

Parameters:
  • alleles – string with allele calls
  • regex – compiled regular expression for allele match
  • action – action to perform for multiple alleles; one of (‘first’, ‘set’, ‘list’).
Returns:

String of the allele when action is ‘first’; tuple : Tuple of allele calls for ‘set’ or ‘list’ actions.

Return type:

str