Skip to content

Commit

Permalink
Fix #1.
Browse files Browse the repository at this point in the history
The issue was that in SR an intermediate BioC file is read in. Annotations were reset before, PMIDs were not and then the new data was just read into the old BioCDocobj, leading to a duplication of the PMID list. The GeneIDMatch method iterates over the PMIDs and thus misses annotations for the second half of PMIDs - which are duplicates anyway.
  • Loading branch information
khituras committed Nov 19, 2022
1 parent 9f309b4 commit 9024cf7
Show file tree
Hide file tree
Showing 5 changed files with 911 additions and 1,048 deletions.
2 changes: 1 addition & 1 deletion pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
<groupId>de.julielab</groupId>
<artifactId>julielab-gnormplus</artifactId>
<packaging>jar</packaging>
<version>1.0.0</version>
<version>1.0.1-SNAPSHOT</version>
<name>JULIE Lab GNormPlus</name>
<url>https://www.ncbi.nlm.nih.gov/research/bionlp/Tools/gnormplus/</url>

Expand Down
3 changes: 3 additions & 0 deletions src/GNormPluslib/BioCDoc.java
Original file line number Diff line number Diff line change
Expand Up @@ -563,6 +563,7 @@ public void BioCReader(String input) throws IOException, XMLStreamException {
PassageOffsets.add(PassageOffset);
Annotations.add(AnnotationInPMID);
}
System.out.println("[BioCReader] PMCIDs.size(): " + PMIDs.size() + ", " + PMIDs);
}

public void BioCReaderWithAnnotation(String input) throws IOException, XMLStreamException {
Expand Down Expand Up @@ -677,6 +678,8 @@ public void BioCReaderWithAnnotation(String input) throws IOException, XMLStream
PassageOffsets.add(PassageOffset);
Annotations.add(AnnotationInPMID);
}
System.out.println("[BioCReaderWithAnnotation] PMCIDs.size(): " + PMIDs.size()+ ", " + PMIDs + "; Annotations: " + Annotations.size());

}

public void BioCOutput(String input, String output, ArrayList<ArrayList<ArrayList<String>>> Annotations, boolean Final, boolean RemovePreviousAnno) throws IOException, XMLStreamException {
Expand Down
Loading

0 comments on commit 9024cf7

Please sign in to comment.