Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add additional automation to Methods manuscript #967

Merged
merged 10 commits into from
May 26, 2021
Merged
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,7 @@ Thumbs.db

## Text Editors
.vscode
.idea

## Spellcheck script
spellcheck.lua
28 changes: 26 additions & 2 deletions build/assets/acm-pandoc-conf.tex
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
% Adaptation of the template by Wouter Groeneveld
% https://brainbaking.com/post/2021/02/writing-academic-papers-in-markdown/

\documentclass[sigconf]{acmart}

\usepackage{balance} % balancing bibstyles as per request in accepted submission
Expand Down Expand Up @@ -44,6 +47,25 @@
$endif$
}
$endfor$
$for(author.additionalaffiliations)$
\additionalaffiliation{
$if(author.additionalaffiliations.institution)$
\institution{$author.additionalaffiliations.institution$}
$endif$
$if(author.additionalaffiliations.department)$
\department{$author.additionalaffiliations.department$}
$endif$
$if(author.additionalaffiliations.city)$
\city{$author.additionalaffiliations.city$}
$endif$
$if(author.additionalaffiliations.state)$
\state{$author.additionalaffiliations.state$}
$endif$
$if(author.additionalaffiliations.country)$
\country{$author.additionalaffiliations.country$}
$endif$
}
$endfor$
$if(author.email)$
\email{$author.email$}
$endif$
Expand Down Expand Up @@ -90,6 +112,10 @@

$body$

% Add funding statement as a comment so it can be manually reviewed and condensed
$if(funding)$
%{$funding$}
$endif$

$if(bibfile)$
\balance
Expand All @@ -98,5 +124,3 @@

\end{document}
\endinput
%%
%% End of file `sample-authordraft.tex'.
24 changes: 22 additions & 2 deletions build/update-latex-metadata.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
import yaml
from manubot.util import read_serialized_data

MISSING_AFFILIATIONS = [{"institution": "None"}]
MISSING_AFFILIATIONS = [{"institution": " "}]
MISSING_COI = "None"
ACM_BCB_2021 = {"acm": [{"copyrightyear": "2021",
"copyright": "acmcopyright",
Expand Down Expand Up @@ -77,15 +77,21 @@ def update_latex(keyword, manubot_file, pandoc_file):
keep_fields = {"name", "email", "orcid"} # do not keep the old affiliations
latex_authors = []
conflicts = []
funding = []
for author in individual_authors:
latex_author = {field: author[field] for field in keep_fields if field in author}

# A list of the author's affiliations formatted for the template
# The first affiliation is stored in the "affiliations" field
# Any additional affiliations are stored in the "additionalaffiliations" field
affiliations = author["manuscripts"][keyword].get("affiliations", MISSING_AFFILIATIONS)
if affiliations == MISSING_AFFILIATIONS:
sys.stderr.write(f"Missing {keyword} affiliations for {author['name']}\n")

latex_author["affiliations"] = affiliations
if len(affiliations) > 0:
latex_author["affiliations"] = affiliations[0]
if len(affiliations) > 1:
latex_author["additionalaffiliations"] = affiliations[1:]
latex_authors.append(latex_author)

# Check whether the author has declared conflicts of interest
Expand All @@ -94,6 +100,17 @@ def update_latex(keyword, manubot_file, pandoc_file):
if conflict != "None":
conflicts.append(f"{author['name']}: {conflict}.")

# Check whether the author has funding
# This text will not be used directly but will help write a funding statement manually
if "funders" in author:
# Less robust handling of funders field than Manubot
# https://github.com/manubot/manubot/blob/3ff3000f76dcf82a30694d076a4da95326e3f6ae/manubot/process/util.py#L78
funders = author["funders"]
if isinstance(funders, list):
funders = "; ".join(funders)
# Assumes initials are always provided
funding.append(f"{author['initials']}: {funders}.")

sys.stderr.write(f"Found {len(latex_authors)} authors for {keyword} manuscript\n")

# Do not retain the other metadata fields and add the .bib file references
Expand All @@ -102,6 +119,9 @@ def update_latex(keyword, manubot_file, pandoc_file):
# Add conflicts if any exist
if len(conflicts) > 0:
metadata["conflicts"] = "Conflicts of interest. " + " ".join(conflicts)
# Add funding comment if funders were listed
if len(funding) > 0:
metadata["funding"] = "Author funding. " + " ".join(funding)

dump_yaml(metadata, pandoc_file)

Expand Down
2 changes: 1 addition & 1 deletion content/20.pharmaceuticals.md
Original file line number Diff line number Diff line change
Expand Up @@ -117,7 +117,7 @@ Similarly, this medication was pursued for COVID-19, but a retrospective cohort
Therefore, experience with prior severe threats from HCoV provided some ideas of how to approach the treatment of COVID-19, but it was not clear how effective these measures would be.

However, one treatment adapted from prior HCoV outbreaks is currently the best-known treatment for severe cases of COVID-19.
Corticosteroids are a well-known, widely available treatment for pneumonia [@doi:10.1002/14651858.CD007720.pub3; @doi:10.1002/14651858.CD007720.pub2; @doi: 10.1183/09031936.00154107; @doi:10.1007/s00408-007-9020-3; @doi:10.1371/journal.pone.0047926; @doi:10.1186/cc10103] that have also been debated as a possible treatment for ARDS [@doi:10/ggpxzc; @doi:10/gcv2; @doi:10.1378/chest.06-1743; @doi:10.1378/chest.07-0714; @doi:10.1056/NEJMoa051693; @doi:10.1136/bmj.39537.939039.BE].
Corticosteroids are a well-known, widely available treatment for pneumonia [@doi:10.1002/14651858.CD007720.pub3; @doi:10.1002/14651858.CD007720.pub2; @doi:10.1183/09031936.00154107; @doi:10.1007/s00408-007-9020-3; @doi:10.1371/journal.pone.0047926; @doi:10.1186/cc10103] that have also been debated as a possible treatment for ARDS [@doi:10/ggpxzc; @doi:10/gcv2; @doi:10.1378/chest.06-1743; @doi:10.1378/chest.07-0714; @doi:10.1056/NEJMoa051693; @doi:10.1136/bmj.39537.939039.BE].
Corticosteroids were also used and subsequently evaluated as possible supportive care for SARS and MERS.
In general, studies and meta-analyses have not found strong support for efficacy of corticosteroids against mortality in these HCoV infections [@doi:10.1136/thx.2003.017665; @doi:10.1016/j.jinf.2006.01.005; @doi:10.1136/thx.2003.017665; @doi:10.1038/s41375-020-0848-3]; however, others did find that the treatments showed some potential and suggested that greater effects might be revealed by refining treatment protocols, such as dosage and timing [@doi:10.1007/s10156-003-0296-9].
While much of the information available about the corticosteroid treatment of SARS focuses on methylprednisolone and hydrocortisone, availability issues for these drugs at the time led to dexamethasone also being used in North America [@doi:10.1056/NEJMp030072].
Expand Down
Loading