stockcenter

package
v0.0.0-...-d59ed34 Latest Latest
Warning

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

Go to latest
Published: Aug 17, 2023 License: BSD-2-Clause Imports: 14 Imported by: 0

Documentation

Index

Constants

View Source
const (
	FOLDER = "folder"
	BUCKET = "bucket"
)

Variables

View Source
var GenoCmd = &cobra.Command{
	Use:   "genotype",
	Short: "load stockcenter genotype data",
	Args:  cobra.NoArgs,
	RunE:  loader.LoadGeno,
	PreRunE: func(cmd *cobra.Command, args []string) error {
		if err := SetAnnoAPIClient(); err != nil {
			return err
		}
		if err := setReader(viper.GetString("genotype-input"), regsc.GenoReader); err != nil {
			return err
		}
		return nil
	},
}

GenoCmd is for loading stockcenter genotype data

View Source
var GwdiCmd = &cobra.Command{
	Use:   "gwdi",
	Short: "load gwdi strains",
	Args:  cobra.NoArgs,
	RunE:  loader.LoadGwdi,
	PreRunE: func(cmd *cobra.Command, args []string) error {
		if err := SetStrainAPIClient(); err != nil {
			return err
		}
		if err := SetAnnoAPIClient(); err != nil {
			return err
		}
		if err := setReader(viper.GetString("gwdi-input"), regsc.GwdiReader); err != nil {
			return err
		}
		return nil
	},
}

GwdiCmd is for loading gwdi strains

View Source
var OrderCmd = &cobra.Command{
	Use:     "order",
	Short:   "load stockcenter order data",
	Args:    cobra.NoArgs,
	RunE:    loader.LoadOrder,
	PreRunE: setOrderPreRun,
}

OrderCmd is for loading stockcenter order data

View Source
var PhenoCmd = &cobra.Command{
	Use:   "phenotype",
	Short: "load stockcenter phenotype data",
	Args:  cobra.NoArgs,
	RunE:  loader.LoadPheno,
	PreRunE: func(cmd *cobra.Command, args []string) error {
		if err := SetAnnoAPIClient(); err != nil {
			return err
		}
		if err := setReader(viper.GetString("phenotype-input"), regsc.PhenoReader); err != nil {
			return err
		}
		return nil
	},
}

PhenoCmd is for loading stockcenter phenotype data

View Source
var PlasmidCmd = &cobra.Command{
	Use:     "plasmid",
	Short:   "load stockcenter plasmid data",
	Args:    cobra.NoArgs,
	RunE:    loader.LoadPlasmid,
	PreRunE: setPlasmidPreRun,
}

PlasmidCmd is for loading stockcenter plasmid data

View Source
var PlasmidInvCmd = &cobra.Command{
	Use:   "plasmid-inventory",
	Short: "load plasmid inventory data",
	Args:  cobra.NoArgs,
	RunE:  loader.LoadPlasmidInv,
	PreRunE: func(cmd *cobra.Command, args []string) error {
		if err := SetAnnoAPIClient(); err != nil {
			return err
		}
		if err := setReader(viper.GetString("plasmid-inventory-input"), regsc.InvReader); err != nil {
			return err
		}
		return nil
	},
}

PlasmidInvCmd is for loading plasmid inventory data

View Source
var ReadFileCmd = &cobra.Command{
	Use:     "readfile",
	Short:   "read data from any file",
	Args:    cobra.NoArgs,
	RunE:    LoadReadFile,
	PreRunE: setReadFilePreRun,
}

ReadFileCmd is for reading any data file

View Source
var StockCenterCmd = &cobra.Command{
	Use:   "stockcenter",
	Short: "subcommand for stockcenter data loading",
}

StockCenterCmd represents the base subcommand for grouping all subcommands for loading stockcenter related data

View Source
var StrainCharCmd = &cobra.Command{
	Use:   "strainchar",
	Short: "load stockcenter strain characteristics data",
	Args:  cobra.NoArgs,
	RunE:  loader.LoadStrainChar,
	PreRunE: func(cmd *cobra.Command, args []string) error {
		if err := SetAnnoAPIClient(); err != nil {
			return err
		}
		if err := setReader(viper.GetString("strainchar-input"), regsc.StraincharReader); err != nil {
			return err
		}
		return nil
	},
}

StrainCharCmd is for loading stockcenter strain characteristics data

View Source
var StrainCmd = &cobra.Command{
	Use:     "strain",
	Short:   "load stockcenter strain data",
	Args:    cobra.NoArgs,
	RunE:    loader.LoadStrain,
	PreRunE: setStrainPreRun,
}

StrainCmd is for loading stockcenter strain data

View Source
var StrainInvCmd = &cobra.Command{
	Use:   "strain-inventory",
	Short: "load strain inventory data",
	Args:  cobra.NoArgs,
	RunE:  loader.LoadStrainInv,
	PreRunE: func(cmd *cobra.Command, args []string) error {
		if err := SetAnnoAPIClient(); err != nil {
			return err
		}
		if err := setReader(viper.GetString("strain-inventory-input"), regsc.InvReader); err != nil {
			return err
		}
		return nil
	},
}

StrainInvCmd is for loading strain inventory data

View Source
var StrainPropCmd = &cobra.Command{
	Use:   "strainprop",
	Short: "load stockcenter strain properties data",
	Args:  cobra.NoArgs,
	RunE:  loader.LoadStrainProp,
	PreRunE: func(cmd *cobra.Command, args []string) error {
		if err := SetAnnoAPIClient(); err != nil {
			return err
		}
		if err := setReader(viper.GetString("strainprop-input"), regsc.StrainpropReader); err != nil {
			return err
		}
		return nil
	},
}

StrainPropCmd is for loading stockcenter strain properties data

View Source
var StrainSynCmd = &cobra.Command{
	Use:   "strainsyn",
	Short: "load stockcenter strain synonyms",
	Args:  cobra.NoArgs,
	RunE:  loader.LoadStrainSynProp,
	PreRunE: func(cmd *cobra.Command, args []string) error {
		if err := SetAnnoAPIClient(); err != nil {
			return err
		}
		if err := setReader(viper.GetString("strainsyn-input"), regsc.StrainSynReader); err != nil {
			return err
		}
		return nil
	},
}

StrainSynCmd is for loading stockcenter strain synonyms

Functions

func LoadReadFile

func LoadReadFile(cmd *cobra.Command, args []string) error

LoadReadFile reads at least first 10 lines of the file

func SetAnnoAPIClient

func SetAnnoAPIClient() error

func SetStrainAPIClient

func SetStrainAPIClient() error

Types

This section is empty.

Jump to

Keyboard shortcuts

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