Documentation
¶
Index ¶
- Constants
- Variables
- func GeneDescriptionFromCsvFlag() []cli.Flag
- func GeneProductFromCsvFlag() []cli.Flag
- func GeneProductUpdaterFlags() []cli.Flag
- func GeneUpdaterFlags() []cli.Flag
- func LoadCSVToArangodb(cltx *cli.Context) error
- func LoadCSVToArangodbFlag() []cli.Flag
- func LoadFeatureAnnotationFlag() []cli.Flag
- func LoadGeneDescription(c *cli.Context) error
- func LoadGeneDescriptionFlag() []cli.Flag
- func LoadGeneProduct(c *cli.Context) error
- func LoadGeneProductFlag() []cli.Flag
- func LoadHypotheticalGeneProducts(c *cli.Context) error
- func LoadHypotheticalGeneProductsFlags() []cli.Flag
- func NewGraphQLClient(graphqlURL string, opts ...GraphQLClientOption) *graphql.Client
- func ParseUnknowmeData(cliCtx *cli.Context) error
- func ParseUnknowmeDataFlags() []cli.Flag
- func RunFeatureAnnotationLoader(cltx *cli.Context) error
- func RunGeneProductUpdater(cltx *cli.Context) error
- func RunGeneUpdater(cltx *cli.Context) error
- func RunSynonymLoader(cltx *cli.Context) error
- func SynonymLoaderFlags() []cli.Flag
- func ValidateGeneData(c *cli.Context) error
- func ValidateGeneDataFlags() []cli.Flag
- func ValidateStruct(s any) error
- type AppConfig
- type ArangoProperty
- type ArangoResultDoc
- type BatchGeneProductJob
- type BatchGeneProductResult
- type CSVFileConstraints
- type CSVRecordWriter
- type CSVWriterCreationParams
- type CellTextExtractor
- type ConcurrentValidationParams
- type FeatureAnnotationAppConfig
- type FeatureAnnotationMetrics
- type FileContext
- type Gene
- type GeneDataRecord
- type GeneDescription
- type GeneDescriptionCSVWriter
- type GeneDescriptionCSVWriterParams
- type GeneDescriptionRequest
- type GeneGeneralInformationQuery
- type GeneInfo
- type GeneProcessingAction
- type GeneProcessingContext
- type GeneProcessingResult
- type GeneProduct
- type GeneProductAppConfig
- type GeneProductCSVWriter
- type GeneProductCSVWriterParams
- type GeneProductMetrics
- type GeneProductResult
- type GeneValidationParams
- type GeneWithPubmed
- type GraphQLClientConfig
- type GraphQLClientOption
- type GrpcAnnotationResult
- type GrpcSynonymResult
- type GrpcUpdateResult
- type LegacyTime
- type LoadGeneDescriptionParams
- type LoadGeneProductParams
- type LoadHypotheticalGeneProductsParams
- type ParseUnknowmeDataParams
- type ParsingConfig
- type ParsingOption
- type PipelineResult
- type ProcessSingleRecordParams
- type ProcessedGeneData
- type ProcessedGeneProduct
- type ProcessingConfig
- type ProcessingContext
- type ProcessingMetrics
- type ProcessingResult
- type ProcessingStats
- type SetupConfig
- type SingleGeneValidationParams
- type StrippedProperty
- type SubmitBatchAndLogParams
- type SynonymAppConfig
- type SynonymData
- type SynonymMetrics
- type ValidationError
- type ValidationReport
- type ValidationResult
- type WithAction
- type WithAnnotation
Constants ¶
const ( // Default worker pool sizes for concurrent processing DefaultWorkers = 4 DefaultBatchSize = 100 DefaultPubmedWorkers = 4 DefaultGRPCWorkers = 8 DefaultProcessingWorkers = 4 DefaultLegacyWorkers = 4 DefaultSynonymGRPCWorkers = 4 DefaultValidationWorkers = 5 DefaultCSVBatchSize = 40 DefaultCSVWorkers = 4 DefaultValidationTimeoutSecs = 30 )
const ( // GeneProductQuery is the AQL query for fetching gene products GeneProductQuery = `` /* 350-byte string literal not displayed */ ListActiveGenesQ = `` /* 591-byte string literal not displayed */ ListPubmedsByFeature = `` /* 184-byte string literal not displayed */ ListSynonyms = `` /* 1457-byte string literal not displayed */ )
const DefaultAQLQuery = `` /* 742-byte string literal not displayed */
DefaultAQLQuery is the default query to fetch gene data from ArangoDB. Exported for use in flag.go
const (
// DefaultUserName is the default creator/updater for annotations
DefaultUserName = "dcr@dictycr.org"
)
const (
GeneProductTag = "gene product"
)
Constants for gene product processing
Variables ¶
var AnnMap = map[string]string{
"CGM_DDB_PASC": "pgaudet@northwestern.edu",
"CGM_DDB_PFEY": "pfey@northwestern.edu",
"CGM_DDB_BOBD": "robert-dodson@northwestern.edu",
"CGM_DDB_KPIL": "kpilchar@northwestern.edu",
"CGM_DDB": "dictybase@northwestern.edu",
}
AnnMap maps legacy creator usernames to their email addresses.
Functions ¶
func GeneDescriptionFromCsvFlag ¶
GeneDescriptionFromCsvFlag returns all flags required for loading gene descriptions from CSV files. It combines gene description specific flags with gRPC connection flags.
func GeneProductFromCsvFlag ¶
GeneProductFromCsvFlag returns all flags required for loading gene products from CSV files. It combines gene product specific flags with gRPC connection flags.
func GeneProductUpdaterFlags ¶
GeneProductUpdaterFlags returns flags for gene product updater
func GeneUpdaterFlags ¶
GeneUpdaterFlags returns all flags required for the gene updater command.
func LoadCSVToArangodb ¶
func LoadCSVToArangodbFlag ¶
LoadCSVToArangodbFlag returns all flags required for loading CSV data to ArangoDB. It combines ArangoDB connection flags with CSV processing specific flags.
func LoadFeatureAnnotationFlag ¶
LoadFeatureAnnotationFlag returns all flags required for loading feature annotations. It combines ArangoDB connection flags, gRPC flags, and pubmed/grpc worker configuration.
func LoadGeneDescription ¶
LoadGeneDescription loads gene descriptions from a CSV file into the feature annotation service. It validates input parameters, processes the CSV file concurrently, and reports results.
func LoadGeneDescriptionFlag ¶
LoadGeneDescriptionFlag returns flags specific to gene description loading operations. Input validation is performed during command execution to ensure the file exists and user email is properly formatted.
func LoadGeneProduct ¶
func LoadGeneProductFlag ¶
LoadGeneProductFlag returns flags specific to gene product loading operations. Input validation is performed during command execution to ensure files exist and user email is properly formatted.
func LoadHypotheticalGeneProducts ¶
LoadHypotheticalGeneProducts is the main action handler for the command
func LoadHypotheticalGeneProductsFlags ¶
LoadHypotheticalGeneProductsFlags returns flags for loading hypothetical gene products from a text file. It combines input file flag, user flag, and gRPC connection flags.
func NewGraphQLClient ¶
func NewGraphQLClient( graphqlURL string, opts ...GraphQLClientOption, ) *graphql.Client
NewGraphQLClient creates a new GraphQL client with the given options
func ParseUnknowmeData ¶
ParseUnknowmeData processes HTML files containing gene data tables and extracts DDB_G entries with their corresponding gene product and description information
func ParseUnknowmeDataFlags ¶
ParseUnknowmeDataFlags returns flags for parsing unknowme HTML data to CSV files. Input validation is performed during command execution to ensure files exist.
func RunGeneProductUpdater ¶
RunGeneProductUpdater is the main entry point for the gene product updater
func RunGeneUpdater ¶
func RunSynonymLoader ¶
RunSynonymLoader is the main entry point for the synonym loader.
func SynonymLoaderFlags ¶
SynonymLoaderFlags returns all flags required for the synonym loader command.
func ValidateGeneData ¶
ValidateGeneData is the main action function for gene data validation
func ValidateGeneDataFlags ¶
ValidateGeneDataFlags returns flags for the gene data validation command. Enhanced with security validations and constraints for file size and URL schemes.
func ValidateStruct ¶
ValidateStruct validates a struct and returns a formatted error if validation fails
Types ¶
type AppConfig ¶
type AppConfig struct {
AQLQuery string
ArangoUser string // For authorship in gRPC updates
NumProcessingWorkers int
NumGrpcWorkers int
Logger *logrus.Entry
Metrics *ProcessingMetrics // Add this field
}
AppConfig holds all configuration for the application.
type ArangoProperty ¶
ArangoProperty represents a single property object from ArangoDB.
type ArangoResultDoc ¶
type ArangoResultDoc struct {
ID string `json:"id"` // This is dbx.accession, likely the feature_id
Props []ArangoProperty `json:"props"`
}
ArangoResultDoc represents the structure of a document from ArangoDB.
type BatchGeneProductJob ¶
type BatchGeneProductJob struct {
GeneProducts []ProcessedGeneProduct
}
BatchGeneProductJob holds a slice of gene products for batch processing
type BatchGeneProductResult ¶
type BatchGeneProductResult struct {
GeneID string
Success bool
Message string
Error error
ProcessedCount int
SkippedCount int
}
BatchGeneProductResult holds the result of batch gene product processing
type CSVFileConstraints ¶
CSVFileConstraints defines file size and content limits
type CSVRecordWriter ¶
type CSVRecordWriter interface {
WriteRecord(record GeneDataRecord) error
ShouldSkip(record GeneDataRecord) bool
Close() error
}
CSVRecordWriter defines a common interface for writing gene data records to CSV
type CSVWriterCreationParams ¶
type CSVWriterCreationParams struct {
GeneProductOutputFile string `validate:"required,min=1" json:"gene_product_output_file"`
GeneDescriptionOutputFile string `validate:"required,min=1" json:"gene_description_output_file"`
}
CSVWriterCreationParams contains parameters for creating CSV writers
type CellTextExtractor ¶
CellTextExtractor represents a function that extracts text from a single cell
type ConcurrentValidationParams ¶
type ConcurrentValidationParams struct {
ValidationParams GeneValidationParams
Records [][]string
Context context.Context
}
ConcurrentValidationParams contains parameters for concurrent validation
type FeatureAnnotationMetrics ¶
type FeatureAnnotationMetrics struct {
TotalProcessed int64
SuccessCount int64
ErrorCount int64
StartTime time.Time
TotalFetchedFromArango int64
AllArangoDocsFetched bool
JobsSubmittedToPubmedPool int64
JobsCompletedFromPubmedPool int64
JobsSubmittedToGrpcPool int64
JobsCompletedFromGrpcPool int64
// contains filtered or unexported fields
}
func (*FeatureAnnotationMetrics) IsComplete ¶
func (m *FeatureAnnotationMetrics) IsComplete() bool
type FileContext ¶
type FileContext struct {
Setup SetupConfig
File *os.File
Reader *csv.Reader
Error error // To propagate errors
}
Stage 2: File Processing
type GeneDataRecord ¶
type GeneDataRecord struct {
GeneID string `validate:"required,min=1" json:"gene_id"`
GeneProduct string ` json:"gene_product"`
Description string ` json:"description"`
}
GeneDataRecord represents a single gene data record
type GeneDescription ¶
type GeneDescription struct {
GeneID string `validate:"required,min=1"`
Description string `validate:"required,min=1"`
}
GeneDescription represents a gene with its description for loading operations.
type GeneDescriptionCSVWriter ¶
type GeneDescriptionCSVWriter struct {
// contains filtered or unexported fields
}
GeneDescriptionCSVWriter writes gene description data to CSV format
func NewGeneDescriptionCSVWriter ¶
func NewGeneDescriptionCSVWriter( filename string, ) (*GeneDescriptionCSVWriter, error)
NewGeneDescriptionCSVWriter creates a new CSV writer for gene descriptions
func NewGeneDescriptionCSVWriterWithParams ¶
func NewGeneDescriptionCSVWriterWithParams( params GeneDescriptionCSVWriterParams, ) (*GeneDescriptionCSVWriter, error)
NewGeneDescriptionCSVWriterWithParams creates a new CSV writer for gene descriptions with validated parameters
func (*GeneDescriptionCSVWriter) Close ¶
func (w *GeneDescriptionCSVWriter) Close() error
func (*GeneDescriptionCSVWriter) ShouldSkip ¶
func (w *GeneDescriptionCSVWriter) ShouldSkip(record GeneDataRecord) bool
func (*GeneDescriptionCSVWriter) WriteRecord ¶
func (w *GeneDescriptionCSVWriter) WriteRecord(record GeneDataRecord) error
type GeneDescriptionCSVWriterParams ¶
type GeneDescriptionCSVWriterParams struct {
Filename string `validate:"required,min=1" json:"filename"`
}
GeneDescriptionCSVWriterParams contains parameters for creating a gene description CSV writer
type GeneDescriptionRequest ¶
type GeneDescriptionRequest struct {
GeneID string `validate:"required,min=1"`
Description string `validate:"required,min=1"`
User string `validate:"required,email"`
}
GeneDescriptionRequest holds validated data for a single gene description
type GeneGeneralInformationQuery ¶
type GeneGeneralInformationQuery struct {
GeneGeneralInformation *struct {
ID string `graphql:"id"`
Description string `graphql:"description"`
} `graphql:"geneGeneralInformation(gene: $gene)"`
}
GeneGeneralInformationQuery represents the GraphQL query structure for retrieving gene information including ID and description fields.
type GeneInfo ¶
type GeneInfo struct {
Name string `json:"name"`
GeneID string `json:"gene_id"`
FeatureID int64 `json:"feature_id"`
CreatedBy string `json:"created_by"`
}
GeneInfo holds gene information from ArangoDB
type GeneProcessingAction ¶
type GeneProcessingAction int
GeneProcessingAction represents the action taken for a gene
const ( // HypotheticalProteinProduct is the product name for hypothetical proteins HypotheticalProteinProduct = "conserved hypothetical protein" // GeneCreated indicates a new annotation was created GeneCreated GeneProcessingAction = iota // GeneUpdated indicates a product tag was added to existing annotation GeneUpdated // GeneSkipped indicates the annotation already had the product tag GeneSkipped )
type GeneProcessingContext ¶
type GeneProcessingContext struct {
Config ProcessingConfig
GeneID string
}
GeneProcessingContext holds initial processing context
type GeneProcessingResult ¶
type GeneProcessingResult struct {
GeneID string
Action GeneProcessingAction
}
GeneProcessingResult represents successful processing of a single gene
type GeneProduct ¶
type GeneProductAppConfig ¶
type GeneProductAppConfig struct {
Ctx context.Context
LegacyDatabase string
NumLegacyWorkers int
NumGrpcWorkers int
Logger *logrus.Entry
Metrics *GeneProductMetrics
}
GeneProductAppConfig holds configuration
type GeneProductCSVWriter ¶
type GeneProductCSVWriter struct {
// contains filtered or unexported fields
}
GeneProductCSVWriter writes gene product data to CSV format
func NewGeneProductCSVWriter ¶
func NewGeneProductCSVWriter(filename string) (*GeneProductCSVWriter, error)
NewGeneProductCSVWriter creates a new CSV writer for gene products
func NewGeneProductCSVWriterWithParams ¶
func NewGeneProductCSVWriterWithParams( params GeneProductCSVWriterParams, ) (*GeneProductCSVWriter, error)
NewGeneProductCSVWriterWithParams creates a new CSV writer for gene products with validated parameters
func (*GeneProductCSVWriter) Close ¶
func (w *GeneProductCSVWriter) Close() error
func (*GeneProductCSVWriter) ShouldSkip ¶
func (w *GeneProductCSVWriter) ShouldSkip(record GeneDataRecord) bool
func (*GeneProductCSVWriter) WriteRecord ¶
func (w *GeneProductCSVWriter) WriteRecord(record GeneDataRecord) error
type GeneProductCSVWriterParams ¶
type GeneProductCSVWriterParams struct {
Filename string `validate:"required,min=1" json:"filename"`
}
GeneProductCSVWriterParams contains parameters for creating a gene product CSV writer
type GeneProductMetrics ¶
type GeneProductMetrics struct {
TotalProcessed int64
SuccessCount int64
ErrorCount int64
SkippedCount int64
StartTime time.Time
TotalFetchedFromArango int64
AllArangoDocsFetched bool
JobsSubmittedToLegacyPool int64
JobsCompletedFromLegacyPool int64
JobsSubmittedToGrpcPool int64
JobsCompletedFromGrpcPool int64
// contains filtered or unexported fields
}
GeneProductMetrics holds processing metrics
func (*GeneProductMetrics) IsComplete ¶
func (m *GeneProductMetrics) IsComplete() bool
IsComplete checks if all processing is finished
type GeneProductResult ¶
type GeneProductResult struct {
GeneProduct string `json:"gene_product"`
CreatedBy string `json:"created_by"`
CreatedOn LegacyTime `json:"created_on"`
}
GeneProductResult holds gene product query result
type GeneValidationParams ¶
type GeneValidationParams struct {
InputFile string `validate:"required,file_exists,max_file_size"`
OutputReport string `validate:"required,endswith=.json"`
GraphQLURL string `validate:"required,url,startswith=https"`
Timeout int `validate:"gte=10,lte=300"`
Workers int `validate:"gte=1,lte=20"`
}
GeneValidationParams contains all parameters needed for gene validation
type GeneWithPubmed ¶
type GraphQLClientConfig ¶
GraphQLClientConfig holds configuration options for creating a GraphQL client, including URL, HTTP client, and custom headers.
type GraphQLClientOption ¶
type GraphQLClientOption func(*GraphQLClientConfig)
GraphQLClientOption is a functional option for configuring GraphQL client
func WithHTTPClient ¶
func WithHTTPClient(client *http.Client) GraphQLClientOption
WithHTTPClient sets the HTTP client for GraphQL operations
func WithHeaders ¶
func WithHeaders(headers map[string]string) GraphQLClientOption
WithHeaders sets custom headers for GraphQL requests
func WithTimeout ¶
func WithTimeout(timeout time.Duration) GraphQLClientOption
WithTimeout sets the timeout for HTTP requests
type GrpcAnnotationResult ¶
type GrpcSynonymResult ¶
GrpcSynonymResult holds the result of a gRPC update operation for synonyms.
type GrpcUpdateResult ¶
GrpcUpdateResult holds the result of a gRPC update operation.
type LegacyTime ¶
LegacyTime handles Oracle date format "DD-MON-YY" from legacy database
func (*LegacyTime) UnmarshalJSON ¶
func (lt *LegacyTime) UnmarshalJSON(data []byte) error
UnmarshalJSON implements json.Unmarshaler for Oracle date format
type LoadGeneDescriptionParams ¶
type LoadGeneDescriptionParams struct {
InputFile string `validate:"required,file"`
Workers int `validate:"gte=1,lte=50"`
BatchSize int `validate:"gte=1,lte=1000"`
User string `validate:"required,email"`
}
LoadGeneDescriptionParams holds validated parameters for loading gene descriptions
type LoadGeneProductParams ¶
type LoadGeneProductParams struct {
InputFiles []string `validate:"required,dive,file"`
Workers int `validate:"gte=1,lte=50"`
BatchSize int `validate:"gte=1,lte=1000"`
User string `validate:"required,email"`
}
LoadGeneProductParams holds validated parameters for loading gene products
type LoadHypotheticalGeneProductsParams ¶
type LoadHypotheticalGeneProductsParams struct {
User string
Client pb.FeatureAnnotationServiceClient
}
LoadHypotheticalGeneProductsParams holds parameters for loading hypothetical gene products
type ParseUnknowmeDataParams ¶
type ParseUnknowmeDataParams struct {
InputFiles []string `validate:"required,min=1,dive,file" json:"input_files"`
GeneProductOutput string `validate:"required,min=1" json:"gene_product_output"`
GeneDescriptionOutput string `validate:"required,min=1" json:"gene_description_output"`
}
ParseUnknowmeDataParams contains all parameters for the ParseUnknowmeData function
type ParsingConfig ¶
type ParsingConfig struct {
// contains filtered or unexported fields
}
ParsingConfig holds configuration for parsing operations
func NewParsingConfig ¶
func NewParsingConfig(opts ...ParsingOption) *ParsingConfig
NewParsingConfig creates a new ParsingConfig with default values and applies options
type ParsingOption ¶
type ParsingOption func(*ParsingConfig)
ParsingOption is a function that configures ParsingConfig
func WithGeneProductColumnRange ¶
func WithGeneProductColumnRange(startCol, endCol int) ParsingOption
WithGeneProductColumnRange sets the column range for searching gene products
func WithSkipEmptyDescription ¶
func WithSkipEmptyDescription(skip bool) ParsingOption
WithSkipEmptyDescription controls whether to skip records with empty descriptions
func WithSkipEmptyProduct ¶
func WithSkipEmptyProduct(skip bool) ParsingOption
WithSkipEmptyProduct controls whether to skip records with empty gene products
type PipelineResult ¶
type PipelineResult struct {
File *os.File
Setup SetupConfig
UpdateCount int
Error error
}
Stage 4: Data Processing / Final Pipeline Result
type ProcessSingleRecordParams ¶
type ProcessSingleRecordParams struct {
Record []string
FeaturePropIDIndex int
ValueIndex int
RowNumForLogging int // Actual row number in the CSV file for logging
Logger *logrus.Entry
}
ProcessSingleRecordParams holds the parameters for the processSingleRecordAndValidate function.
type ProcessedGeneData ¶
type ProcessedGeneData struct {
GeneID string
StrippedPropsText []StrippedProperty
}
ProcessedGeneData holds the gene ID and its list of HTML-stripped property values.
type ProcessedGeneProduct ¶
type ProcessedGeneProduct struct {
GeneID string
GeneName string
GeneProduct string
CreatedBy string
CreatedOn time.Time
}
ProcessedGeneProduct holds processed gene with product
type ProcessingConfig ¶
type ProcessingConfig struct {
GeneIDs []string
User string
Client pb.FeatureAnnotationServiceClient
}
ProcessingConfig holds immutable configuration for processing gene IDs
type ProcessingContext ¶
type ProcessingContext struct {
FileContext
FeaturePropIDIndex int
ValueIndex int
}
Stage 3: Header Validation
type ProcessingMetrics ¶
type ProcessingMetrics struct {
TotalProcessed int64
SuccessCount int64
ErrorCount int64
StartTime time.Time
// TotalFetchedFromArango stores the total number of items fetched by queryArango.
// This field is set by queryArango once the total count is known.
TotalFetchedFromArango int64
// AllArangoDocsFetched is a flag set to true by queryArango after all documents
// have been fetched and sent to the processing pipeline.
AllArangoDocsFetched bool
// Intermediate tracking counters for detailed pipeline monitoring
JobsSubmittedToHTMLPool int64
JobsCompletedFromHTMLPool int64
JobsSubmittedToGrpcPool int64
JobsCompletedFromGrpcPool int64
// contains filtered or unexported fields
}
ProcessingMetrics holds counters for tracking progress.
type ProcessingResult ¶
type ProcessingResult struct {
TotalRecordsProcessed int
GeneProductRecordsWritten int
DescriptionRecordsWritten int
}
ProcessingResult contains the results of processing gene data records
type ProcessingStats ¶
ProcessingStats holds aggregate processing statistics
type SetupConfig ¶
type SetupConfig struct {
Logger *logrus.Entry
DBH *arangomanager.Database
CSVFilePath string
CollectionName string
BatchSize int
Delimiter string
Workers int
}
Stage 1: Setup
type SingleGeneValidationParams ¶
type SingleGeneValidationParams struct {
Client *graphql.Client
Record []string
Context context.Context
}
SingleGeneValidationParams contains parameters for validating a single gene
type StrippedProperty ¶
StrippedProperty holds the original property name and its stripped text.
type SubmitBatchAndLogParams ¶
type SubmitBatchAndLogParams struct {
Setup *SetupConfig
Docs []map[string]string
Logger *logrus.Entry
BatchDescription string
}
SubmitBatchAndLogParams holds the parameters for the submitBatchAndLog function.
type SynonymAppConfig ¶
type SynonymAppConfig struct {
Ctx context.Context
NumGrpcWorkers int
Logger *logrus.Entry
Metrics *SynonymMetrics
}
SynonymAppConfig holds configuration for the synonym loader application.
type SynonymData ¶
type SynonymData struct {
Name string `json:"name"`
GeneID string `json:"gene_id"`
Synonyms []string `json:"synonyms"`
}
SynonymData holds gene synonym information from ArangoDB
type SynonymMetrics ¶
type SynonymMetrics struct {
TotalProcessed int64
SuccessCount int64
NotFoundCount int64
ErrorCount int64
StartTime time.Time
TotalFetchedFromArango int64
AllArangoDocsFetched bool
JobsSubmittedToGrpcPool int64
JobsCompletedFromGrpcPool int64
// contains filtered or unexported fields
}
SynonymMetrics holds processing metrics for the synonym loader.
func (*SynonymMetrics) IsComplete ¶
func (m *SynonymMetrics) IsComplete() bool
IsComplete checks if all processing is finished.
type ValidationError ¶
type ValidationError struct {
Errors validator.ValidationErrors
}
ValidationError wraps multiple validation errors from go-playground/validator
func (*ValidationError) Error ¶
func (e *ValidationError) Error() string
type ValidationReport ¶
type ValidationReport struct {
TotalGenes int `json:"total_genes"`
MatchCount int `json:"match_count"`
MismatchCount int `json:"mismatch_count"`
ErrorCount int `json:"error_count"`
Results []ValidationResult `json:"results"`
GeneratedAt time.Time `json:"generated_at"`
}
ValidationReport contains the complete validation report
type ValidationResult ¶
type ValidationResult struct {
GeneID string `json:"gene_id"`
CSVDescription string `json:"csv_description"`
GQLDescription string `json:"gql_description"`
Match bool `json:"match"`
Error string `json:"error,omitempty"`
}
ValidationResult represents the result of validating a single gene
type WithAction ¶
type WithAction struct {
WithAnnotation
Action GeneProcessingAction
}
WithAction holds context with determined action
type WithAnnotation ¶
type WithAnnotation struct {
GeneProcessingContext
Annotation O.Option[*pb.FeatureAnnotation]
}
WithAnnotation holds context with fetched annotation
Source Files
¶
- action.go
- arangodb_querier.go
- bridge_pools.go
- common.go
- feature_annotation_load.go
- flag.go
- functional_text_extractors.go
- gene_product_bridges.go
- gene_product_querier.go
- gene_product_updater.go
- gene_product_workers.go
- gene_updater.go
- grpc_handler.go
- load_csv.go
- load_gene_description.go
- load_gene_product.go
- load_hypothetical_gene_products.go
- parse_unknowme_data.go
- signal_handler.go
- statement.go
- synonym.go
- validate_gene_data.go
- validation.go
- worker_funcs.go