parser

package
v1.1.6 Latest Latest
Warning

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

Go to latest
Published: Apr 24, 2025 License: BSD-3-Clause Imports: 15 Imported by: 1

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func AssignPDBxCategories

func AssignPDBxCategories(dataItems []converterUtils.PDBxItem) map[string][]converterUtils.PDBxItem

func ConversionTableReadColumn

func ConversionTableReadColumn(path string, column string) ([]string, error)

ConversionTableReadColumn return a slice of column values in a table. It takes a path to a CSV file and column name as an argument.

func CreteMetadataCif added in v1.1.1

func CreteMetadataCif(nameMapper map[string]string, PDBxItems map[string][]cU.PDBxItem, valuesMap map[string][]string, OSCEMunits map[string][]string) (string, error)

CreteMetadataCif creates and mmCIF file content as a string. This function only converts metadata in the required format. Meant for EMDB depositions where no other existing mmCIF is available

func EMDBconvert added in v1.1.1

func EMDBconvert(scientificMetadata map[string]any, metadataLevelNameInJson string, conversionFile string, dictFile string) (string, error)

func FromJson

func FromJson(jsonContent map[string]any, mapAll *map[string][]string, mapUnits *map[string][]string, level string) error

func LoopDataEntry added in v1.1.2

func LoopDataEntry(scanner *bufio.Scanner, category string) (map[string]string, string, uint32, string)

return the categories, same as long string, the length and next category

func PDBconvertFromPath added in v1.1.1

func PDBconvertFromPath(scientificMetadata map[string]any, metadataLevelNameInJson string, conversionFile string, dictFile string, mmCIFInputPath string) (string, error)

func PDBconvertFromReader added in v1.1.6

func PDBconvertFromReader(scientificMetadata map[string]any, metadataLevelNameInJson string, conversionFile string, dictFile string, mmCIFInput io.Reader) (string, error)

func PDBxDict

func PDBxDict(path string, relevantNames []string) ([]converterUtils.PDBxItem, error)

PDBxDict parses full dictionary and returns a map, where key is data category name and value is slice of structs ordered the same way as in the dictionary. This struct contains relevant properties of a data item in the dictionary. PDBx contains a few thousands of data items. For a single experiment done with a certain technique it is redundant no keep track of most of data items as they are highly specific to this technique. To avoid that relevantNames argument makes this function record only data items references in the slice.

func SupplementCoordinates added in v1.1.6

func SupplementCoordinates(nameMapper map[string]string, PDBxItems map[string][]cU.PDBxItem, valuesMap map[string][]string, OSCEMunits map[string][]string, mmCIFpath io.Reader) (string, error)

Given an mmCIF file create a new one with added scientific Metadata. Meant for PDB depositions

func SupplementCoordinatesFromPath added in v1.1.1

func SupplementCoordinatesFromPath(nameMapper map[string]string, PDBxItems map[string][]cU.PDBxItem, valuesMap map[string][]string, OSCEMunits map[string][]string, mmCIFpath string) (string, error)

Given an mmCIF file path, open it and create a new one with added scientific Metadata. Meant for PDB depositions

func WriteCif added in v1.1.2

func WriteCif(mmCIFText string, mmCIFOutputPath string) error

Types

This section is empty.

Jump to

Keyboard shortcuts

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