diff --git a/lib/rialto/etl/configs/wos_to_sparql_statements.rb b/lib/rialto/etl/configs/wos_to_sparql_statements.rb index fda7c9f..08d1962 100644 --- a/lib/rialto/etl/configs/wos_to_sparql_statements.rb +++ b/lib/rialto/etl/configs/wos_to_sparql_statements.rb @@ -156,6 +156,7 @@ def lookup_address(addresses, addr_id) # Lookup all the contributors in the entity resolution service to find their URIs. contributor_names = Array.wrap(JsonPath.on(json, '$.static_data.summary.names.name').first) accumulator << contributor_names.map do |name| + next if name['role'] == 'corp' person = construct_contributor(name, addresses) { '@id' => RIALTO_CONTEXT_RELATIONSHIPS["#{json['UID']}_#{remove_vocab_from_uri(RIALTO_PEOPLE, person['@id'])}"], diff --git a/spec/configs/wos_to_sparql_statements_spec.rb b/spec/configs/wos_to_sparql_statements_spec.rb index be94599..f5c6772 100644 --- a/spec/configs/wos_to_sparql_statements_spec.rb +++ b/spec/configs/wos_to_sparql_statements_spec.rb @@ -186,6 +186,16 @@ def transform(source_file) graph]] ) + # Ignores corporate authorships + query = client.select(count: { auth_rel: :c }) + .from(Rialto::Etl::NamedGraphs::WOS_GRAPH) + .where([:auth_rel, RDF.type, Rialto::Etl::Vocabs::VIVO.Authorship]) + expect(query.solutions.first[:c].to_i).to eq(1) + query = client.select(count: { auth_rel: :c }) + .from(Rialto::Etl::NamedGraphs::WOS_GRAPH) + .where([:auth_rel, RDF.type, Rialto::Etl::Vocabs::VIVO.Editorship]) + expect(query.solutions.first[:c].to_i).to eq(1) + # Editorships expect(repository).to has_quads( [[id, diff --git a/spec/fixtures/wos/WOS:000424386600014.json b/spec/fixtures/wos/WOS:000424386600014.json index c2fbf7f..6966893 100644 --- a/spec/fixtures/wos/WOS:000424386600014.json +++ b/spec/fixtures/wos/WOS:000424386600014.json @@ -1 +1 @@ -{"UID":"WOS:000424386600014","static_data":{"summary":{"pub_info":{"coverdate":"FEB 2018","vol":243,"pubyear":2018,"issue":3,"sortdate":"2018-02-01","has_abstract":"Y","pubmonth":"FEB","pubtype":"Journal","page":{"end":322,"begin":313,"page_count":10,"content":"313-322"}},"names":{"count":2,"name":[{"seq_no":1,"orcid_id":"0000-0002-2328-2018","role":"author","full_name":"Wilson, Jennifer L.","reprint":"Y","addr_no":1,"last_name":"Wilson","display_name":"Wilson, Jennifer L.","wos_standard":"Wilson, JL","daisng_id":1275281,"first_name":"Jennifer L."},{"seq_no":2,"role":"book_editor","full_name":"Altman, Russ B.","addr_no":"2 1","last_name":"Altman","display_name":"Altman, Russ B.","wos_standard":"Altman, RB","daisng_id":12834,"first_name":"Russ B."}]},"doctypes":{"doctype":"Review","count":1},"publishers":{"publisher":{"names":{"count":1,"name":{"seq_no":1,"role":"publisher","full_name":"SAGE PUBLICATIONS LTD","addr_no":1,"display_name":"SAGE PUBLICATIONS LTD"}},"address_spec":{"city":"LONDON","addr_no":1,"full_address":"1 OLIVERS YARD, 55 CITY ROAD, LONDON EC1Y 1SP, ENGLAND"}}},"EWUID":{"WUID":{"coll_id":"WOS"},"edition":{"value":"WOS.SCI"}},"titles":{"count":6,"title":[{"type":"source","content":"EXPERIMENTAL BIOLOGY AND MEDICINE"},{"type":"source_abbrev","content":"EXP BIOL MED"},{"type":"abbrev_iso","content":"Exp. Biol. Med."},{"type":"abbrev_11","content":"EXP BIOL ME"},{"type":"abbrev_29","content":"EXP BIOL MED"},{"type":"item","content":"Biomarkers: Delivering on the expectation of molecularly driven, quantitative health"}]}},"item":{"xsi:type":"itemType_wos","coll_id":"WOS","ids":{"avail":"N","content":"FV2HX"},"xmlns:xsi":"http://www.w3.org/2001/XMLSchema-instance","bib_pagecount":{"type":"Journal","content":120},"keywords_plus":{"count":10,"keyword":["PHARMACOGENETICS IMPLEMENTATION CONSORTIUM","SYSTEMS PHARMACOLOGY ANALYSIS","TOXIC EPIDERMAL NECROLYSIS","SURROGATE END-POINTS","PRECISION MEDICINE","PERSONALIZED MEDICINE","UK BIOBANK","ALZHEIMERS-DISEASE","JOHNSON SYNDROME","CANCER"]},"bib_id":"243 (3): 313-322 FEB 2018"},"fullrecord_metadata":{"addresses":{"count":2,"address_name":[{"names":{"count":2,"name":[{"seq_no":1,"role":"author","full_name":"Wilson, Jennifer L.","reprint":"Y","addr_no":1,"last_name":"Wilson","display_name":"Wilson, Jennifer L.","wos_standard":"Wilson, JL","daisng_id":1275281,"first_name":"Jennifer L."},{"seq_no":2,"role":"author","full_name":"Altman, Russ B.","addr_no":1,"last_name":"Altman","display_name":"Altman, Russ B.","wos_standard":"Altman, RB","daisng_id":12834,"first_name":"Russ B."}]},"address_spec":{"zip":{"location":"AP","content":94305},"country":"Peoples R China","city":"Stanford","addr_no":1,"organizations":{"organization":["Stanford Univ",{"pref":"Y","content":"Stanford University"}],"count":2},"full_address":"Stanford Univ, Bioengn Dept, Stanford, CA 94305 USA","state":"CA","suborganizations":{"count":1,"suborganization":"Bioengn Dept"}}},{"names":{"count":1,"name":{"seq_no":2,"role":"author","full_name":"Altman, Russ B.","addr_no":2,"last_name":"Altman","display_name":"Altman, Russ B.","wos_standard":"Altman, RB","daisng_id":12834,"first_name":"Russ B."}},"address_spec":{"zip":{"location":"AP","content":94305},"country":"USA","city":"Stanford","addr_no":2,"organizations":{"organization":["Stanford Univ",{"pref":"Y","content":"Stanford University"}],"count":2},"full_address":"Stanford Univ, Dept Genet, Stanford, CA 94305 USA","state":"CA","suborganizations":{"count":1,"suborganization":"Dept Genet"}}}]},"category_info":{"subheadings":{"count":1,"subheading":"Life Sciences & Biomedicine"},"subjects":{"subject":[{"ascatype":"traditional","code":"QA","content":"Medicine, Research & Experimental"},{"ascatype":"extended","content":"Research & Experimental Medicine"}],"count":2},"headings":{"heading":"Science & Technology","count":1}},"normalized_languages":{"count":1,"language":{"type":"primary","content":"English"}},"languages":{"count":1,"language":{"type":"primary","content":"English"}},"keywords":{"count":6,"keyword":["Biomarkers","precision medicine","therapeutics","drug discovery","molecular","mechanisms"]},"refs":{"count":102},"reprint_addresses":{"count":1,"address_name":{"names":{"count":1,"name":{"seq_no":1,"role":"author","full_name":"Wilson, Jennifer L.","reprint":"Y","addr_no":1,"last_name":"Wilson","display_name":"Wilson, Jennifer L.","wos_standard":"Wilson, JL","first_name":"Jennifer L."}},"address_spec":{"zip":{"location":"AP","content":94305},"country":"USA","city":"Stanford","addr_no":1,"organizations":{"organization":["Stanford Univ",{"pref":"Y","content":"Stanford University"}],"count":2},"full_address":"Stanford Univ, Bioengn Dept, Stanford, CA 94305 USA","state":"CA","suborganizations":{"count":1,"suborganization":"Bioengn Dept"}}}},"abstracts":{"count":1,"abstract":{"abstract_text":{"p":"Biomarkers are the pillars of precision medicine and are delivering on expectations of molecular, quantitative health.","count":1}}},"fund_ack":{"grants":{"count":2,"grant":[{"grant_ids":{"grant_id":["GM102365","LM05652","GM61374"],"count":3},"grant_agency":"NIH"},{"grant_ids":{"grant_id":"U01FD004979","count":1},"grant_agency":""}]},"fund_text":{"p":"This work supported in part by NIH GM102365, LM05652, GM61374, FDA U01FD004979, and a gift from Biogen."}},"normalized_doctypes":{"doctype":"Article","count":1}},"contributors":{"contributor":{"name":{"seq_no":1,"orcid_id":"0000-0002-2328-2018","role":"researcher_id","full_name":"Wilson, Jennifer","last_name":"Wilson","display_name":"Wilson, Jennifer","first_name":"Jennifer"}},"count":1}},"r_id_disclaimer":"ResearcherID data provided by Clarivate Analytics","dynamic_data":{"citation_related":{"tc_list":{"silo_tc":{"coll_id":"WOS","local_count":0}}},"cluster_related":{"identifiers":{"identifier":[{"type":"issn","value":"1535-3702"},{"type":"eissn","value":"1535-3699"},{"type":"doi","value":"10.1177/1535370217744<775>"},{"type":"pmid","value":"MEDLINE:29199461"}]}}}} \ No newline at end of file +{"UID":"WOS:000424386600014","static_data":{"summary":{"pub_info":{"coverdate":"FEB 2018","vol":243,"pubyear":2018,"issue":3,"sortdate":"2018-02-01","has_abstract":"Y","pubmonth":"FEB","pubtype":"Journal","page":{"end":322,"begin":313,"page_count":10,"content":"313-322"}},"names":{"count":3,"name":[{"seq_no":1,"orcid_id":"0000-0002-2328-2018","role":"author","full_name":"Wilson, Jennifer L.","reprint":"Y","addr_no":1,"last_name":"Wilson","display_name":"Wilson, Jennifer L.","wos_standard":"Wilson, JL","daisng_id":1275281,"first_name":"Jennifer L."},{"seq_no":2,"role":"book_editor","full_name":"Altman, Russ B.","addr_no":"2 1","last_name":"Altman","display_name":"Altman, Russ B.","wos_standard":"Altman, RB","daisng_id":12834,"first_name":"Russ B."},{"seq_no":3,"role":"corp","full_name":"OPAL Collaborat","display_name":"OPAL Collaborat","wos_standard":"OPAL Collaborat"}]},"doctypes":{"doctype":"Review","count":1},"publishers":{"publisher":{"names":{"count":1,"name":{"seq_no":1,"role":"publisher","full_name":"SAGE PUBLICATIONS LTD","addr_no":1,"display_name":"SAGE PUBLICATIONS LTD"}},"address_spec":{"city":"LONDON","addr_no":1,"full_address":"1 OLIVERS YARD, 55 CITY ROAD, LONDON EC1Y 1SP, ENGLAND"}}},"EWUID":{"WUID":{"coll_id":"WOS"},"edition":{"value":"WOS.SCI"}},"titles":{"count":6,"title":[{"type":"source","content":"EXPERIMENTAL BIOLOGY AND MEDICINE"},{"type":"source_abbrev","content":"EXP BIOL MED"},{"type":"abbrev_iso","content":"Exp. Biol. Med."},{"type":"abbrev_11","content":"EXP BIOL ME"},{"type":"abbrev_29","content":"EXP BIOL MED"},{"type":"item","content":"Biomarkers: Delivering on the expectation of molecularly driven, quantitative health"}]}},"item":{"xsi:type":"itemType_wos","coll_id":"WOS","ids":{"avail":"N","content":"FV2HX"},"xmlns:xsi":"http://www.w3.org/2001/XMLSchema-instance","bib_pagecount":{"type":"Journal","content":120},"keywords_plus":{"count":10,"keyword":["PHARMACOGENETICS IMPLEMENTATION CONSORTIUM","SYSTEMS PHARMACOLOGY ANALYSIS","TOXIC EPIDERMAL NECROLYSIS","SURROGATE END-POINTS","PRECISION MEDICINE","PERSONALIZED MEDICINE","UK BIOBANK","ALZHEIMERS-DISEASE","JOHNSON SYNDROME","CANCER"]},"bib_id":"243 (3): 313-322 FEB 2018"},"fullrecord_metadata":{"addresses":{"count":2,"address_name":[{"names":{"count":2,"name":[{"seq_no":1,"role":"author","full_name":"Wilson, Jennifer L.","reprint":"Y","addr_no":1,"last_name":"Wilson","display_name":"Wilson, Jennifer L.","wos_standard":"Wilson, JL","daisng_id":1275281,"first_name":"Jennifer L."},{"seq_no":2,"role":"author","full_name":"Altman, Russ B.","addr_no":1,"last_name":"Altman","display_name":"Altman, Russ B.","wos_standard":"Altman, RB","daisng_id":12834,"first_name":"Russ B."}]},"address_spec":{"zip":{"location":"AP","content":94305},"country":"Peoples R China","city":"Stanford","addr_no":1,"organizations":{"organization":["Stanford Univ",{"pref":"Y","content":"Stanford University"}],"count":2},"full_address":"Stanford Univ, Bioengn Dept, Stanford, CA 94305 USA","state":"CA","suborganizations":{"count":1,"suborganization":"Bioengn Dept"}}},{"names":{"count":1,"name":{"seq_no":2,"role":"author","full_name":"Altman, Russ B.","addr_no":2,"last_name":"Altman","display_name":"Altman, Russ B.","wos_standard":"Altman, RB","daisng_id":12834,"first_name":"Russ B."}},"address_spec":{"zip":{"location":"AP","content":94305},"country":"USA","city":"Stanford","addr_no":2,"organizations":{"organization":["Stanford Univ",{"pref":"Y","content":"Stanford University"}],"count":2},"full_address":"Stanford Univ, Dept Genet, Stanford, CA 94305 USA","state":"CA","suborganizations":{"count":1,"suborganization":"Dept Genet"}}}]},"category_info":{"subheadings":{"count":1,"subheading":"Life Sciences & Biomedicine"},"subjects":{"subject":[{"ascatype":"traditional","code":"QA","content":"Medicine, Research & Experimental"},{"ascatype":"extended","content":"Research & Experimental Medicine"}],"count":2},"headings":{"heading":"Science & Technology","count":1}},"normalized_languages":{"count":1,"language":{"type":"primary","content":"English"}},"languages":{"count":1,"language":{"type":"primary","content":"English"}},"keywords":{"count":6,"keyword":["Biomarkers","precision medicine","therapeutics","drug discovery","molecular","mechanisms"]},"refs":{"count":102},"reprint_addresses":{"count":1,"address_name":{"names":{"count":1,"name":{"seq_no":1,"role":"author","full_name":"Wilson, Jennifer L.","reprint":"Y","addr_no":1,"last_name":"Wilson","display_name":"Wilson, Jennifer L.","wos_standard":"Wilson, JL","first_name":"Jennifer L."}},"address_spec":{"zip":{"location":"AP","content":94305},"country":"USA","city":"Stanford","addr_no":1,"organizations":{"organization":["Stanford Univ",{"pref":"Y","content":"Stanford University"}],"count":2},"full_address":"Stanford Univ, Bioengn Dept, Stanford, CA 94305 USA","state":"CA","suborganizations":{"count":1,"suborganization":"Bioengn Dept"}}}},"abstracts":{"count":1,"abstract":{"abstract_text":{"p":"Biomarkers are the pillars of precision medicine and are delivering on expectations of molecular, quantitative health.","count":1}}},"fund_ack":{"grants":{"count":2,"grant":[{"grant_ids":{"grant_id":["GM102365","LM05652","GM61374"],"count":3},"grant_agency":"NIH"},{"grant_ids":{"grant_id":"U01FD004979","count":1},"grant_agency":""}]},"fund_text":{"p":"This work supported in part by NIH GM102365, LM05652, GM61374, FDA U01FD004979, and a gift from Biogen."}},"normalized_doctypes":{"doctype":"Article","count":1}},"contributors":{"contributor":{"name":{"seq_no":1,"orcid_id":"0000-0002-2328-2018","role":"researcher_id","full_name":"Wilson, Jennifer","last_name":"Wilson","display_name":"Wilson, Jennifer","first_name":"Jennifer"}},"count":1}},"r_id_disclaimer":"ResearcherID data provided by Clarivate Analytics","dynamic_data":{"citation_related":{"tc_list":{"silo_tc":{"coll_id":"WOS","local_count":0}}},"cluster_related":{"identifiers":{"identifier":[{"type":"issn","value":"1535-3702"},{"type":"eissn","value":"1535-3699"},{"type":"doi","value":"10.1177/1535370217744<775>"},{"type":"pmid","value":"MEDLINE:29199461"}]}}}} \ No newline at end of file