Skip to content

Commit

Permalink
fix: snakefmt and drop extraneous comments
Browse files Browse the repository at this point in the history
  • Loading branch information
j23414 committed Mar 29, 2023
1 parent 5dd06fd commit f281e2a
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions ingest/bin/post_process_metadata.py
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,10 @@ def _set_paper_url(record):
if pd.isna(record["publications"]):
return ""

return "https://www.ncbi.nlm.nih.gov/pubmed/" + str(record["publications"]).split(",")[0]
return (
"https://www.ncbi.nlm.nih.gov/pubmed/"
+ str(record["publications"]).split(",")[0]
)


def _set_dengue_serotype(record):
Expand All @@ -72,20 +75,17 @@ def _set_dengue_serotype(record):
return ""


# === Main Method
def main():
args = parse_args()
df = pd.read_csv(args.metadata, sep="\t", header=0)

# Mutate commands
df["strain"] = df.apply(_set_strain_name, axis=1)
df["url"] = df.apply(_set_url, axis=1)
df["paper_url"] = df.apply(_set_paper_url, axis=1)
df["serotype"] = df.apply(_set_dengue_serotype, axis=1)
df["authors"] = df["abbr_authors"]
df["city"] = df["location"]

# Format output
METADATA_COLUMNS = [
"strain",
"accession",
Expand Down

0 comments on commit f281e2a

Please sign in to comment.