def test_get_complex_components_proteoforms_returns_components(): df = get_complex_components_by_complex("R-HSA-983126", proteoforms) assert type(df) == pd.DataFrame assert len(df) == 264 assert ((df['Entity'] == 'R-HSA-141412') & (df['Id'] == 'Q12834;')).any() assert ((df['Entity'] == 'R-HSA-174229') & (df['Id'] == 'Q9UJX6;')).any() assert ((df['Entity'] == 'R-HSA-939239') & (df['Id'] == 'P0CG48;')).any()
def test_get_complex_components_proteins_without_small_molecules(): df = get_complex_components_by_complex("R-HSA-2168879", proteins) assert len(df) == 5 assert not ((df['Entity'] == 'R-ALL-352327') & (df['Id'] == 'O2')).any() assert not ((df['Entity'] == 'R-ALL-917877') & (df['Id'] == 'heme')).any() assert ((df['Entity'] == 'R-HSA-2168862') & (df['Id'] == 'P69905')).any() assert ((df['Entity'] == 'R-HSA-2168872') & (df['Id'] == 'P68871')).any()
def test_get_complex_components_genes_returns_components_2(): df = get_complex_components_by_complex("R-HSA-2168879", genes) assert df['Id'].nunique() == 4 assert (df['Id'] == 'HP').any() assert (df['Id'] == 'HBA1').any() assert (df['Id'] == 'HBB').any() assert (df['Id'] == 'CD163').any()
def test_get_complex_components_genes_returns_components(): df = get_complex_components_by_complex("R-HSA-983126", genes) assert type(df) == pd.DataFrame assert len(df) == 264 assert ((df['Entity'] == 'R-HSA-141412') & (df['Id'] == 'CDC20')).any() assert ((df['Entity'] == 'R-HSA-174229') & (df['Id'] == 'ANAPC2')).any() assert ((df['Entity'] == 'R-HSA-939239') & (df['Id'] == 'UBC')).any()
def test_get_complex_components_proteoforms_returns_components_2(): df = get_complex_components_by_complex("R-HSA-2168879", proteoforms) assert df["Id"].nunique() == 5 assert not (df['Id'] == 'O2').any() assert not (df['Id'] == 'heme').any() assert (df['Id'] == 'P00738;00034:52,00034:111,00034:149').any() assert (df['Id'] == 'P00738;00034:266,00034:309,00034:351').any() assert (df['Id'] == 'P69905;').any() assert (df['Id'] == 'P68871;').any() assert (df['Id'] == 'Q86VB7;').any()
def test_get_complex_components_proteins_returns_components_2(): df = get_complex_components_by_complex("R-HSA-2168879", proteins) assert df['Id'].nunique() == 4 assert not ((df['Entity'] == 'R-ALL-352327') & (df['Id'] == 'O2')).any() assert not ((df['Entity'] == 'R-ALL-917877') & (df['Id'] == 'heme')).any() assert not ((df['Entity'] == 'R-HSA-2168862') & (df['Id'] == 'HBA1')).any() assert (df['Id'] == 'P00738').any() assert (df['Id'] == 'Q86VB7').any() assert (df['Id'] == 'P69905').any() assert (df['Id'] == 'P68871').any()
def test_get_complex_components_proteins_returns_components(): df = get_complex_components_by_complex("R-HSA-983126", proteins) assert type(df) == pd.DataFrame assert len(df) == 264 assert not ((df['Entity'] == 'R-HSA-141412') & (df['Id'] == 'CDC20')).any() assert ((df['Entity'] == 'R-HSA-141412') & (df['Id'] == 'Q12834')).any() assert not ((df['Entity'] == 'R-HSA-174229') & (df['Id'] == 'ANAPC2')).any() assert ((df['Entity'] == 'R-HSA-174229') & (df['Id'] == 'Q9UJX6')).any() assert not ((df['Entity'] == 'R-HSA-939239') & (df['Id'] == 'UBC')).any() assert ((df['Entity'] == 'R-HSA-939239') & (df['Id'] == 'P0CG48')).any()
def test_get_complex_components_proteoforms_with_non_existent_complex_returns_empty_list( ): df = get_complex_components_by_complex("fake_complex", proteoforms) assert len(df) == 0