output

package
v1.4.0 Latest Latest
Warning

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

Go to latest
Published: Dec 1, 2020 License: MIT Imports: 11 Imported by: 0

Documentation

Overview

Package output writes results to a file.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Write

func Write(
	filePath,
	format string,
	outputData Data,
)

Write gene results to a file.

Types

type Data

type Data struct {
	Database           string           `json:"database"`
	Enzyme             string           `json:"enzyme,omitempty"`
	FDR                float64          `json:"fdr,omitempty"`
	File               string           `json:"file"`
	Genes              map[string]*Gene `json:"genes"`
	MissedCleavages    int              `json:"missedCleavages,omitempty"`
	PeptideProbability float64          `json:"peptideProbability,omitempty"`
	Pipeline           string           `json:"pipeline"`
}

Data is a map of genes to their output summary.

func Format

func Format(
	options types.Parameters,
	genes types.Genes,
	geneIDtoName map[string]string,
	peptides types.Peptides,
	peptideMap map[string]string,
) Data

Format data for output.

type Gene

type Gene struct {
	Name          string             `json:"name"`
	Peptides      map[string]Peptide `json:"peptides"`
	SharedIDs     []string           `json:"sharedIDs"`
	SharedNames   []string           `json:"sharedNames"`
	SpectralCount float64            `json:"spectralCount"`
	Subsumed      []string           `json:"subsumed"`
	Unique        int                `json:"unique"`
	UniqueShared  int                `json:"uniqueShared"`
}

Gene is summary of a gene for output.

type Peptide

type Peptide struct {
	AllottedSpectralCount float64 `json:"allottedSpectralCount"`
	TotalSpectralCount    float64 `json:"totalSpectralCount"`
	Unique                bool    `json:"unique"`
	UniqueShared          bool    `json:"uniqueShared"`
}

Peptide is summary of a gene's peptides for output.

Jump to

Keyboard shortcuts

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