def process_from_web(): """Return a processor for the LINCS drug target data. Returns ------- LincsProcessor A LincsProcessor object which contains extracted INDRA Statements in its statements attribute. """ lincs_data = get_drug_target_data() return LincsProcessor(lincs_data)
def test_process_from_web(): lincs_p = process_from_web() assert lincs_p is not None assert lincs_p.statements data_len = len(get_drug_target_data()) num_stmts = len(lincs_p.statements) # Note that due to an erroneous entry in the HMS LINCS protein table, # one Statement is not extracted from the table, hence the condition # below, which should be kept as long as the error persists assert num_stmts >= data_len - 1, \ ("Did not convert all statements: expected %d, got %d." % (data_len, num_stmts)) assert all(len(s.evidence) > 0 for s in lincs_p.statements),\ "Some statements lack evidence."
def test_get_drug_target_data(): data_list = get_drug_target_data() assert len(data_list) > 100, len(data_list)