Skip to content

Commit

Permalink
Resolves #199 (empty fulltext match in excel sheet).
Browse files Browse the repository at this point in the history
The field is empty because we do not fetch highlights for the excel table to save performance. If this is an urgent feature it could be activated optionally in the future. But unless noone needs it, we just remove the field from the result.
  • Loading branch information
khituras committed Sep 20, 2024
1 parent 8db71d9 commit f34902d
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 5 deletions.
6 changes: 4 additions & 2 deletions gepi/gepi-core/src/main/resources/ExcelResultCreation.py
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@ def writeresults(input,output,searchParameters):
'Factuality level of the event as determined by text expressions like "suggest", "may" etc.',
'PubMed or PMC document ID. PMC documents carry the "PMC" prefix.',
'Internal event ID. Useful to find unique identifiers for each event.',
'Place of fulltext filter match. Only applicable if filter terms were specified.',
# 'Place of fulltext filter match. Only applicable if filter terms were specified.',
'The textual context from the literature in which the event was found. That is the sentence enclosing the event by default. In case of a paragraph-level filter query this can also be the enclosing paragraph. This would then be indicated by the value of the fulltextmatchtype column.']
df = pd.read_csv(input,sep="\t",dtype={'arg1entrezid': object,'arg2entrezid':object,'docid':object,'relationtypes':object,'fulltextmatchtype':object,'factuality':object},quoting=csv.QUOTE_NONE,keep_default_na=False)
# The header should be included in the TSV file anyway. But in case we change the names there let's use a fixed
Expand All @@ -71,7 +71,9 @@ def writeresults(input,output,searchParameters):
types = list(set(reltypes.at[i].split(',')))
reltypes.at[i]= ','.join(types)
columnsorder=[ 'arg1symbol', 'arg2symbol', 'arg1text', 'arg2text', 'arg1entrezid', 'arg2entrezid',
'relationtypes', 'factuality', 'docid', 'eventid', 'fulltextmatchtype', 'context']
'relationtypes', 'factuality', 'docid', 'eventid',
# 'fulltextmatchtype',
'context']
df = df[columnsorder]

# Create a df where all symbols are normalized.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -98,9 +98,6 @@ public class TableResultWidget extends GepiWidget {
private LoggerSource loggerSource;
@Environmental
private JavaScriptSupport javaScriptSupport;
@Inject
@Symbol(SymbolConstants.PRODUCTION_MODE)
private boolean productionMode;

@Inject
private IGeneIdService geneIdService;
Expand Down

0 comments on commit f34902d

Please sign in to comment.