query

package
v0.0.0-...-b7c488f Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Dec 2, 2021 License: MIT Imports: 20 Imported by: 1

Documentation

Overview

Package query provides sources for loading queries in different formats.

Index

Constants

This section is empty.

Variables

View Source
var (
	// MedlineTransmutePipeline is a default pipeline for Medline queries.
	MedlineTransmutePipeline = tpipeline.NewPipeline(
		parser.NewMedlineParser(),
		backend.NewCQRBackend(),
		tpipeline.TransmutePipelineOptions{
			LexOptions: lexer.LexOptions{
				FormatParenthesis: false,
			},
			AddRedundantParenthesis: true,
			RequiresLexing:          true,
		})
	// PubMedTransmutePipeline is a default pipeline for PubMed queries.
	PubMedTransmutePipeline = tpipeline.NewPipeline(
		parser.NewPubMedParser(),
		backend.NewCQRBackend(),
		tpipeline.TransmutePipelineOptions{
			LexOptions: lexer.LexOptions{
				FormatParenthesis: true,
			},
			AddRedundantParenthesis: true,
			RequiresLexing:          false,
		})
	// PubMedTransmutePipeline is a default pipeline for cqr queries.
	CQRTransmutePipeline = tpipeline.NewPipeline(
		parser.NewCQRParser(),
		backend.NewCQRBackend(),
		tpipeline.TransmutePipelineOptions{
			LexOptions: lexer.LexOptions{
				FormatParenthesis: false,
			},
			RequiresLexing: false,
		})
)

Functions

This section is empty.

Types

type KeywordQuerySource

type KeywordQuerySource struct {
	// contains filtered or unexported fields
}

KeywordQuerySource is a source of queries that contain only one "string".

func NewKeywordQuerySource

func NewKeywordQuerySource(fields ...string) KeywordQuerySource

NewKeywordQuerySource creates a new keyword query source with the specified fields.

func (KeywordQuerySource) Load

func (kw KeywordQuerySource) Load(directory string) ([]pipeline.Query, error)

Load takes a directory of queries and parses them "as is".

type ProtocolQuerySource

type ProtocolQuerySource struct {
}

ProtocolQuerySource loads systematic review protocols from XML files that follow the structure of:

``` <?xml version='1.0' encoding='UTF-8'?> <root> <objective> Our primary objective was to assess the diagnostic accuracy of galactomannan detection in serum for the diagnosis of invasive aspergillosis in immunocompromised patients, at different cut-off values for test positivity. Secondary objectives We aimed to study several possible sources of heterogeneity: subgroups of patients, different interpretations of the EORTC/MSG criteria as the reference standard and study design features.</objective> <type_of_study> Studies that assessed the diagnostic accuracy of galactomannan detection by the Platelia© sandwich ELISA test, with either prospective or retrospective data collection, were eligible. The galactomannan ELISA could be assessed alone or in comparison to other tests.</type_of_study> <participants> Studies had to include patients with neutropenia or patients whose neutrophils are functionally compromised. We included studies with the following patient groups: patients with haematological malignancies, receiving haematopoietic stem cell transplants, chemotherapeutics or immunosuppressive drugs; solid organ transplant recipients and other patients who are receiving immunosuppressive drugs for a prolonged time; patients with cancer who are receiving chemotherapeutics; patients with a medical condition compromising the immune system, such as HIV/AIDS and chronic granulomatous disease (CGD, an inherited abnormality of the neutrophils).</participants> <index_tests> A commercially available galactomannan sandwich ELISA (Platelia©) was the test under evaluation. We only included studies concerning galactomannan detection in serum. We excluded studies addressing detection in BAL fluid, a number of other body fluids, such as CSF or peritoneal fluid, and tissue. We also excluded studies evaluating in-house serum galactomannan tests.</index_tests> <target_conditions> The target condition of this review was invasive aspergillosis, also called invasive pulmonary aspergillosis or systemic aspergillosis.</target_conditions> <reference_standards> The following reference standards can be used to define the target condition: autopsy; the criteria of the EORTC/MSG (Ascioglu 2002; De Pauw 2008); or the demonstration of hyphal invasion in biopsies, combined with a positive culture for Aspergillus species from the same specimens. The gold standard for this diagnosis is autopsy, combined with a positive culture of Aspergillus species from the autopsy specimens, or with histopathological evidence of Aspergillus. Autopsy is rarely reported, therefore we decided to take the criteria of the EORTC/MSG as the reference standard. These criteria divide the patient population into four categories: patients with proven invasive aspergillosis, patients who probably have invasive aspergillosis, patients who possibly have invasive aspergillosis and patients without invasive aspergillosis (see Table 1). This division is based on host factor criteria, microbiological criteria and clinical criteria. Clinical studies have shown that these criteria do not match autopsy results perfectly. This especially true for the possible category. For clinical trials investigating the effect of treatment, for example, it is recommended that only the proven and probable categories are used (Borlenghi 2007; Subira 2003). The exclusion of patients with 'possible' invasive aspergillosis, which can be regarded as group of 'difficult or atypical' patients, is likely to affect the observed diagnostic accuracy of a test. Also, the exclusion of any other of the reference standard groups may affect the accuracy of the index test. We therefore excluded studies explicitly excluding one of the four categories of patients from the review, as well as studies in which it is not clear how many patients with proven, probable, possible or no invasive aspergillosis had positive or negative index test results.</reference_standards> </root> ```

The source then generates queries according to the package github.com/hscells/groove/learning/seed.

func NewProtocolQuerySource

func NewProtocolQuerySource() ProtocolQuerySource

func (ProtocolQuerySource) Load

func (ProtocolQuerySource) Load(directory string) ([]pipeline.Query, error)

type QueriesSource

type QueriesSource interface {
	// Load determines how a query is loaded and parsed into the common query representation format.
	Load(directory string) ([]pipeline.Query, error)
}

QueriesSource represents a source for queries and how to parse them.

type QuickUMLSProtocolQuerySource

type QuickUMLSProtocolQuerySource struct {
	// contains filtered or unexported fields
}

QuickUMLSProtocolQuerySource uses QuickUMLS to perform additional steps in the query formulation process.

func NewQuickUMLSProtocolQuerySource

func NewQuickUMLSProtocolQuerySource(url string, ss stats.StatisticsSource, threshold float64) QuickUMLSProtocolQuerySource

func (QuickUMLSProtocolQuerySource) Load

func (q QuickUMLSProtocolQuerySource) Load(directory string) ([]pipeline.Query, error)

type TARTask2QueriesSource

type TARTask2QueriesSource struct {
}

func (TARTask2QueriesSource) Load

func (t TARTask2QueriesSource) Load(directory string) ([]pipeline.Query, error)

func (TARTask2QueriesSource) LoadQueriesFromBin

func (t TARTask2QueriesSource) LoadQueriesFromBin(queriesBinFile string) []pipeline.Query

func (TARTask2QueriesSource) LoadSingle

func (TARTask2QueriesSource) LoadSingle(file string) (pipeline.Query, error)

func (TARTask2QueriesSource) ReadAndWriteQueries

func (t TARTask2QueriesSource) ReadAndWriteQueries(queriesDir, queriesBinFile, queryOutputDir string) []pipeline.Query

type TransmuteQuerySource

type TransmuteQuerySource struct {
	// contains filtered or unexported fields
}

TransmuteQuerySource is a source for queries.

func NewTransmuteQuerySource

func NewTransmuteQuerySource(transmutePipeline tpipeline.TransmutePipeline) TransmuteQuerySource

NewTransmuteQuerySource creates a new query source from a transmute gpipeline.

func (TransmuteQuerySource) Load

func (ts TransmuteQuerySource) Load(directory string) ([]gpipeline.Query, error)

Load takes a directory of queries and parses them using a supplied transmute gpipeline.

func (TransmuteQuerySource) LoadSingle

func (ts TransmuteQuerySource) LoadSingle(file string) (gpipeline.Query, error)

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL