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

Include PMID in PubMed imports #11488

Closed
ryan-carpenter opened this issue Jul 12, 2024 · 3 comments · Fixed by #11513
Closed

Include PMID in PubMed imports #11488

ryan-carpenter opened this issue Jul 12, 2024 · 3 comments · Fixed by #11513
Labels
bug Confirmed bugs or reports that are very likely to be bugs good first issue An issue intended for project-newcomers. Varies in difficulty.

Comments

@ryan-carpenter
Copy link

The MEDLINE importer does not include PubMed IDs (PMID) when importing from PubMed text files.

This is problematic for two reasons:

  1. PMID is an important identifier
  2. JabRef includes PMID when importing via API, so the behavior is inconsistent

PubMed records also have an NLM unique identifier that JabRef imports, but this is not the same as the PMID and does not substitute for it. MEDLINE records produced by sources other than PubMed tend to include the PMID and not the NLM identifier, so the PMID is more useful for merging and deduplicating entries in JabRef. The PMID can also be used to visit the record on PubMed, fetch additional data, and so on.

The MEDLINE importer should include the PMID element from pubmed/medline files.

See MEDLINE/PubMed Data Element (Field) Descriptions for information about the elements included in PubMed text files.

@ryan-carpenter
Copy link
Author

Map<String, Field> hashMap = new HashMap<>();
hashMap.put("PG", StandardField.PAGES);
hashMap.put("PL", StandardField.ADDRESS);
hashMap.put("PHST", new UnknownField("history"));
hashMap.put("PST", new UnknownField("publication-status"));
hashMap.put("VI", StandardField.VOLUME);
hashMap.put("LA", StandardField.LANGUAGE);
hashMap.put("PUBM", new UnknownField("model"));
hashMap.put("RN", new UnknownField("registry-number"));
hashMap.put("NM", new UnknownField("substance-name"));
hashMap.put("OCI", new UnknownField("copyright-owner"));
hashMap.put("CN", new UnknownField("corporate"));
hashMap.put("IP", StandardField.ISSUE);
hashMap.put("EN", StandardField.EDITION);
hashMap.put("GS", new UnknownField("gene-symbol"));
hashMap.put("GN", StandardField.NOTE);
hashMap.put("GR", new UnknownField("grantno"));
hashMap.put("SO", new UnknownField("source"));
hashMap.put("NR", new UnknownField("number-of-references"));
hashMap.put("SFM", new UnknownField("space-flight-mission"));
hashMap.put("STAT", new UnknownField("status"));
hashMap.put("SB", new UnknownField("subset"));
hashMap.put("OTO", new UnknownField("termowner"));
hashMap.put("OWN", StandardField.OWNER);

@Siedlerchr Siedlerchr added bug Confirmed bugs or reports that are very likely to be bugs good first issue An issue intended for project-newcomers. Varies in difficulty. labels Jul 12, 2024
@github-project-automation github-project-automation bot moved this to Normal priority in Prioritization Jul 12, 2024
@github-project-automation github-project-automation bot moved this to Free to take in Good First Issues Jul 12, 2024
@ryan-carpenter
Copy link
Author

ryan-carpenter commented Jul 12, 2024

Is this all it would take to resolve the issue?

hashMap.put("PMID", new UnknownField("pmid")); 

@Siedlerchr
Copy link
Member

Yes, that should be enough. You can do it through the github UI (just click on Edit File). You might need to adjust the MedlinePlainImporterTest as well if it fails but CI will tell you that :)

Siedlerchr added a commit that referenced this issue Jul 17, 2024
github-merge-queue bot pushed a commit that referenced this issue Jul 18, 2024
* import PMID field in Pubmed

Fixes #11488

* fix tests

---------

Co-authored-by: Carl Christian Snethlage <50491877+calixtus@users.noreply.github.com>
@github-project-automation github-project-automation bot moved this from Normal priority to Done in Prioritization Jul 18, 2024
@github-project-automation github-project-automation bot moved this from Free to take to Done in Good First Issues Jul 18, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Confirmed bugs or reports that are very likely to be bugs good first issue An issue intended for project-newcomers. Varies in difficulty.
Projects
Archived in project
Archived in project
Development

Successfully merging a pull request may close this issue.

2 participants