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:
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; either production
or development
(default)PORT
: the port on which the server runs (default 3000
)LOG_LEVEL
: minimum log level; one of info
(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 dataDatabase:
DB_NAME
: name of the db (default factoid
)DB_HOST
: hostname or ip address of the database host (default localhost
)DB_PORT
: port where the db can be accessed (default 28015
, 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 tasksServices:
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 APILinks:
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 (default demo
)DEMO_SECRET
: the demo document secret (default demo
)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 (default false
)DEMO_CAN_BE_SHARED_MULTIPLE_TIMES
: whether the demo can be shared multiple times (normal docs can be shared only once; default false
)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 captionEmail:
EMAIL_ENABLED
: boolean to enable third-party mail service (default false
)EMAIL_FROM
: name to send emails from (default Biofactoid
)EMAIL_FROM_ADDR
: address to send emails from (default support@biofactoid.org
)SMTP_PORT
: mail transport port (default 587
)SMTP_HOST
: mail transport host (default localhost
)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 emailAppSignal:
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 passwordThe following environment variables should always be set in production instances:
NODE_ENV
: set to production
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:
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 previous Syncher.synch()
calls from other files would otherwise conflict.require('./util/conf')
to make debugging with promises easier etc.npm test
npm run lint
npm version
, in accordance with semver. The version
command in npm
updates both package.json
and git tags, but note that it uses a v
prefix on the tags (e.g. v1.2.3
).
npm version patch
.npm version minor
.npm version major.
npm version 1.2.3
.git push origin --tags
Factoid depends on services whose software we maintain.