Logo ProcessCore

Regex Module

This module contains unified regex patterns and matching functions to parse isa tab column headers to BuildingBlock information.

Nested modules

Modules Description

ActivePatterns

Pattern

Functions and values

Function or value Description

getTermAnnotationShortString str

Full Usage: getTermAnnotationShortString str

Parameters:
    str : string

Returns: string

Parses 'str' to term accession and returns it in the format "termsourceref:localtan". Exmp.: "MS:000001"

str : string
Returns: string

tryGetTermAnnotationShortString str

Full Usage: tryGetTermAnnotationShortString str

Parameters:
    str : string

Returns: string option

Tries to parse 'str' to term accession and returns it in the format `Some "termsourceref:localtan"`. Exmp.: `Some "MS:000001"`

str : string
Returns: string option

tryParseCharacteristicColumnHeader input

Full Usage: tryParseCharacteristicColumnHeader input

Parameters:
    input : string

Returns: string option

Matches a "Characteristic [Term]" or "Characteristics [Term]" or "Characteristics Value [Term]" column header and returns the Term string.

input : string
Returns: string option

tryParseComponentColumnHeader input

Full Usage: tryParseComponentColumnHeader input

Parameters:
    input : string

Returns: string option

Matches a "Component [Term]" or "Characteristics [Term]" or "Component Value [Term]" column header and returns the Term string.

input : string
Returns: string option

tryParseExcelNumberFormat headerStr

Full Usage: tryParseExcelNumberFormat headerStr

Parameters:
    headerStr : string

Returns: string option

This function is used to parse Excel numberFormat string to term name. **Example 1:** "0.00 "degree Celsius"" --> "degree Celsius"

headerStr : string
Returns: string option

tryParseFactorColumnHeader input

Full Usage: tryParseFactorColumnHeader input

Parameters:
    input : string

Returns: string option

Matches a "Factor [Term]" or "Factor Value [Term]" column header and returns the Term string.

input : string
Returns: string option

tryParseIOTypeHeader headerStr

Full Usage: tryParseIOTypeHeader headerStr

Parameters:
    headerStr : string

Returns: string option

This function is used to match both Input and Output columns and capture the IOType as `iotype` group. **Example 1:** "Input [Sample]" --> "Sample"

headerStr : string
Returns: string option

tryParseInputColumnHeader input

Full Usage: tryParseInputColumnHeader input

Parameters:
    input : string

Returns: string option

Matches a "Input [InputType]" column header and returns the InputType as string.

input : string
Returns: string option

tryParseOutputColumnHeader input

Full Usage: tryParseOutputColumnHeader input

Parameters:
    input : string

Returns: string option

Matches a "Output [OutputType]" column header and returns the OutputType as string.

input : string
Returns: string option

tryParseParameterColumnHeader input

Full Usage: tryParseParameterColumnHeader input

Parameters:
    input : string

Returns: string option

Matches a "Parameter [Term]" or "Parameter Value [Term]" column header and returns the Term string.

input : string
Returns: string option

tryParseReferenceColumnHeader str

Full Usage: tryParseReferenceColumnHeader str

Parameters:
    str : string

Returns: (type) option
str : string
Returns: (type) option

tryParseTANColumnHeader input

Full Usage: tryParseTANColumnHeader input

Parameters:
    input : string

Returns: (type) option

Matches a "Term Accession Number (ShortTerm)" column header and returns the ShortTerm as Term Source Ref and Annotation Number. Example: "Term Accession Number (MS:1003022)" --> term source ref: "MS"; annotation number: "1003022"

input : string
Returns: (type) option

tryParseTSRColumnHeader input

Full Usage: tryParseTSRColumnHeader input

Parameters:
    input : string

Returns: (type) option

Matches a "Term Source REF (ShortTerm)" column header and returns the ShortTerm as Term Source Ref and Annotation Number. Example: "Term Source REF (MS:1003022)" --> term source ref: "MS"; annotation number: "1003022"

input : string
Returns: (type) option

tryParseTermAnnotation str

Full Usage: tryParseTermAnnotation str

Parameters:
    str : string

Returns: (type) option

This function can be used to extract `IDSPACE:LOCALID` (or: `Term Accession`) from Swate header strings or obofoundry conform URI strings. **Example 1:** "http://purl.obolibrary.org/obo/GO_000001" --> "GO:000001" **Example 2:** "Term Source REF (NFDI4PSO:0000064)" --> "NFDI4PSO:0000064"

str : string
Returns: (type) option

tryParseTermAnnotationShort str

Full Usage: tryParseTermAnnotationShort str

Parameters:
    str : string

Returns: (type) option
str : string
Returns: (type) option

tryParseTermColumn input

Full Usage: tryParseTermColumn input

Parameters:
    input : string

Returns: (type) option

Matches any column header starting with some text, followed by one whitespace and a term name inside squared brackets.

input : string
Returns: (type) option

tryParseUnitColumnHeader input

Full Usage: tryParseUnitColumnHeader input

Parameters:
    input : string

Returns: string option

Matches a "Unit" column header.

input : string
Returns: string option

Type something to start searching.