Merge branch 'beta' into tagEosc

This commit is contained in:
Claudio Atzori 2022-07-25 14:12:59 +02:00
commit 612b7a5530
6 changed files with 402 additions and 32 deletions

View File

@ -17,6 +17,9 @@ public class PMArticle implements Serializable {
* the Pubmed Identifier
*/
private String pmid;
private String pmcId;
/**
* the DOI
*/
@ -122,7 +125,7 @@ public class PMArticle implements Serializable {
/**
* The full journal title (taken from NLM cataloging data following NLM rules for how to compile a serial name) is exported in this element.
* Some characters that are not part of the NLM MEDLINE/PubMed Character Set reside in a relatively small number of full journal titles.
* Some characters that are not part of the NLM MEDLINE/PubMed Character Set reside in a relatively small number of full journal titles.
* The NLM journal title abbreviation is exported in the <MedlineTA> element.
*
* @return the pubmed Journal Extracted
@ -140,10 +143,11 @@ public class PMArticle implements Serializable {
}
/**
* English-language abstracts are taken directly from the published article.
* If the article does not have a published abstract, the National Library of Medicine does not create one,
* thus the record lacks the <Abstract> and <AbstractText> elements. However, in the absence of a formally
* labeled abstract in the published article, text from a substantive "summary", "summary and conclusions" or "conclusions and summary" may be used.
* <ArticleTitle> contains the entire title of the journal article. <ArticleTitle> is always in English;
* those titles originally published in a non-English language and translated for <ArticleTitle> are enclosed in square brackets.
* All titles end with a period unless another punctuation mark such as a question mark or bracket is present.
* Explanatory information about the title itself is enclosed in parentheses, e.g.: (author's transl).
* Corporate/collective authors may appear at the end of <ArticleTitle> for citations up to about the year 2000.
*
* @return the extracted pubmed Title
*/
@ -250,4 +254,14 @@ public class PMArticle implements Serializable {
public List<PMGrant> getGrants() {
return grants;
}
public String getPmcId() {
return pmcId;
}
public PMArticle setPmcId(String pmcId) {
this.pmcId = pmcId;
return this;
}
}

View File

@ -98,6 +98,7 @@ class PMParser(xml: XMLEventReader) extends Iterator[PMArticle] {
case "PMID" => currentArticle.setPmid(text.trim)
case "ArticleId" =>
if ("doi".equalsIgnoreCase(currentArticleType)) currentArticle.setDoi(text.trim)
if ("pmc".equalsIgnoreCase(currentArticleType)) currentArticle.setPmcId(text.trim)
case "Language" => currentArticle.setLanguage(text.trim)
case "ISSN" => currentJournal.setIssn(text.trim)
case "GrantID" => currentGrant.setGrantID(text.trim)

View File

@ -4,9 +4,12 @@ import eu.dnetlib.dhp.common.vocabulary.VocabularyGroup
import eu.dnetlib.dhp.schema.common.ModelConstants
import eu.dnetlib.dhp.schema.oaf.utils.{GraphCleaningFunctions, IdentifierFactory, OafMapperUtils, PidType}
import eu.dnetlib.dhp.schema.oaf._
import collection.JavaConverters._
import eu.dnetlib.dhp.utils.DHPUtils
import org.apache.commons.lang3.StringUtils
import collection.JavaConverters._
import java.util.regex.Pattern
import scala.collection.mutable.ListBuffer
/**
*/
@ -14,6 +17,9 @@ object PubMedToOaf {
val SUBJ_CLASS = "keywords"
val OAI_HEADER = "oai:pubmedcentral.nih.gov:"
val OLD_PMC_PREFIX = "od_______267::"
val urlMap = Map(
"pmid" -> "https://pubmed.ncbi.nlm.nih.gov/",
"doi" -> "https://dx.doi.org/"
@ -50,6 +56,17 @@ object PubMedToOaf {
null
}
def createOriginalOpenaireId(article:PMArticle) :String = {
if (StringUtils.isNotEmpty(article.getPmcId)) {
val md5 = DHPUtils.md5(s"$OAI_HEADER${article.getPmcId.replace("PMC","")}")
s"$OLD_PMC_PREFIX$md5"
}
else
null
}
/** Create an instance of class extends Result
* starting from OAF instanceType value
*
@ -122,8 +139,9 @@ object PubMedToOaf {
return null
// MAP PMID into pid with classid = classname = pmid
val pidList: List[StructuredProperty] = List(
OafMapperUtils.structuredProperty(
val pidList = ListBuffer[StructuredProperty]()
pidList += OafMapperUtils.structuredProperty(
article.getPmid,
PidType.pmid.toString,
PidType.pmid.toString,
@ -131,7 +149,19 @@ object PubMedToOaf {
ModelConstants.DNET_PID_TYPES,
dataInfo
)
)
if (StringUtils.isNotBlank(article.getPmcId))
{
pidList += OafMapperUtils.structuredProperty(
article.getPmcId,
PidType.pmc.toString,
PidType.pmc.toString,
ModelConstants.DNET_PID_TYPES,
ModelConstants.DNET_PID_TYPES,
dataInfo
)
}
if (pidList == null)
return null
@ -186,6 +216,7 @@ object PubMedToOaf {
val urlLists: List[String] = pidList
.map(s => (urlMap.getOrElse(s.getQualifier.getClassid, ""), s.getValue))
.filter(t => t._1.nonEmpty)
.toList
.map(t => t._1 + t._2)
if (urlLists != null)
pubmedInstance.setUrl(urlLists.asJava)
@ -262,7 +293,14 @@ object PubMedToOaf {
if (authors != null && authors.nonEmpty)
result.setAuthor(authors.asJava)
result.setOriginalId(pidList.map(s => s.getValue).asJava)
if (StringUtils.isNotEmpty(article.getPmcId)) {
val originalIDS = ListBuffer[String]()
originalIDS += createOriginalOpenaireId(article)
pidList.map(s => s.getValue).foreach(p =>originalIDS += p)
result.setOriginalId(originalIDS.asJava)
} else
result.setOriginalId(pidList.map(s => s.getValue).asJava)
result.setId(article.getPmid)

View File

@ -195,7 +195,9 @@
<Title>Biochemical and biophysical research communications</Title>
<ISOAbbreviation>Biochem Biophys Res Commun</ISOAbbreviation>
</Journal>
<ArticleTitle>Delineation of the intimate details of the backbone conformation of pyridine nucleotide coenzymes in aqueous solution.</ArticleTitle>
<ArticleTitle>Delineation of the intimate details of the backbone conformation of pyridine nucleotide
coenzymes in aqueous solution.
</ArticleTitle>
<Pagination>
<MedlinePgn>1173-9</MedlinePgn>
</Pagination>
@ -473,7 +475,9 @@
<Title>Biochemical and biophysical research communications</Title>
<ISOAbbreviation>Biochem Biophys Res Commun</ISOAbbreviation>
</Journal>
<ArticleTitle>Effect of chloroquine on cultured fibroblasts: release of lysosomal hydrolases and inhibition of their uptake.</ArticleTitle>
<ArticleTitle>Effect of chloroquine on cultured fibroblasts: release of lysosomal hydrolases and
inhibition of their uptake.
</ArticleTitle>
<Pagination>
<MedlinePgn>1338-43</MedlinePgn>
</Pagination>
@ -657,7 +661,8 @@
<Title>Biochemical and biophysical research communications</Title>
<ISOAbbreviation>Biochem Biophys Res Commun</ISOAbbreviation>
</Journal>
<ArticleTitle>Atomic models for the polypeptide backbones of myohemerythrin and hemerythrin.</ArticleTitle>
<ArticleTitle>Atomic models for the polypeptide backbones of myohemerythrin and hemerythrin.
</ArticleTitle>
<Pagination>
<MedlinePgn>1349-56</MedlinePgn>
</Pagination>
@ -1627,7 +1632,9 @@
<Title>Biochemical pharmacology</Title>
<ISOAbbreviation>Biochem Pharmacol</ISOAbbreviation>
</Journal>
<ArticleTitle>Comparison between procaine and isocarboxazid metabolism in vitro by a liver microsomal amidase-esterase.</ArticleTitle>
<ArticleTitle>Comparison between procaine and isocarboxazid metabolism in vitro by a liver microsomal
amidase-esterase.
</ArticleTitle>
<Pagination>
<MedlinePgn>1517-21</MedlinePgn>
</Pagination>
@ -2030,7 +2037,9 @@
<Title>Biochemical pharmacology</Title>
<ISOAbbreviation>Biochem Pharmacol</ISOAbbreviation>
</Journal>
<ArticleTitle>Radiochemical assay of glutathione S-epoxide transferase and its enhancement by phenobarbital in rat liver in vivo.</ArticleTitle>
<ArticleTitle>Radiochemical assay of glutathione S-epoxide transferase and its enhancement by
phenobarbital in rat liver in vivo.
</ArticleTitle>
<Pagination>
<MedlinePgn>1569-72</MedlinePgn>
</Pagination>
@ -2350,7 +2359,9 @@
<Title>Biochemical pharmacology</Title>
<ISOAbbreviation>Biochem Pharmacol</ISOAbbreviation>
</Journal>
<ArticleTitle>Identification of adenylate cyclase-coupled beta-adrenergic receptors with radiolabeled beta-adrenergic antagonists.</ArticleTitle>
<ArticleTitle>Identification of adenylate cyclase-coupled beta-adrenergic receptors with radiolabeled
beta-adrenergic antagonists.
</ArticleTitle>
<Pagination>
<MedlinePgn>1651-8</MedlinePgn>
</Pagination>
@ -2598,7 +2609,9 @@
<Title>Biochemical pharmacology</Title>
<ISOAbbreviation>Biochem Pharmacol</ISOAbbreviation>
</Journal>
<ArticleTitle>The effect of adrenaline and of alpha- and beta-adrenergic blocking agents on ATP concentration and on incorporation of 32Pi into ATP in rat fat cells.</ArticleTitle>
<ArticleTitle>The effect of adrenaline and of alpha- and beta-adrenergic blocking agents on ATP
concentration and on incorporation of 32Pi into ATP in rat fat cells.
</ArticleTitle>
<Pagination>
<MedlinePgn>1659-62</MedlinePgn>
</Pagination>
@ -2851,7 +2864,9 @@
<Title>Biochemical pharmacology</Title>
<ISOAbbreviation>Biochem Pharmacol</ISOAbbreviation>
</Journal>
<ArticleTitle>Action of propranolol on mitochondrial functions--effects on energized ion fluxes in the presence of valinomycin.</ArticleTitle>
<ArticleTitle>Action of propranolol on mitochondrial functions--effects on energized ion fluxes in the
presence of valinomycin.
</ArticleTitle>
<Pagination>
<MedlinePgn>1701-5</MedlinePgn>
</Pagination>
@ -3265,7 +3280,8 @@
</Chemical>
<Chemical>
<RegistryNumber>EC 2.6.1.16</RegistryNumber>
<NameOfSubstance UI="D005945">Glutamine-Fructose-6-Phosphate Transaminase (Isomerizing)</NameOfSubstance>
<NameOfSubstance UI="D005945">Glutamine-Fructose-6-Phosphate Transaminase (Isomerizing)
</NameOfSubstance>
</Chemical>
<Chemical>
<RegistryNumber>EC 2.7.-</RegistryNumber>
@ -3324,7 +3340,9 @@
<DescriptorName UI="D005944" MajorTopicYN="N">Glucosamine</DescriptorName>
</MeshHeading>
<MeshHeading>
<DescriptorName UI="D005945" MajorTopicYN="N">Glutamine-Fructose-6-Phosphate Transaminase (Isomerizing)</DescriptorName>
<DescriptorName UI="D005945" MajorTopicYN="N">Glutamine-Fructose-6-Phosphate Transaminase
(Isomerizing)
</DescriptorName>
<QualifierName UI="Q000378" MajorTopicYN="N">metabolism</QualifierName>
</MeshHeading>
<MeshHeading>
@ -3463,7 +3481,8 @@
<Title>Biochemical pharmacology</Title>
<ISOAbbreviation>Biochem Pharmacol</ISOAbbreviation>
</Journal>
<ArticleTitle>Inhibition of aldehyde reductase by acidic metabolites of the biogenic amines.</ArticleTitle>
<ArticleTitle>Inhibition of aldehyde reductase by acidic metabolites of the biogenic amines.
</ArticleTitle>
<Pagination>
<MedlinePgn>1731-3</MedlinePgn>
</Pagination>
@ -3696,7 +3715,9 @@
<Title>Biochemical pharmacology</Title>
<ISOAbbreviation>Biochem Pharmacol</ISOAbbreviation>
</Journal>
<ArticleTitle>Effects of 5,6-dihydroxytryptamine on tyrosine-hydroxylase activity in central catecholaminergic neurons of the rat.</ArticleTitle>
<ArticleTitle>Effects of 5,6-dihydroxytryptamine on tyrosine-hydroxylase activity in central
catecholaminergic neurons of the rat.
</ArticleTitle>
<Pagination>
<MedlinePgn>1739-42</MedlinePgn>
</Pagination>
@ -4602,12 +4623,19 @@
<Title>Arzneimittel-Forschung</Title>
<ISOAbbreviation>Arzneimittelforschung</ISOAbbreviation>
</Journal>
<ArticleTitle>[Biochemical studies on camomile components/III. In vitro studies about the antipeptic activity of (--)-alpha-bisabolol (author's transl)].</ArticleTitle>
<ArticleTitle>[Biochemical studies on camomile components/III. In vitro studies about the antipeptic
activity of (--)-alpha-bisabolol (author's transl)].
</ArticleTitle>
<Pagination>
<MedlinePgn>1352-4</MedlinePgn>
</Pagination>
<Abstract>
<AbstractText>(--)-alpha-Bisabolol has a primary antipeptic action depending on dosage, which is not caused by an alteration of the pH-value. The proteolytic activity of pepsin is reduced by 50 percent through addition of bisabolol in the ratio of 1/0.5. The antipeptic action of bisabolol only occurs in case of direct contact. In case of a previous contact with the substrate, the inhibiting effect is lost.</AbstractText>
<AbstractText>(--)-alpha-Bisabolol has a primary antipeptic action depending on dosage, which is not
caused by an alteration of the pH-value. The proteolytic activity of pepsin is reduced by 50
percent through addition of bisabolol in the ratio of 1/0.5. The antipeptic action of bisabolol
only occurs in case of direct contact. In case of a previous contact with the substrate, the
inhibiting effect is lost.
</AbstractText>
</Abstract>
<AuthorList CompleteYN="Y">
<Author ValidYN="Y">
@ -4626,7 +4654,9 @@
<PublicationType UI="D004740">English Abstract</PublicationType>
<PublicationType UI="D016428">Journal Article</PublicationType>
</PublicationTypeList>
<VernacularTitle>Biochemische Untersuchungen von Kamilleninhaltsstoffen. III. In-vitro-Versuche über die antipeptische Wirkung des (-)-alpha-Bisabolols</VernacularTitle>
<VernacularTitle>Biochemische Untersuchungen von Kamilleninhaltsstoffen. III. In-vitro-Versuche über die
antipeptische Wirkung des (-)-alpha-Bisabolols
</VernacularTitle>
</Article>
<MedlineJournalInfo>
<Country>Germany</Country>
@ -4753,12 +4783,37 @@
<Title>Arzneimittel-Forschung</Title>
<ISOAbbreviation>Arzneimittelforschung</ISOAbbreviation>
</Journal>
<ArticleTitle>[Demonstration of tumor inhibiting properties of a strongly immunostimulating low-molecular weight substance. Comparative studies with ifosfamide on the immuno-labile DS carcinosarcoma. Stimulation of the autoimmune activity for approx. 20 days by BA 1, a N-(2-cyanoethylene)-urea. Novel prophylactic possibilities].</ArticleTitle>
<ArticleTitle>[Demonstration of tumor inhibiting properties of a strongly immunostimulating
low-molecular weight substance. Comparative studies with ifosfamide on the immuno-labile DS
carcinosarcoma. Stimulation of the autoimmune activity for approx. 20 days by BA 1, a
N-(2-cyanoethylene)-urea. Novel prophylactic possibilities].
</ArticleTitle>
<Pagination>
<MedlinePgn>1369-79</MedlinePgn>
</Pagination>
<Abstract>
<AbstractText>A report is given on the recent discovery of outstanding immunological properties in BA 1 [N-(2-cyanoethylene)-urea] having a (low) molecular mass M = 111.104. Experiments in 214 DS carcinosarcoma bearing Wistar rats have shown that BA 1, at a dosage of only about 12 percent LD50 (150 mg kg) and negligible lethality (1.7 percent), results in a recovery rate of 40 percent without hyperglycemia and, in one test, of 80 percent with hyperglycemia. Under otherwise unchanged conditions the reference substance ifosfamide (IF) -- a further development of cyclophosphamide -- applied without hyperglycemia in its most efficient dosage of 47 percent LD50 (150 mg kg) brought about a recovery rate of 25 percent at a lethality of 18 percent. (Contrary to BA 1, 250-min hyperglycemia caused no further improvement of the recovery rate.) However this comparison is characterized by the fact that both substances exhibit two quite different (complementary) mechanisms of action. Leucocyte counts made after application of the said cancerostatics and dosages have shown a pronounced stimulation with BA 1 and with ifosfamide, the known suppression in the post-therapeutic interval usually found with standard cancerostatics. In combination with the cited plaque test for BA 1, blood pictures then allow conclusions on the immunity status. Since IF can be taken as one of the most efficient cancerostatics--there is no other chemotherapeutic known up to now that has a more significant effect on the DS carcinosarcoma in rats -- these findings are of special importance. Finally, the total amount of leucocytes and lymphocytes as well as their time behaviour was determined from the blood picture of tumour-free rats after i.v. application of BA 1. The thus obtained numerical values clearly show that further research work on the prophylactic use of this substance seems to be necessary and very promising.</AbstractText>
<AbstractText>A report is given on the recent discovery of outstanding immunological properties in
BA 1 [N-(2-cyanoethylene)-urea] having a (low) molecular mass M = 111.104. Experiments in 214 DS
carcinosarcoma bearing Wistar rats have shown that BA 1, at a dosage of only about 12 percent
LD50 (150 mg kg) and negligible lethality (1.7 percent), results in a recovery rate of 40
percent without hyperglycemia and, in one test, of 80 percent with hyperglycemia. Under
otherwise unchanged conditions the reference substance ifosfamide (IF) -- a further development
of cyclophosphamide -- applied without hyperglycemia in its most efficient dosage of 47 percent
LD50 (150 mg kg) brought about a recovery rate of 25 percent at a lethality of 18 percent.
(Contrary to BA 1, 250-min hyperglycemia caused no further improvement of the recovery rate.)
However this comparison is characterized by the fact that both substances exhibit two quite
different (complementary) mechanisms of action. Leucocyte counts made after application of the
said cancerostatics and dosages have shown a pronounced stimulation with BA 1 and with
ifosfamide, the known suppression in the post-therapeutic interval usually found with standard
cancerostatics. In combination with the cited plaque test for BA 1, blood pictures then allow
conclusions on the immunity status. Since IF can be taken as one of the most efficient
cancerostatics--there is no other chemotherapeutic known up to now that has a more significant
effect on the DS carcinosarcoma in rats -- these findings are of special importance. Finally,
the total amount of leucocytes and lymphocytes as well as their time behaviour was determined
from the blood picture of tumour-free rats after i.v. application of BA 1. The thus obtained
numerical values clearly show that further research work on the prophylactic use of this
substance seems to be necessary and very promising.
</AbstractText>
</Abstract>
<AuthorList CompleteYN="Y">
<Author ValidYN="Y">
@ -4778,7 +4833,11 @@
<PublicationType UI="D004740">English Abstract</PublicationType>
<PublicationType UI="D016428">Journal Article</PublicationType>
</PublicationTypeList>
<VernacularTitle>Nachweis krebshemmender Eigenschaften einer stark immunstimulierenden Verbindung kleiner Molekülmasse. Versuche am immunlabilen DS-Karzinosarkom im Vergleich mit Ifosfamid. Stimulierung der körpereigenen Abwehr über etwa 20 Tage durch BA 1, einen N-(2-Cyanthylen)-harnstoff. Neue prophylaktische Möglichkeiten</VernacularTitle>
<VernacularTitle>Nachweis krebshemmender Eigenschaften einer stark immunstimulierenden Verbindung
kleiner Molekülmasse. Versuche am immunlabilen DS-Karzinosarkom im Vergleich mit Ifosfamid.
Stimulierung der körpereigenen Abwehr über etwa 20 Tage durch BA 1, einen
N-(2-Cyanthylen)-harnstoff. Neue prophylaktische Möglichkeiten
</VernacularTitle>
</Article>
<MedlineJournalInfo>
<Country>Germany</Country>
@ -5016,7 +5075,20 @@
<MedlinePgn>1400-3</MedlinePgn>
</Pagination>
<Abstract>
<AbstractText>The distribution of blood flow to the subendocardial, medium and subepicardial layers of the left ventricular free wall was studied in anaesthetized dogs under normoxic (A), hypoxic (B) conditions and under pharmacologically induced (etafenone) coronary vasodilation (C). Regional myocardial blood flow was determined by means of the particle distribution method. In normoxia a transmural gradient of flow was observed, with the subendocardial layers receiving a significantly higher flow rate compared with the subepicardial layers. In hypoxia induced vasodilation this transmural gradient of flow was persistent. In contrast a marked redistribution of regional flow was observed under pharmacologically induced vasodilation. The transmural gradient decreased. In contrast to some findings these experiments demonstrate that a considerable vasodilatory capacity exists in all layers of the myocardium and can be utilized by drugs. The differences observed for the intramural distribution pattern of flow under hypoxia and drug induced vasodilation support the hypothesis that this pattern reflects corresponding gradients of regional myocardial metabolism.</AbstractText>
<AbstractText>The distribution of blood flow to the subendocardial, medium and subepicardial layers
of the left ventricular free wall was studied in anaesthetized dogs under normoxic (A), hypoxic
(B) conditions and under pharmacologically induced (etafenone) coronary vasodilation (C).
Regional myocardial blood flow was determined by means of the particle distribution method. In
normoxia a transmural gradient of flow was observed, with the subendocardial layers receiving a
significantly higher flow rate compared with the subepicardial layers. In hypoxia induced
vasodilation this transmural gradient of flow was persistent. In contrast a marked
redistribution of regional flow was observed under pharmacologically induced vasodilation. The
transmural gradient decreased. In contrast to some findings these experiments demonstrate that a
considerable vasodilatory capacity exists in all layers of the myocardium and can be utilized by
drugs. The differences observed for the intramural distribution pattern of flow under hypoxia
and drug induced vasodilation support the hypothesis that this pattern reflects corresponding
gradients of regional myocardial metabolism.
</AbstractText>
</Abstract>
<AuthorList CompleteYN="Y">
<Author ValidYN="Y">
@ -5185,4 +5257,151 @@
</ReferenceList>
</PubmedData>
</PubmedArticle>
<PubmedArticle>
<MedlineCitation Status="MEDLINE" Owner="NLM">
<PMID Version="1">4917185</PMID>
<DateCompleted>
<Year>1970</Year>
<Month>10</Month>
<Day>27</Day>
</DateCompleted>
<DateRevised>
<Year>2018</Year>
<Month>11</Month>
<Day>13</Day>
</DateRevised>
<Article PubModel="Print">
<Journal>
<ISSN IssnType="Print">0003-6919</ISSN>
<JournalIssue CitedMedium="Print">
<Volume>19</Volume>
<Issue>6</Issue>
<PubDate>
<Year>1970</Year>
<Month>Jun</Month>
</PubDate>
</JournalIssue>
<Title>Applied microbiology</Title>
<ISOAbbreviation>Appl Microbiol</ISOAbbreviation>
</Journal>
<ArticleTitle>Bactericidal activity of a broad-spectrum illumination source.</ArticleTitle>
<Pagination>
<MedlinePgn>1013-4</MedlinePgn>
</Pagination>
<Abstract>
<AbstractText>Several hours of exposure to Vita-Lite lamps, which have a unique spectral
distribution, give significant killing of cells of Staphylococcus aureus.
</AbstractText>
</Abstract>
<AuthorList CompleteYN="Y">
<Author ValidYN="Y">
<LastName>Himmelfarb</LastName>
<ForeName>P</ForeName>
<Initials>P</Initials>
</Author>
<Author ValidYN="Y">
<LastName>Scott</LastName>
<ForeName>A</ForeName>
<Initials>A</Initials>
</Author>
<Author ValidYN="Y">
<LastName>Thayer</LastName>
<ForeName>P S</ForeName>
<Initials>PS</Initials>
</Author>
</AuthorList>
<Language>eng</Language>
<PublicationTypeList>
<PublicationType UI="D016428">Journal Article</PublicationType>
</PublicationTypeList>
</Article>
<MedlineJournalInfo>
<Country>United States</Country>
<MedlineTA>Appl Microbiol</MedlineTA>
<NlmUniqueID>7605802</NlmUniqueID>
<ISSNLinking>0003-6919</ISSNLinking>
</MedlineJournalInfo>
<CitationSubset>IM</CitationSubset>
<MeshHeadingList>
<MeshHeading>
<DescriptorName UI="D001431" MajorTopicYN="N">Bacteriological Techniques</DescriptorName>
<QualifierName UI="Q000295" MajorTopicYN="Y">instrumentation</QualifierName>
</MeshHeading>
<MeshHeading>
<DescriptorName UI="D008027" MajorTopicYN="Y">Light</DescriptorName>
</MeshHeading>
<MeshHeading>
<DescriptorName UI="D011830" MajorTopicYN="N">Radiation Effects</DescriptorName>
</MeshHeading>
<MeshHeading>
<DescriptorName UI="D012706" MajorTopicYN="N">Serratia marcescens</DescriptorName>
<QualifierName UI="Q000254" MajorTopicYN="N">growth &amp; development</QualifierName>
<QualifierName UI="Q000528" MajorTopicYN="Y">radiation effects</QualifierName>
</MeshHeading>
<MeshHeading>
<DescriptorName UI="D013210" MajorTopicYN="N">Staphylococcus</DescriptorName>
<QualifierName UI="Q000254" MajorTopicYN="N">growth &amp; development</QualifierName>
<QualifierName UI="Q000528" MajorTopicYN="Y">radiation effects</QualifierName>
</MeshHeading>
<MeshHeading>
<DescriptorName UI="D013242" MajorTopicYN="N">Sterilization</DescriptorName>
</MeshHeading>
</MeshHeadingList>
</MedlineCitation>
<PubmedData>
<History>
<PubMedPubDate PubStatus="pubmed">
<Year>1970</Year>
<Month>6</Month>
<Day>1</Day>
</PubMedPubDate>
<PubMedPubDate PubStatus="medline">
<Year>1970</Year>
<Month>6</Month>
<Day>1</Day>
<Hour>0</Hour>
<Minute>1</Minute>
</PubMedPubDate>
<PubMedPubDate PubStatus="entrez">
<Year>1970</Year>
<Month>6</Month>
<Day>1</Day>
<Hour>0</Hour>
<Minute>0</Minute>
</PubMedPubDate>
</History>
<PublicationStatus>ppublish</PublicationStatus>
<ArticleIdList>
<ArticleId IdType="pubmed">4917185</ArticleId>
<ArticleId IdType="pmc">PMC376844</ArticleId>
</ArticleIdList>
<ReferenceList>
<Reference>
<Citation>Photochem Photobiol. 1969 Jan;9(1):99-102</Citation>
<ArticleIdList>
<ArticleId IdType="pubmed">4889809</ArticleId>
</ArticleIdList>
</Reference>
<Reference>
<Citation>Endocrinology. 1969 Dec;85(6):1218-21</Citation>
<ArticleIdList>
<ArticleId IdType="pubmed">5347623</ArticleId>
</ArticleIdList>
</Reference>
<Reference>
<Citation>Arch Mikrobiol. 1956;24(1):60-79</Citation>
<ArticleIdList>
<ArticleId IdType="pubmed">13327987</ArticleId>
</ArticleIdList>
</Reference>
<Reference>
<Citation>J Bacteriol. 1941 Sep;42(3):353-66</Citation>
<ArticleIdList>
<ArticleId IdType="pubmed">16560457</ArticleId>
</ArticleIdList>
</Reference>
</ReferenceList>
</PubmedData>
</PubmedArticle>
</PubmedArticleSet>

View File

@ -2,9 +2,10 @@ package eu.dnetlib.dhp.sx.bio
import com.fasterxml.jackson.databind.{DeserializationFeature, ObjectMapper, SerializationFeature}
import eu.dnetlib.dhp.aggregation.AbstractVocabularyTest
import eu.dnetlib.dhp.schema.oaf.{Oaf, Relation, Result}
import eu.dnetlib.dhp.schema.oaf.utils.PidType
import eu.dnetlib.dhp.schema.oaf.{Oaf, Publication, Relation, Result}
import eu.dnetlib.dhp.sx.bio.BioDBToOAF.ScholixResolved
import eu.dnetlib.dhp.sx.bio.pubmed.{PMArticle, PMParser, PubMedToOaf}
import eu.dnetlib.dhp.sx.bio.pubmed.{PMArticle, PMParser, PMSubject, PubMedToOaf}
import org.json4s.DefaultFormats
import org.json4s.JsonAST.{JField, JObject, JString}
import org.json4s.jackson.JsonMethods.parse
@ -16,6 +17,7 @@ import org.mockito.junit.jupiter.MockitoExtension
import java.io.{BufferedReader, InputStream, InputStreamReader}
import java.util.zip.GZIPInputStream
import scala.collection.JavaConverters._
import scala.collection.mutable.ListBuffer
import scala.io.Source
import scala.xml.pull.XMLEventReader
@ -72,6 +74,102 @@ class BioScholixTest extends AbstractVocabularyTest {
)
println(mapper.writeValueAsString(r.head))
}
private def checkPMArticle(article:PMArticle): Unit = {
assertNotNull(article.getPmid)
assertNotNull(article.getTitle)
assertNotNull(article.getAuthors)
article.getAuthors.asScala.foreach{a =>
assertNotNull(a)
assertNotNull(a.getFullName)
}
}
@Test
def testParsingPubmedXML():Unit = {
val xml = new XMLEventReader(Source.fromInputStream(getClass.getResourceAsStream("/eu/dnetlib/dhp/sx/graph/bio/pubmed.xml")))
val parser = new PMParser(xml)
parser.foreach(checkPMArticle)
}
private def checkPubmedPublication(o:Oaf): Unit = {
assertTrue(o.isInstanceOf[Publication])
val p:Publication = o.asInstanceOf[Publication]
assertNotNull(p.getId)
assertNotNull(p.getTitle)
p.getTitle.asScala.foreach(t =>assertNotNull(t.getValue))
p.getAuthor.asScala.foreach(a =>assertNotNull(a.getFullname))
assertNotNull(p.getInstance())
p.getInstance().asScala.foreach { i =>
assertNotNull(i.getCollectedfrom)
assertNotNull(i.getPid)
assertNotNull(i.getInstancetype)
}
assertNotNull(p.getOriginalId)
p.getOriginalId.asScala.foreach(oId => assertNotNull(oId))
val hasPMC = p.getInstance().asScala.exists(i => i.getPid.asScala.exists(pid => pid.getQualifier.getClassid.equalsIgnoreCase(PidType.pmc.toString)))
if (hasPMC) {
assertTrue(p.getOriginalId.asScala.exists(oId => oId.startsWith("od_______267::")))
}
}
@Test
def testPubmedOriginalID():Unit = {
val article:PMArticle = new PMArticle
article.setPmid("1234")
article.setTitle("a Title")
// VERIFY PUBLICATION IS NOT NULL
article.getPublicationTypes.add( new PMSubject("article",null, null))
var publication = PubMedToOaf.convert(article, vocabularies).asInstanceOf[Publication]
assertNotNull(publication)
assertEquals("50|pmid________::81dc9bdb52d04dc20036dbd8313ed055", publication.getId)
// VERIFY PUBLICATION ID DOES NOT CHANGE ALSO IF SETTING PMC IDENTIFIER
article.setPmcId("PMC1517292")
publication = PubMedToOaf.convert(article, vocabularies).asInstanceOf[Publication]
assertNotNull(publication)
assertEquals("50|pmid________::81dc9bdb52d04dc20036dbd8313ed055", publication.getId)
// VERIFY ORIGINAL ID GENERATE IN OLD WAY USING PMC IDENTIFIER EXISTS
val oldOpenaireID ="od_______267::0000072375bc0e68fa09d4e6b7658248"
val hasOldOpenAIREID = publication.getOriginalId.asScala.exists(o => o.equalsIgnoreCase(oldOpenaireID))
assertTrue(hasOldOpenAIREID)
}
@Test
def testPubmedMapping() :Unit = {
val xml = new XMLEventReader(Source.fromInputStream(getClass.getResourceAsStream("/eu/dnetlib/dhp/sx/graph/bio/pubmed.xml")))
val parser = new PMParser(xml)
val results = ListBuffer[Oaf]()
parser.foreach(x => results += PubMedToOaf.convert(x, vocabularies))
results.foreach(checkPubmedPublication)
}
@Test

View File

@ -1,6 +1,6 @@
[
{"paramName":"mt", "paramLongName":"master", "paramDescription": "should be local or yarn", "paramRequired": true},
{"paramName":"s", "paramLongName":"sourcePath", "paramDescription": "the source Path", "paramRequired": true},
{"paramName":"t", "paramLongName":"targetPath", "paramDescription": "the path of the raw graph", "paramRequired": true}
{"paramName":"t", "paramLongName":"targetPath", "paramDescription": "the path of the raw graph", "paramRequired": true},
{"paramName":"r", "paramLongName":"filterRelation", "paramDescription": "the relation to filter", "paramRequired": false}
]