Skip to content

Commit 7102cf4

Browse files
authored
Merge pull request #1256 from PathwayCommons/v0.27.0
v0.27.0
2 parents 853b507 + 9a48a67 commit 7102cf4

File tree

24 files changed

+2455
-48
lines changed

24 files changed

+2455
-48
lines changed

package-lock.json

Lines changed: 2 additions & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -137,5 +137,5 @@
137137
"engines": {
138138
"node": ">=16.19.0"
139139
},
140-
"version": "0.26.0"
140+
"version": "0.27.0"
141141
}

src/client/components/accordion.js

Lines changed: 63 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,63 @@
1+
import h from 'react-hyperscript';
2+
import { Component } from 'react';
3+
import { makeClassList } from '../dom';
4+
import _ from 'lodash';
5+
6+
7+
export const ACCORDION_ITEM_FIELDS = {
8+
TITLE: 'title',
9+
DESCRIPTION: 'description'
10+
};
11+
12+
13+
export class AccordionItem extends Component {
14+
constructor(props){
15+
super(props);
16+
17+
this.state = {
18+
isOpen: false
19+
};
20+
}
21+
22+
toggleItem(){
23+
this.setState({ isOpen: !this.state.isOpen });
24+
}
25+
26+
render(){
27+
const { title, description } = this.props.item;
28+
const { isOpen } = this.state;
29+
const content = _.isString( description ) ? [ h('p', description) ] : description;
30+
return h('div.accordion-item', [
31+
h('div.accordion-item-header', {
32+
className: makeClassList({
33+
'open': isOpen
34+
}),
35+
onClick: () => this.toggleItem()
36+
}, [
37+
h( 'p.accordion-item-header-title', title ),
38+
isOpen ? h('i.material-icons.accordion-item-header-icon', 'expand_less') :
39+
h('i.material-icons.accordion-item-header-icon', 'expand_more')
40+
]),
41+
h('div.accordion-item-content', content )
42+
]);
43+
}
44+
}
45+
46+
export class Accordion extends Component {
47+
constructor(props){
48+
super(props);
49+
50+
this.state = {
51+
};
52+
}
53+
54+
render(){
55+
const { title, items } = this.props;
56+
return h('div.accordion', [
57+
title ? h('h3.accordion-title', title ) : null,
58+
h('div.accordion-items', items.map( (item, key) => h( AccordionItem, { key, item } ) ) )
59+
]);
60+
}
61+
}
62+
63+
export default Accordion;

src/client/components/editor/info-panel.js

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -67,14 +67,16 @@ export class InfoPanel extends Component {
6767
const citation = document.citation();
6868
// authorProfiles may not be existing for the older documents
6969
const authorProfiles = document.authorProfiles() || citation.authors.authorList;
70-
const { pmid, title = 'Untitled article', reference, doi, abstract } = citation;
70+
const { pmid, title = 'Untitled article', reference, doi, abstract, relations } = citation;
7171

7272
const retractedPubType = _.find( citation.pubTypes, ['UI', 'D016441'] );
7373
const retractFlag = retractedPubType ? h('span.editor-info-flag.super-salient-button.danger', retractedPubType.value) : null;
7474

7575
const hasArticleId = pmid != null || doi != null;
7676
const hasRelatedPapers = !_.isEmpty( document.relatedPapers() );
7777

78+
const hasRelations = !_.isEmpty( relations );
79+
7880
return h('div.editor-info-panel', [
7981
h('div.editor-info-flags', [ retractFlag ]),
8082

@@ -103,6 +105,13 @@ export class InfoPanel extends Component {
103105
pmid ? h('a.editor-info-link.plain-link', { target: '_blank', href: `${PUBMED_LINK_BASE_URL}${pmid}` }, 'PubMed') : null,
104106
h('a.editor-info-link.plain-link', { target: '_blank', href: `${GOOGLE_SCHOLAR_BASE_URL}${( "\u0022" + title + "\u0022") }`}, 'Google Scholar')
105107
]),
108+
hasRelations ?
109+
h('div.editor-info-relations', relations.map( ({ type, links }, i) => [
110+
h('div.editor-info-relation', { key: i.toString() }, [
111+
h('span.editor-info-relation-type', `${type} `),
112+
h('span.editor-info-links', links.map( ({ url, reference }, j ) => h('a.editor-info-link.plain-link', { key: j.toString(), target: '_blank', href: url }, reference ) ) )
113+
])
114+
])): null,
106115
h('div.editor-info-main-sections', [
107116
abstract ? h('div.editor-info-abstract-section.editor-info-main-section', [
108117
h('div.editor-info-section-title', abstract ? 'Abstract': 'Summary'),

src/client/components/element-info/entity-info.js

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -365,11 +365,6 @@ class EntityInfo extends DataComponent {
365365
let doc = p.document;
366366
let children = [];
367367

368-
const citation = doc.citation();
369-
const { pmid } = citation;
370-
371-
const hasPubmedMetadata = pmid != null;
372-
373368
let Loader = ({ loading = true }) => h('div.entity-info-matches-loading' + (loading ? '.entity-info-matches-loading-active' : ''), [
374369
loading ? h('i.icon.icon-spinner') : h('i.material-icons', 'remove')
375370
]);
@@ -612,6 +607,7 @@ class EntityInfo extends DataComponent {
612607
if( isComplex(s.element.type()) ){
613608
const entityNames = s.element.participants().map(ppt => ppt.name());
614609
children.push( h('div.entity-info-assoc', targetFromAssoc({ type, name, entityNames }, true )) );
610+
615611
if (hasRelatedPapers) {
616612
children.push( h('div.entity-info-reld-papers-title', `Recommended articles`) );
617613

src/client/components/home.js

Lines changed: 133 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@ import { Carousel, CAROUSEL_CONTENT } from './carousel';
77
import { tryPromise } from '../../util';
88
import { formatDistanceToNow } from 'date-fns';
99
import DocumentSearch from '../document-search';
10+
import Accordion from './accordion.js';
1011

1112
import { TWITTER_ACCOUNT_NAME, SAMPLE_DOC_ID, EMAIL_ADDRESS_INFO } from '../../config';
1213
import _ from 'lodash';
@@ -377,7 +378,8 @@ class Home extends Component {
377378
h('a.home-nav-link', [
378379
h(ContactPopover)
379380
]),
380-
h('a.home-nav-link', { href: `https://twitter.com/${TWITTER_ACCOUNT_NAME}`, target: '_blank' }, 'Twitter')
381+
h('a.home-nav-link', { href: `https://twitter.com/${TWITTER_ACCOUNT_NAME}`, target: '_blank' }, 'Twitter'),
382+
h('a.home-nav-link', { href: '#faq' }, 'FAQ')
381383
])
382384
]),
383385
h('div.home-intro', [
@@ -557,6 +559,136 @@ class Home extends Component {
557559
])
558560
])
559561
]),
562+
h('div.home-section.home-fluid-section.home-fluid-section-no-figure', [
563+
h('div.home-fluid-section-copy', [
564+
h( Accordion, {
565+
title: [ h('span', { id: 'faq' }, 'Frequently Asked Questions')],
566+
items: [
567+
{ title: 'What is Biofactoid?', description: [
568+
h('p', [
569+
'A tool to map ',
570+
h('a.plain-link', { href: 'https://en.wikipedia.org/wiki/Biological_pathway', target: '_blank' }, 'biological pathways'),
571+
' assembled from author-curated results in papers.'
572+
])
573+
]},
574+
{ title: 'What problem does Biofactoid help solve?', description: [
575+
h('p', 'Think about the last time you snapped a photo of your friends or family (or your pet). Your phone automatically identified and focused on all the faces, but, whether you were aware of it or not, it also labelled those faces (and cars, food, cute babies) so that it could organise your album by the places, people, pets and things within the images.'),
576+
h('p', 'Wouldn’t it be great if all of the scientific details in a paper were readily identifiable by computers so that information across the literature could be precisely related and combined?'),
577+
h('p', [
578+
'Despite the fact that scientific papers are distributed digitally, the content itself -- plain text and images -- remains rooted in the print era. Unfortunately, knowledge in the text and figures in papers is extremely challenging for computers to accurately extract and use. We traditionally rely on expert curators at biological resources (e.g., ',
579+
h('a.plain-link', { href: 'https://www.uniprot.org/', target: '_blank' }, 'UniProt'),
580+
') to read papers and enter the information in a format that a computer can work with. However, this is expensive and there are too many papers for expert curators to handle at the same time.'
581+
]),
582+
h('p', 'Biofactoid rethinks the way information in papers is captured by enabling curation by authors of scientific articles, which is accurate, since authors are authoritative experts on their studies, and scales to support comprehensive, up-to-the-minute coverage of the literature.')
583+
]},
584+
{ title: 'What kind of information does Biofactoid contain?', description: 'Functional relationships (e.g., binding, transcription) between molecules and chemicals. For instance, "NAD+ binds to mouse PARP1".'},
585+
{ title: 'Which species does Biofactoid support?', description: [
586+
h('p', [
587+
'Humans and major model organisms including: ',
588+
h('em', 'M. musculus'), ', ',
589+
h('em', 'R. norvegicus'), ', ',
590+
h('em', 'S. cerevisiae'), ', ',
591+
h('em', 'D. melanogaster'), ', ',
592+
h('em', 'E. coli'), ', ',
593+
h('em', 'C. elegans'), ', ',
594+
h('em', 'D. rerio'), ', ',
595+
h('em', 'A. thaliana'), ', as well as ',
596+
h('em', 'SARS-CoV-2.')
597+
])
598+
]},
599+
{ title: 'Can anyone submit an article?', description: [
600+
h('p', [
601+
h('span', 'Any author of a primary research article is welcome to submit content to Biofactoid. Authors access the curation tool via a private web link. Author names and emails are associated with Biofactoid records and matched against corresponding author and '),
602+
h('a.plain-link', { href: 'https://orcid.org/', target: '_blank' }, 'Open Researcher and Contributor ID (ORCID)'),
603+
h('span', ' information (when available) for each article. The Biofactoid website displays the name of the author who created the record, linked to their ORCID.')
604+
])
605+
]},
606+
{ title: 'How long does it take?', description: 'A typical author spends a total of 6 minutes to add information from a paper; this usually involves 3 interactions. More than a quarter of users finish in less than 3 minutes.' },
607+
{ title: 'Do I need to create an account?', description: 'No. All Biofactoid data is freely and openly available for all to use, download and redistribute without restriction. Authors curate their paper by following a private web link. Email addresses remain private and are never shared.' },
608+
{ title: 'How does Biofactoid compare to other pathway databases like Reactome or STRING?', description: [
609+
h('p', 'Biofactoid collects pathway and network data and makes it available as a resource to support many different uses. Biofactoid data can be searched as is, as a knowledge resource. It can also provide input data for pathway and network analyses, such as the following:'),
610+
h('ul', [
611+
h('li', [
612+
'STRING collects data from other sources, such as Biocarta, BioCyc, Gene Ontology, KEGG, and Reactome; ',
613+
h('u', 'Biofactoid is a primary source of curated data')
614+
]),
615+
h('li', 'Reactome curates a defined set of human pathways from select papers, focusing on a consensus (i.e. "textbook") interpretation of biological processes; Biofactoid supports author-curation of all papers with pathway results')
616+
])
617+
]},
618+
{ title: 'How is Biofactoid data is used?', description: [
619+
h('p', 'Biofactoid collects pathway and network data and makes it available as a resource to support many different uses. Biofactoid data can be searched as is, as a knowledge resource. It can also provide input data for pathway and network analyses, such as the following:'),
620+
h('ul', [
621+
h('li', [
622+
h('b', 'Interpreting long lists of genes from large-scale experiments'),
623+
h('ul', [
624+
h('p', 'Comprehensive quantification of DNA, RNA and proteins in biological samples yields long lists of measured entities (e.g. differentially expressed genes) which are difficult to interpret. Pathway enrichment analysis summarises gene lists as a smaller, more easily interpretable list of affected pathways. Pathway data is obtained from manually curated resources.'),
625+
h('li', [
626+
h('a.plain-link', { href: 'https://www.science.org/doi/full/10.1126/scisignal.aan3580', target: '_blank' }, 'Integrated in vivo multiomics analysis identifies p21-activated kinase signaling as a driver of colitis.'),
627+
' Sci. Signal 11 (2018)'
628+
]),
629+
h('li', [
630+
h('a.plain-link', { href: 'https://www.nature.com/articles/nature13108', target: '_blank' }, 'Epigenomic alterations define lethal CIMP-positive ependymomas of infancy.'),
631+
' Nature 506 (2014)'
632+
]),
633+
h('li', [
634+
h('a.plain-link', { href: 'https://www.nature.com/articles/nature13483', target: '_blank' }, 'DNA-damage-induced differentiation of leukaemic cells as an anti-cancer barrier.'),
635+
' Nature 514 (2014)'
636+
])
637+
])
638+
]),
639+
h('li', [
640+
h('b', 'Exploring the mechanistic neighbourhood of a gene or drug'),
641+
h('ul', [
642+
h('p', 'Functional screens (e.g., RNAi) and genetic screens can implicate one or a few genes in a phenotype. However, complex cellular networks of gene products and chemicals underlie most genotype-to-phenotype relationships. An integrated resource of curated biological relationships enables researchers to explore a neighbourhood of direct and indirect mechanistic interactions for a protein (or drug) of interest.'),
643+
h('li', [
644+
'Search engines: ',
645+
h('a.plain-link', { href: 'https://string-db.org/', target: '_blank' }, 'STRING'),
646+
h('span', ', '),
647+
h('a.plain-link', { href: 'https://genemania.org/', target: '_blank' }, 'GeneMANIA'),
648+
h('span', ', '),
649+
h('a.plain-link', { href: 'https://apps.pathwaycommons.org/', target: '_blank' }, 'Pathway Commons Search')
650+
])
651+
]),
652+
]),
653+
h('li', [
654+
h('b', 'Network analysis'),
655+
h('ul', [
656+
h('p', 'The research community has used pathway and interaction data in a wide variety of computational analyses:'),
657+
h('li', [
658+
h('em', 'Constructing quantitative dynamical models from curated pathways'),
659+
h('ul', [
660+
h('li', [
661+
h('a.plain-link', { href: 'https://pubmed.ncbi.nlm.nih.gov/24273241/', target: '_blank' }, 'Pathway Commons at virtual cell: use of pathway data for mathematical.'),
662+
' Bioinformatics 15:30 (2014)'
663+
])
664+
]),
665+
]),
666+
h('li', [
667+
h('em', 'Using curated pathways to assemble a kinase signalling network that explains kinase data'),
668+
h('ul', [
669+
h('li', [
670+
h('a.plain-link', { href: 'https://www.nature.com/articles/nmeth.3773', target: '_blank' }, 'DREAM Challenge: Hill, S. M. et al. Inferring causal molecular networks: empirical assessment through a community-based effort.'),
671+
' Nat. Methods 13 (2016)'
672+
])
673+
]),
674+
]),
675+
h('li', [
676+
h('em', 'Using curated pathways to explain mutually exclusive mutations in cancer'),
677+
h('ul', [
678+
h('li', [
679+
h('a.plain-link', { href: 'https://genomebiology.biomedcentral.com/articles/10.1186/s13059-015-0612-6', target: '_blank' }, 'Systematic identification of cancer driving signaling pathways based on mutual exclusivity of genomic alterations.'),
680+
' Genome Biology 16:45 (2015)'
681+
])
682+
]),
683+
])
684+
])
685+
])
686+
])
687+
]}
688+
]
689+
})
690+
])
691+
]),
560692
h('div.home-section.home-search-results', [
561693
this.state.searchMode ? (
562694
this.state.searching ? (

src/server/routes/api/document/crossref/map.js

Lines changed: 47 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
import _ from 'lodash';
22
import { format } from 'date-fns';
3-
import { createPubmedArticle } from '../../../../../util/pubmed';
3+
import { COMMENTSCORRECTIONS_REFTYPE, createPubmedArticle } from '../../../../../util/pubmed';
44

55
/**
66
* getAbstract
@@ -169,14 +169,59 @@ const getPublicationTypeList = record => {
169169
return PublicationTypeList;
170170
};
171171

172+
const getCommentsCorrectionsList = record => {
173+
const CommentsCorrectionsList = [];
174+
const CRRELATION_REFTYPE_MAP = new Map([
175+
['is-preprint-of', COMMENTSCORRECTIONS_REFTYPE.UpdateIn],
176+
['has-preprint', COMMENTSCORRECTIONS_REFTYPE.UpdateOf],
177+
['is-comment-on', COMMENTSCORRECTIONS_REFTYPE.CommentOn],
178+
['has-comment', COMMENTSCORRECTIONS_REFTYPE.CommentIn],
179+
['isSupplementedBy', COMMENTSCORRECTIONS_REFTYPE.AssociatedDataset]
180+
]);
181+
const CRRELATION_IDTYPES = new Set([
182+
'doi',
183+
'pmid'
184+
]);
185+
const { relation } = record;
186+
if( relation ){
187+
for (let crRelationType of Object.keys(relation)) {
188+
if( CRRELATION_REFTYPE_MAP.has( crRelationType ) ){
189+
const RefType = CRRELATION_REFTYPE_MAP.get( crRelationType );
190+
const relations = relation[crRelationType];
191+
for (let rel of relations) {
192+
const { id, 'id-type': idType } = rel;
193+
if( CRRELATION_IDTYPES.has( idType ) ){
194+
const CommentsCorrections = {
195+
RefType,
196+
PMID: null,
197+
DOI: null,
198+
RefSource: ''
199+
};
200+
if( idType === 'doi' ){
201+
_.set(CommentsCorrections, 'DOI', id);
202+
_.set(CommentsCorrections, 'RefSource', `doi: ${id}`);
203+
} else if( idType === 'pmid' ){
204+
_.set(CommentsCorrections, 'PMID', id);
205+
_.set(CommentsCorrections, 'RefSource', `pmid: ${id}`);
206+
}
207+
CommentsCorrectionsList.push(CommentsCorrections);
208+
}
209+
}
210+
}
211+
}
212+
}
213+
return CommentsCorrectionsList;
214+
};
215+
172216
const getMedlineCitation = record => {
173217
const { abstract, title, author } = record;
174218
const Abstract = getAbstract( abstract );
175219
const ArticleTitle = _.head ( title );
176220
const AuthorList = asAuthorList( author );
177221
const Journal = getJournal( record );
178222
const PublicationTypeList = getPublicationTypeList( record );
179-
const MedlineCitation = { Article: { Abstract, ArticleTitle, AuthorList, Journal, PublicationTypeList } };
223+
const CommentsCorrectionsList = getCommentsCorrectionsList( record );
224+
const MedlineCitation = { Article: { Abstract, ArticleTitle, AuthorList, Journal, PublicationTypeList }, CommentsCorrectionsList };
180225
return MedlineCitation;
181226
};
182227

0 commit comments

Comments
 (0)