Admin Tools

Table of Contents

Intro

The NP-MRD Article Pipeline tool functions through use of “Admin Tools” that can be used to directly modify data within the database. They are also used for various crucial functionality including curation, sending emails, validating data between the database and compound storage directory, and various other functions.

From the admin homepage various different tools are linked to from the sidebar on the left. Each of these “Admin Pages” can be broken down into one of two categories:

  • Curation Tool Admin Pages: Admin Pages which are intended to be used for day-to-day curation of incoming articles and for setting up submission emails. They are designed to provide helpful error messages to prevent most actions which would result in data records with unintended or broken combinations of entries.
  • Relational Table Editor Admin Pages: Admin Pages which are intended to be used for database management in the event that they are needed. Users are given a greater level of freedom with what they can and cannot edit in the database and there is less emphasis placed on providing helpful error messages. Breaking records in the database is very easy to do with these tools so they are intended for use by those who know what they are doing.

Accessing The Admin Tools

The Admin tools for the production website can be found at: (should this be a public link?)

Curation Tool Admin Pages

The Curation Pipeline

Curation Tool Admin Pages are intended to be used by curators to perform the following curation tasks…

  • Retrieve author surname and email from the paper (Admin Curation).
  • Validate OR correct the compound list extracted from an abstract by the NER tool (Admin Curation).
  • Select which email template to use and which correspondent to send it to (Admin Curation)
  • Confirm that an email’s generated body text is correctly formatted and set the emails send status to “ready_to_send” (Admin Curation Email)

The Admin Curation page is intended to be used as a first pass for curators. The page significantly limits which actions can be performed through it compared to what can be done using the Article Data Relational Table Editor Admin Page for the purposes of simplifying each article down to only the fields which need to be filled out when curating. These include…

Admin Curation

Editable Fields

  • ArticleData -> Manually Curated: Checkbox
    • This box is checked by default. It is used to keep track of which ArticleData records have been curated. Setting this value to true has the following affects on the associated ArticleData record…
      • Allows emails associated with its given ArticleData record to be sent
      • Causes it to be included in the Article Curation Email default filter (Confirmation Email Filter)
      • Causes it to be excluded from the Article Curation Curation Ready Filter
  • ArticleData -> Accepting Submission Checkbox
    • This box is checked by default (note this value is also set to true by default for all articles). It is used to open the associated frontend submission page.
  • ArticleData -> Excluded by Admin: Checkbox
    • This box is intended to be checked if a curator determines that we are not interested in emailing the author about the current paper. It is intended to be checked for ArticleData records which were flagged as being about natural product discovery (by the ML tool) but actually are not (though it can be used to ignore an ArticleData for other reasons if necessary). Checking this box will cause the associated ArticleData record to be excluded from the default filters in Admin Curation, Admin Curation Email, and Article Data. It should not be checked at the same time as Included by Admin.
  • ArticleData -> Included by Admin: Checkbox
    • This box is intended to be checked for a curator to include an ArticleData record that has been flagged as not about natural products by the ML model but actually are in reality. Checking it will cause the associated ArticleData object to be included in the default filers in Admin Curation, Admin Curation Email, and Article Data. It should not be checked at the same time as Excluded by Admin.
  • ArticleData -> Primary/Secondary Author Salutation: Dropdown
    • Selected from a dropdown which can be added to using the Author Salutations admin page.
  • ArticleData -> Primary/Secondary Author Surname: Textbox

  • ArticleData -> Primary/Secondary Author Email: Textbox

  • ArticleData -> Primary/Secondary Author Email: Textbox

  • Articles -> Compound Data: Textbox (JSON)
    • Textbox used to fill out the admin curated annotation of the compound data included in the associated paper. The contents are intended to be copy/pasted on https://npmrd-deposition.liningtonlab.org/admin-submission where the curator can use a GUI to set the compound names, genus, and species of each of the compounds (which they can then copy paste back into the their admin curation annotation). If there is no article associated with an admin_curation annotation source then there will be a new entry generated when opening this page by default.
  • Emails -> Email Template: Dropdown
    • Used to select which template will be used to generate an email when it is sent. Only Email Templates which are flagged as true for “Currently in use” will show up in this dropdown.
  • Emails -> Ordinal Correspondent: Dropdown
    • Used to select whether the associated email will be sent to the primary or secondary author.

Filters

  • Curation Ready Filter
    • Apply (Default): Only display articles which are intended to be curated. Since the purpose of curation is to prepare emails/compounds in order to drive user depositions we are only interested in papers which were added to the database by the rss feed, since everything else was added to the database by hand meaning any potential submitter is already aware of the submission portal. These filters include…
      • Article.doi_source.source_description = “rss_feed”
      • ArticleData.manually_curated = False
      • ArticleData.sent_to_npmrd = “no”
      • Article.annotation_source.annotation_source ≠ “user_deposition” OR “user_deposition_correction”
    • Apply + Include Hand Submitted DOIs: This filter is the same “Apply” except the with the [Article.doi_source.source_description = “rss_feed”] requirement disabled to allow for curators to see articles which they have submitted to the portal themselves by hand.
    • Disable: Do not apply any filtering.

Actions

Admin Curation Email

Editable Fields

  • ArticleData -> Excluded by Admin: Checkbox
    • Has the same functionality as “Excluded by Admin” in “Admin Curation”
  • ArticleData -> Included by Admin: Checkbox
    • Has the same functionality as “Included by Admin” in “Admin Curation”
  • Emails -> Email Template: Dropdown
    • Has the same functionality as “Email Template” in “Admin Curation”. Note that to see the changes to the email
  • Emails -> Ordinal Correspondent: Dropdown
    • Used to select whether the associated email will be sent to the primary or secondary author.

Notable (non-editable) Fields

  • Emails -> Generate email body: Textbox
    • Displays the generated email body that will be sent to the selected email correspondent. If the generated email body contains any tags in curly braces (“{}”) then its email cannot be sent. This is to prevent any member of the public from receiving emails with empty entries. The curator should ensure that none of these tags are present else the email will fail when its send action is triggered. * Note that to observe any reflections in this

Actions

  • Send email
    • This action can be used to send emails for any selected articles. After an article is selected the admin will be taken to an intermediate page where they can select which emails to send by checking the “Send Email?” box. In order to send an email its status must be sent to ready and the email must pass all checks in order to send (no curly braces in generated email body, email address for selected correspondent exists in the database).

Relational Table Editor Admin Pages

Article Data

The Article Data admin page of the admin site is intended to be used for general database management. The entity editor displays records from the ArticleData table itself as well as various records from other relational tables that use a given ArticleData record’s uuid as a foreign key. These include Article, Emails, MLResults, and NERResults records. This admin page allows for all almost all fields to be edited and the database can wind up storing data in unintended ways if fields are carelessly changed. This page is intended as a last resort in the event that an entry must be (carefully) corrected by hand.

Annotation Sources / Citation Sources / DOI Sources

The Annotation Sources, Citation Source, and DOI Sources admin pages are used to view AnnotationSource, CitationSource, and DOISource records respectively. Since many records in other relational tables in the database rely on these records as foreign keys they cannot edited or changed from this page. New entries should only be added with new functionality.

Author Salutations

The Author Salutations admin page is used to add different AuthorSalutation records that are added to the automatically generated emails when sent.

Email Templates

The Email Templates admin page is used to add, edit, rename, and mark as “currently in use” EmailTemplate records in the Database. New email templates can be easily added but note that the footer of each email is hardcoded into an html document in the article_pipeline backend directory (under templates/email_footer_table.html). Templates themselves can be edited because creating new templates can often be finicky but templates that have been used to send emails to the public should NOT be changed to maintain a record of the text that emails which have already been sent contained. Template names are displayed in dropdowns when selecting email templates during curation. Finally, the currently in use checkmark causes the template to show up in curation dropdowns so that abandoned templates are not accidentally selected.

ML Results

The ML results admin page is used to examine the results of the Machine Learning model (which is used to identify whether articles are about natural products or not).

NER Results

The ML results admin page is used to examine the results of the NER model (which is used to identify whether articles are about natural products or not).