dipper.models.Genotype module

class dipper.models.Genotype.Genotype(graph)

Bases: object

These methods provide convenient methods to add items related to a genotype and it’s parts to a supplied graph. They follow the patterns set out in GENO https://github.com/monarch-initiative/GENO-ontology. For specific sequence features, we use the GenomicFeature class to create them.

addAffectedLocus(allele_id, gene_id, rel_id=None)

We make the assumption here that if the relationship is not provided, it is a GENO:is_sequence_variant_instance_of.

Here, the allele should be a variant_locus, not a sequence alteration. :param allele_id: :param gene_id: :param rel_id: :return:

addAllele(allele_id, allele_label, allele_type=None, allele_description=None)

Make an allele object. If no allele_type is added, it will default to a geno:allele :param allele_id: curie for allele (required) :param allele_label: label for allele (required) :param allele_type: id for an allele type (optional, recommended SO or GENO class) :param allele_description: a free-text description of the allele :return:

addAlleleOfGene(allele_id, gene_id, rel_id=None)

We make the assumption here that if the relationship is not provided, it is a GENO:is_sequence_variant_instance_of.

Here, the allele should be a variant_locus, not a sequence alteration. :param allele_id: :param gene_id: :param rel_id: :return:

addChromosome(chr, tax_id, tax_label=None, build_id=None, build_label=None)

if it’s just the chromosome, add it as an instance of a SO:chromosome, and add it to the genome. If a build is included, punn the chromosome as a subclass of SO:chromsome, and make the build-specific chromosome an instance of the supplied chr. The chr then becomes part of the build or genome.

addChromosomeClass(chrom_num, taxon_id, taxon_label)
addChromosomeInstance(chr_num, reference_id, reference_label, chr_type=None)

Add the supplied chromosome as an instance within the given reference :param chr_num: :param reference_id: for example, a build id like UCSC:hg19 :param reference_label: :param chr_type: this is the class that this is an instance of. typically a genome-specific chr

Returns:
addConstruct(construct_id, construct_label, construct_type=None, construct_description=None)
addDerivesFrom(child_id, parent_id)

We add a derives_from relationship between the child and parent id. Examples of uses include between: an allele and a construct or strain here, a cell line and it’s parent genotype. Adding the parent and child to the graph should happen outside of this function call to ensure graph integrity. :param child_id: :param parent_id: :return:

addGene(gene_id, gene_label, gene_type=None, gene_description=None)
addGeneProduct(sequence_id, product_id, product_label=None, product_type=None)

Add gene/variant/allele has_gene_product relationship Can be used to either describe a gene to transcript relationship or gene to protein :param sequence_id: :param product_id: :param product_label: :param product_type: :return:

addGeneTargetingReagent(reagent_id, reagent_label, reagent_type, gene_id, description=None)

Here, a gene-targeting reagent is added. The actual targets of this reagent should be added separately. :param reagent_id: :param reagent_label: :param reagent_type:

Returns:
addGeneTargetingReagentToGenotype(reagent_id, genotype_id)
addGenome(taxon_id, taxon_label=None)
addGenomicBackground(background_id, background_label, background_type=None, background_description=None)
addGenomicBackgroundToGenotype(background_id, genotype_id, background_type=None)
addGenotype(genotype_id, genotype_label, genotype_type=None, genotype_description=None)

If a genotype_type is not supplied, we will default to ‘intrinsic_genotype’ :param genotype_id: :param genotype_label: :param genotype_type: :param genotype_description: :return:

addMemberOfPopulation(member_id, population_id)
addParts(part_id, parent_id, part_relationship=None)

This will add a has_part (or subproperty) relationship between a parent_id and the supplied part. By default the relationship will be BFO:has_part, but any relationship could be given here. :param part_id: :param parent_id: :param part_relationship: :return:

addPartsToVSLC(vslc_id, allele1_id, allele2_id, zygosity_id=None, allele1_rel=None, allele2_rel=None)

Here we add the parts to the VSLC. While traditionally alleles (reference or variant loci) are traditionally added, you can add any node (such as sequence_alterations for unlocated variations) to a vslc if they are known to be paired. However, if a sequence_alteration’s loci is unknown, it probably should be added directly to the GVC. :param vslc_id: :param allele1_id: :param allele2_id: :param zygosity_id: :param allele1_rel: :param allele2_rel: :return:

addPolypeptide(polypeptide_id, polypeptide_label=None, transcript_id=None, polypeptide_type=None)
Parameters:
  • polypeptide_id
  • polypeptide_label
  • polypeptide_type
  • transcript_id
Returns:

addReagentTargetedGene(reagent_id, gene_id, targeted_gene_id=None, targeted_gene_label=None, description=None)

This will create the instance of a gene that is targeted by a molecular reagent (such as a morpholino or rnai). If an instance id is not supplied, we will create it as an anonymous individual which is of the type GENO:reagent_targeted_gene. We will also add the targets relationship between the reagent and gene class.

<targeted_gene_id> a GENO:reagent_targeted_gene rdf:label targeted_gene_label dc:description description <reagent_id> GENO:targets_instance_of <gene_id>

Parameters:
  • reagent_id
  • gene_id
  • targeted_gene_id
Returns:

addReferenceGenome(build_id, build_label, taxon_id)
addSequenceAlteration(sa_id, sa_label, sa_type=None, sa_description=None)
addSequenceAlterationToVariantLocus(sa_id, vl_id)
addSequenceDerivesFrom(child_id, parent_id)
addTargetedGeneComplement(tgc_id, tgc_label, tgc_type=None, tgc_description=None)
addTargetedGeneSubregion(tgs_id, tgs_label, tgs_type=None, tgs_description=None)
addTaxon(taxon_id, genopart_id)

The supplied geno part will have the specified taxon added with RO:in_taxon relation. Generally the taxon is associated with a genomic_background, but could be added to any genotype part (including a gene, regulatory element, or sequence alteration). :param taxon_id: :param genopart_id:

Returns:
addVSLCtoParent(vslc_id, parent_id)

The VSLC can either be added to a genotype or to a GVC. The vslc is added as a part of the parent. :param vslc_id: :param parent_id: :return:

annotation_properties = {'altered_nucleotide': 'GENO:altered_nucleotide', 'reference_amino_acid': 'GENO:reference_amino_acid', 'reference_nucleotide': 'GENO:reference_nucleotide', 'results_in_amino_acid_change': 'GENO:results_in_amino_acid_change'}
genoparts = {'QTL': 'SO:0000771', 'RNAi_reagent': 'SO:0000337', 'allele': 'GENO:0000512', 'biological_region': 'SO:0001411', 'cDNA': 'SO:0000756', 'coding_transgene_feature': 'GENO:0000638', 'cytogenetic marker': 'SO:0000341', 'deletion': 'SO:0000159', 'duplication': 'SO:1000035', 'effective_genotype': 'GENO:0000525', 'extrinsic_genotype': 'GENO:0000524', 'family': 'PCO:0000020', 'female_genotype': 'GENO:0000647', 'gene': 'SO:0000704', 'genomic_background': 'GENO:0000611', 'genomic_variation_complement': 'GENO:0000009', 'heritable_phenotypic_marker': 'SO:0001500', 'insertion': 'SO:0000667', 'intrinsic_genotype': 'GENO:0000000', 'inversion': 'SO:1000036', 'karyotype_variation_complement': 'GENO:0000644', 'male_genotype': 'GENO:0000646', 'missense_variant': 'SO:0001583', 'ncRNA_gene': 'SO:0001263', 'point_mutation': 'SO:1000008', 'polypeptide': 'SO:0000104', 'population': 'PCO:0000001', 'protein_coding_gene': 'SO:0001217', 'pseudogene': 'SO:0000336', 'reagent_targeted_gene': 'GENO:0000504', 'reference_locus': 'GENO:0000036', 'regulatory_transgene_feature': 'GENO:0000637', 'sequence_alteration': 'SO:0001059', 'sequence_feature': 'SO:0000110', 'sequence_variant_affecting_polypeptide_function': 'SO:1000117', 'sequence_variant_causing_gain_of_function_of_polypeptide': 'SO:1000125', 'sequence_variant_causing_inactive_catalytic_site': 'SO:1000120', 'sequence_variant_causing_loss_of_function_of_polypeptide': 'SO:1000118', 'sex_qualified_genotype': 'GENO:0000645', 'substitution': 'SO:1000002', 'tandem_duplication': 'SO:1000173', 'targeted_gene_complement': 'GENO:0000527', 'targeted_gene_subregion': 'GENO:0000534', 'transcript': 'SO:0000233', 'transgene': 'SO:0000902', 'transgenic_insertion': 'SO:0001218', 'translocation': 'SO:0000199', 'unspecified_genomic_background': 'GENO:0000649', 'variant_locus': 'GENO:0000002', 'variant_single_locus_complement': 'GENO:0000030', 'wildtype': 'GENO:0000511'}
makeGenomeID(taxon_id)
make_experimental_model_with_genotype(genotype_id, genotype_label, taxon_id, taxon_label)
make_variant_locus_label(gene_label, allele_label)
make_vslc_label(gene_label, allele1_label, allele2_label)

Make a Variant Single Locus Complement (VSLC) in monarch-style. :param gene_label: :param allele1_label: :param allele2_label: :return:

object_properties = {'derives_from': 'RO:0001000', 'derives_sequence_from_gene': 'GENO:0000639', 'has_affected_locus': 'GENO:0000418', 'has_alternate_part': 'GENO:0000382', 'has_gene_product': 'RO:0002205', 'has_genotype': 'GENO:0000222', 'has_member_with_allelotype': 'GENO:0000225', 'has_part': 'BFO:0000051', 'has_phenotype': 'RO:0002200', 'has_reference_part': 'GENO:0000385', 'has_sex_agnostic_genotype_part': 'GENO:0000650', 'has_variant_part': 'GENO:0000382', 'has_zygosity': 'GENO:0000608', 'in_taxon': 'RO:0002162', 'is_allelotype_of': 'GENO:0000206', 'is_mutant_of': 'GENO:0000440', 'is_reference_instance_of': 'GENO:0000610', 'is_sequence_variant_instance_of': 'GENO:0000408', 'is_targeted_expression_variant_of': 'GENO:0000443', 'is_transgene_variant_of': 'GENO:0000444', 'targeted_by': 'GENO:0000634', 'targets_instance_of': 'GENO:0000414', 'translates_to': 'RO:0002513'}
properties = {'altered_nucleotide': 'GENO:altered_nucleotide', 'derives_from': 'RO:0001000', 'derives_sequence_from_gene': 'GENO:0000639', 'has_affected_locus': 'GENO:0000418', 'has_alternate_part': 'GENO:0000382', 'has_gene_product': 'RO:0002205', 'has_genotype': 'GENO:0000222', 'has_member_with_allelotype': 'GENO:0000225', 'has_part': 'BFO:0000051', 'has_phenotype': 'RO:0002200', 'has_reference_part': 'GENO:0000385', 'has_sex_agnostic_genotype_part': 'GENO:0000650', 'has_variant_part': 'GENO:0000382', 'has_zygosity': 'GENO:0000608', 'in_taxon': 'RO:0002162', 'is_allelotype_of': 'GENO:0000206', 'is_mutant_of': 'GENO:0000440', 'is_reference_instance_of': 'GENO:0000610', 'is_sequence_variant_instance_of': 'GENO:0000408', 'is_targeted_expression_variant_of': 'GENO:0000443', 'is_transgene_variant_of': 'GENO:0000444', 'reference_amino_acid': 'GENO:reference_amino_acid', 'reference_nucleotide': 'GENO:reference_nucleotide', 'results_in_amino_acid_change': 'GENO:results_in_amino_acid_change', 'targeted_by': 'GENO:0000634', 'targets_instance_of': 'GENO:0000414', 'translates_to': 'RO:0002513'}
zygosity = {'complex_heterozygous': 'GENO:0000402', 'hemizygous': 'GENO:0000606', 'hemizygous-x': 'GENO:0000605', 'hemizygous-y': 'GENO:0000604', 'heteroplasmic': 'GENO:0000603', 'heterozygous': 'GENO:0000135', 'homoplasmic': 'GENO:0000602', 'homozygous': 'GENO:0000136', 'indeterminate': 'GENO:0000137', 'simple_heterozygous': 'GENO:0000458'}