Ejemplo n.º 1
0
def test_amino_acid_residue_change_3_to_1_multiple():
    ## GIVEN a protein change on HGVS 3-letter format
    a = "p.MetLys997ArgGlu"
    ## WHEN converting to 1-letter change string
    r = amino_acid_residue_change_3_to_1(a)
    ## THEN the result is undefined
    assert r is None
Ejemplo n.º 2
0
def test_amino_acid_residue_change_3_to_1_del():
    ## GIVEN a protein change on HGVS 3-letter format
    a = "p.Phe2_Met46del"
    ## WHEN converting to 1-letter change string
    r = amino_acid_residue_change_3_to_1(a)
    ## THEN the result is undefined
    assert r is None
Ejemplo n.º 3
0
def test_amino_acid_residue_change_3_to_1_fs_ext():
    ## GIVEN a protein change on HGVS 3-letter format
    a = "p.Arg544Glnext*17"
    ## WHEN converting to 1-letter change string
    r = amino_acid_residue_change_3_to_1(a)
    ## THEN the result is undefined
    assert r is None
Ejemplo n.º 4
0
def test_amino_acid_residue_change_3_to_1_synonymous():
    ## GIVEN a protein change on HGVS 3-letter format
    a = "p.="
    ## WHEN converting to 1-letter change string
    r = amino_acid_residue_change_3_to_1(a)
    ## THEN the result is correct
    assert r is None
Ejemplo n.º 5
0
def test_amino_acid_residue_change_3_to_1_stop():
    ## GIVEN a protein change on HGVS 3-letter format
    a = "p.Ser241Ter"
    ## WHEN converting to 1-letter change string
    r = amino_acid_residue_change_3_to_1(a)
    ## THEN the result is correct
    assert r == "S241*"
Ejemplo n.º 6
0
def cbioportal(hgnc_symbol, protein_sequence_name):
    link = "https://www.cbioportal.org/ln?q={}:MUT%20%3D{}"

    if not hgnc_symbol:
        return None
    if not protein_sequence_name:
        return None

    protein_change = amino_acid_residue_change_3_to_1(protein_sequence_name)

    if not protein_change:
        return None

    return link.format(hgnc_symbol, protein_change)
Ejemplo n.º 7
0
def mycancergenome(hgnc_symbol, protein_sequence_name):
    link = "https://www.mycancergenome.org/content/alteration/{}-{}"

    if not hgnc_symbol:
        return None
    if not protein_sequence_name:
        return None

    protein_change = amino_acid_residue_change_3_to_1(protein_sequence_name)

    if not protein_change:
        return None

    return link.format(hgnc_symbol, protein_change.lower())