Ejemplo n.º 1
0
 def test_get_aggregate_attributes(self):
     all_author_pubs = authority_excerpt.first_author_all_pubs(
         [gold_aim3_pmids[0]])
     response = authority_excerpt.get_aggregate_attributes(
         all_author_pubs[0])
     gold_response = {
         'is_open_access': 0,
         'is_microarray_data_creation': 4,
         'is_meta_analysis': 0,
         'in_ae_or_geo': 0,
         'is_multicenter_study': 0,
         'in_swissprot': 0,
         'in_pdb': 0,
         'in_genbank': 0,
         'is_geo_reuse': 0
     }
     assert_equals(response, gold_response)
Ejemplo n.º 2
0
 def test_first_author_all_pubs(self):
     all_pubs = authority_excerpt.first_author_all_pubs(gold_aim3_pmids)
     gold_first_all_pubs = [
         [
             '17638889', '16442701', '12776178', '12591240', '12527389',
             '12094606', '11518802', '11328825', '10894146', '17638889',
             '16442701', '12776178', '12591240', '12527389', '12094606',
             '11518802', '11328825', '10894146'
         ], [],
         [
             '19013643', '18996570', '15247401', '19013643', '18996570',
             '15247401'
         ],
         [
             '18852287', '17997859', '17581960', '17360646', '17121828',
             '15620361', '15342915', '12391155', '11390640', '11106735',
             '10623806', '9702189', '9584134', '18852287', '17997859',
             '17581960', '17360646', '17121828', '15620361', '15342915',
             '12391155', '11390640', '11106735', '10623806', '9702189',
             '9584134'
         ]
     ]
     assert_equals(all_pubs, gold_first_all_pubs)
Ejemplo n.º 3
0
def first_author_prev_pubs(pmids):
    all_pubs_list = authority.first_author_all_pubs(pmids)
    prev_pubs_list = filter_for_previous(pmids, all_pubs_list)
    return (prev_pubs_list)
Ejemplo n.º 4
0
def first_author_num_all_pubs(pmids):
    all_pubs_list = authority.first_author_all_pubs(pmids)
    counts = [len(pubs) for pubs in all_pubs_list]
    return (counts)
Ejemplo n.º 5
0
def first_author_prev_pubs(pmids):
    all_pubs_list = authority.first_author_all_pubs(pmids)
    prev_pubs_list = filter_for_previous(pmids, all_pubs_list)
    return(prev_pubs_list)
Ejemplo n.º 6
0
def first_author_num_all_pubs(pmids):
    all_pubs_list = authority.first_author_all_pubs(pmids)
    counts = [len(pubs) for pubs in all_pubs_list]
    return(counts)
Ejemplo n.º 7
0
 def test_get_aggregate_attributes(self):
     all_author_pubs = authority_excerpt.first_author_all_pubs([gold_aim3_pmids[0]])
     response = authority_excerpt.get_aggregate_attributes(all_author_pubs[0])
     gold_response = {'is_open_access': 0, 'is_microarray_data_creation': 4, 'is_meta_analysis': 0, 'in_ae_or_geo': 0, 'is_multicenter_study': 0, 'in_swissprot': 0, 'in_pdb': 0, 'in_genbank': 0, 'is_geo_reuse': 0}
     assert_equals(response, gold_response)
Ejemplo n.º 8
0
 def test_first_author_all_pubs(self):
     all_pubs = authority_excerpt.first_author_all_pubs(gold_aim3_pmids)
     gold_first_all_pubs = [['17638889', '16442701', '12776178', '12591240', '12527389', '12094606', '11518802', '11328825', '10894146', '17638889', '16442701', '12776178', '12591240', '12527389', '12094606', '11518802', '11328825', '10894146'], [], ['19013643', '18996570', '15247401', '19013643', '18996570', '15247401'], ['18852287', '17997859', '17581960', '17360646', '17121828', '15620361', '15342915', '12391155', '11390640', '11106735', '10623806', '9702189', '9584134', '18852287', '17997859', '17581960', '17360646', '17121828', '15620361', '15342915', '12391155', '11390640', '11106735', '10623806', '9702189', '9584134']]
     assert_equals(all_pubs, gold_first_all_pubs)