diff --git a/ingest/bin/post_process_metadata.py b/ingest/bin/post_process_metadata.py index 1c95ef6c..678b7850 100755 --- a/ingest/bin/post_process_metadata.py +++ b/ingest/bin/post_process_metadata.py @@ -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): @@ -72,12 +75,10 @@ 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) @@ -85,7 +86,6 @@ def main(): df["authors"] = df["abbr_authors"] df["city"] = df["location"] - # Format output METADATA_COLUMNS = [ "strain", "accession",