Biofactoid (biofactoid.org), is a web-based system that empowers authors to capture and share machine-readable summaries of molecular-level interactions described in their publications.
Biofactoid's codebase is licensed under MIT.
All contributed pathway data is freely available for download at https://biofactoid.org/api/document/zip which contains files for each pathway represented in:
- JavaScript Object Notation (JSON). This is the native format for Biofactoid data and contains interaction data, metadata of the record itself, metadata of the corresponding article, and visualisation data (layout and colors as Cytoscape JSON (Franz et al. (2016) Bioinforma. Oxf. Engl., 32, 309–311.)).
- Biological Pathway Exchange (BioPAX) (Demir et al. (2010) Biotechnol., 28, 935–942.) for detailed semantic exchange.
- Systems Biology Graphical Notation Markup Language (SBGNML), a format that supports biological process visualization (Le Novère et al. Nat. Biotechnol., 27, 735–741. (2009); van Iersel et al. (2012) Bioinforma. Oxf. Engl., 28, 2016–2021.)
Our data is licensed under CC0.
The following lines should be present in the neo4j.conf
file of ~/neo4j-community-5.X.X/conf
:
server.default_advertised_address=localhost
server.default_listen_address=0.0.0.0
server.bolt.enabled=true
server.bolt.tls_level=DISABLED
server.bolt.listen_address=:7687
server.bolt.advertised_address=:7687
server.http.enabled=true
server.http.listen_address=:7474
server.http.advertised_address=:7474
The following environment variables can be used to configure the server:
General:
NODE_ENV
: the environment mode; eitherproduction
ordevelopment
(default)PORT
: the port on which the server runs (default3000
)LOG_LEVEL
: minimum log level; one ofinfo
(default),warn
,error
BASE_URL
: used for email linkouts (e.g.https://factoid.baderlab.org
)API_KEY
: used to restrict new document creation (e.g.8365E63B-9A20-4661-AED8-EDB1296B657F
)
CRON:
CRON_SCHEDULE
: second (optional), minute, hour, day of month, month, day of weekDOCUMENT_CRON_UPDATE_PERIOD
: Milliseconds between successive Document cron update callsDOCUMENT_CRON_STALE_PERIOD
: Milliseconds since Documemt was last edited; criteria for trashingGRAPHDB_CRON_REFRESH_PERIOD_MINUTES
: Minimum time (minutes) between refreshes of graph DB data
Database:
DB_NAME
: name of the db (defaultfactoid
)DB_HOST
: hostname or ip address of the database host (defaultlocalhost
)DB_PORT
: port where the db can be accessed (default28015
, the rethinkdb default)DB_USER
: username if the db uses auth (undefined by default)DB_PASS
: password if the db uses auth (undefined by default)DB_CERT
: local file path to certificate (cert) file if the db uses ssl (undefined by default)
Downloads:
BULK_DOWNLOADS_PATH
: relative path to bulk downloadsBIOPAX_DOWNLOADS_PATH
: relative path to biopax downloadsBIOPAX_IDMAP_DOWNLOADS_PATH
: relative path to id-mapped biopax downloadsEXPORT_BULK_DELAY_HOURS
: period to delay (batch) export tasks
Services:
DEFAULT_CACHE_SIZE
: default max number of entries in each cacheREACH_URL
: full url of the reach textmining endpointPC_URL
: base url for pathway commons apps, to search or linkBIOPAX_CONVERTER_URL
: url for the factoid to biopax/sbgn converterGROUNDING_SEARCH_BASE_URL
: url for the grounding serviceNCBI_EUTILS_BASE_URL
: url for the NCBI E-utilitiesNCBI_EUTILS_API_KEY
: API key for the NCBI E-utilitiesINDRA_DB_BASE_URL
: url for INDRA (Integrated Network and Dynamical Reasoning Assembler)INDRA_ENGLISH_ASSEMBLER_URL
: url for service that assembles INDRA statements into modelsSEMANTIC_SEARCH_BASE_URL
: url for semantic-search web serviceORCID_BASE_URL
: url for ORCID websiteORCID_PUBLIC_API_BASE_URL
: url for version of ORCID public APINO_ABSTRACT_HANDLING
: labels directing how to sort documents missing query text. 'text' (default): autogenerate text from templates; 'date': sort by date and ignore text.CROSSREF_API_BASE_URL
: url for Crossref Unified Resource APINCBI_BASE_URL
: url for the NCBI/NLM/NIHPUBTATOR_API_PATH
: url path for the PubTator3 web service API
Links:
UNIPROT_LINK_BASE_URL
: base url concatenated to id to generate a linkoutCHEBI_LINK_BASE_URL
: base url concatenated to id to generate a linkoutPUBCHEM_LINK_BASE_URL
: base url concatenated to id to generate a linkoutNCBI_LINK_BASE_URL
: base url concatenated to id to generate a linkoutPUBMED_LINK_BASE_URL
: base url concatenated to unique id to generate linkoutDOI_LINK_BASE_URL
: base url concatenated to doi to generate linkoutGOOGLE_SCHOLAR_BASE_URL
: base url concatenated to doi, title, or pmid to generate linkoutIDENTIFIERS_ORG_ID_BASE_URL
: base url concatenated to collection id_prefix:id (i.e. prefix:accession)
Demo:
DEMO_ID
: the demo document id (defaultdemo
)DEMO_SECRET
: the demo document secret (defaultdemo
)DEMO_JOURNAL_NAME
: the journal name for the demo docDEMO_AUTHOR
: the author display name for the demo docDEMO_TITLE
: the title of the demo doc's articleDEMO_CAN_BE_SHARED
: whether the demo can be shared (defaultfalse
)DEMO_CAN_BE_SHARED_MULTIPLE_TIMES
: whether the demo can be shared multiple times (normal docs can be shared only once; defaultfalse
)SAMPLE_DOC_ID
: id for document that is used as homepage example (production)
Sharing:
DOCUMENT_IMAGE_CACHE_SIZE
: number of images to cache in memoryDOCUMENT_IMAGE_PLL_LIMIT
: max number of images to be generated in parallel (expensive)DOCUMENT_IMAGE_WIDTH
: tweet card image widthDOCUMENT_IMAGE_HEIGHT
: tweet card image heightDOCUMENT_IMAGE_PADDING
: padding around tweet card image (prevents twitter cropping issues)TWITTER_ACCOUNT_NAME
: twitter account visible on cardTWITTER_CONSUMER_KEY
: twitter api keyTWITTER_CONSUMER_SECRET
: twitter api secretTWITTER_ACCESS_TOKEN_KEY
: twitter app keyTWITTER_ACCESS_TOKEN_SECRET
: twitter app secretMAX_TWEET_LENGTH
: max characters a user can type as a share caption
Email:
EMAIL_ENABLED
: boolean to enable third-party mail service (defaultfalse
)EMAIL_FROM
: name to send emails from (defaultBiofactoid
)EMAIL_FROM_ADDR
: address to send emails from (defaultsupport@biofactoid.org
)SMTP_PORT
: mail transport port (default587
)SMTP_HOST
: mail transport host (defaultlocalhost
)SMTP_USER
: mail transport auth userSMTP_PASSWORD
: mail transport auth passwordEMAIL_VENDOR_MAILJET
: name of Mailjet vendorMAILJET_TMPLID_INVITE
: vendor email template id for an invitationMAILJET_TMPLID_FOLLOWUP
: vendor email template id for a follow-upMAILJET_TMPLID_REQUEST_ISSUE
: vendor email template id for a request error notificationEMAIL_TYPE_INVITE
: name to indicate invite emailEMAIL_TYPE_FOLLOWUP
: name to indicate follow-up emailEMAIL_TYPE_REQUEST_ISSUE
: name to indicate request error emailEMAIL_SUBJECT_INVITE
: subject text for invitation emailEMAIL_SUBJECT_FOLLOWUP
: subject text for follow-up emailEMAIL_SUBJECT_REQUEST_ISSUE
: subject text for request error email
AppSignal:
APPSIGNAL_PUSH_API_KEY
: AppSignal API keyAPPSIGNAL_APP_NAME
: name of this app (e.g. 'Biofactoid')APPSIGNAL_APP_ENV
: used to indicate which instance is running (e.g 'master', 'production', 'unstable')
Graph Database:
GRAPHDB_CONN
: The connection stringGRAPHDB_USER
: Authentication usernameGRAPHDB_PASS
: Authentication password
The following environment variables should always be set in production instances:
NODE_ENV
: set toproduction
BASE_URL
: the production urlAPI_KEY
: set to a uuid that you keep secret (used in management panel)TWITTER_ACCOUNT_NAME
: twitter account visible on cardTWITTER_API_KEY
: twitter api keyTWITTER_API_KEY_SECRET
: twitter api secretTWITTER_ACCESS_TOKEN
: twitter app keyTWITTER_ACCESS_TOKEN_SECRET
: twitter app secretNCBI_EUTILS_API_KEY
: the API key for pathwaycommons accountEMAIL_ENABLED
:true
for Mailjet supportSMTP_HOST
: Mailjet host nameSMTP_USER
: Mailjet account credentialsSMTP_PASSWORD
: Mailjet password credentialsAPPSIGNAL_PUSH_API_KEY
: AppSignal API keyAPPSIGNAL_APP_ENV
: used to indicate which instance is running (e.g 'master', 'production', 'unstable')
npm start
: start the servernpm stop
: stop the servernpm run build
: build projectnpm run build-prod
: build the project for productionnpm run bundle-profile
: visualise the bundle dependenciesnpm run clean
: clean the projectnpm run watch
: watch mode (debug mode enabled, auto rebuild, livereload)npm test
: run testsnpm run lint
: lint the projectnpm run fix
: fix minor linting errors (ones that can be automatically fixed)
Images are maintained at dockerhub. Also see factoid-docker-config.
All files /test
will be run by Mocha. You can npm test
to run all tests, or you can run mocha -g specific-test-name
(prerequisite: npm install -g mocha
) to run specific tests.
The tests expect rethinkdb
to be running on localhost
on the default port (28015).
Chai is included to make the tests easier to read and write.
Notes:
- The
Syncher.synch()
is setup separately for each test file and namespaced. The reason for this is that the tests need to be able to be run independently and previousSyncher.synch()
calls from other files would otherwise conflict. - Each test file should
require('./util/conf')
to make debugging with promises easier etc.
- Make sure the tests are passing:
npm test
- Make sure the linting is passing:
npm run lint
- Bump the version number with
npm version
, in accordance with semver. Theversion
command innpm
updates bothpackage.json
and git tags, but note that it uses av
prefix on the tags (e.g.v1.2.3
). - For a bug fix / patch release, run
npm version patch
. - For a new feature release, run
npm version minor
. - For a breaking API change, run
npm version major.
- For a specific version number (e.g. 1.2.3), run
npm version 1.2.3
. - Push the release:
git push origin --tags
- Publish a GitHub release so that Zenodo creates a DOI for this version.
Factoid depends on services whose software we maintain.
- GitHub
- grounding-search: Disambiguate bio-entities via full-text search
- semantic-search: Rank texts based on similiarity
- factoid-converters: Convert Factoid model JSON to standard languages (BioPAX and SBGN-PD)
- DockerHub
- factoid
- grounding-search
- semantic-search
- factoid-converters
- rethinkdb-docker: RethinkDB-based image with dependencies for database administration (i.e. dump and restore).