saint

package
v0.0.0-...-40008dc Latest Latest
Warning

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

Go to latest
Published: Jun 11, 2022 License: MIT Imports: 13 Imported by: 0

Documentation

Overview

Package saint reads and parses SAINT-related files.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type BaitDatRow

type BaitDatRow struct {
	ID      string
	Name    string
	Control bool
	Type    string // This is for an optional 4th column that I can add to the file.
}

BaitDatRow defines the headers in a bait.dat file.

func BaitDat

func BaitDat(filename string) []BaitDatRow

BaitDat reads a bait.dat file.

type InterDatRow

type InterDatRow struct {
	ID   string
	Bait string
	Prey string
	Spec int
}

InterDatRow defines the headers in a bait.dat file.

func InterDat

func InterDat(filename string) []InterDatRow

InterDat reads a prey.dat file.

type PreyDatRow

type PreyDatRow struct {
	Accession string
	Length    int
	Name      string
}

PreyDatRow defines the headers in a bait.dat file.

func PreyDat

func PreyDat(filename string) []PreyDatRow

PreyDat reads a prey.dat file.

type Row

type Row struct {
	Bait               string
	Prey               string
	PreyGene           string
	Spec               []float64
	AvgSpec            float64
	Control            []float64
	AvgP               float64
	FoldChange         float64
	FDR                float64
	NormalizedSpec     float64
	PreySequenceLength int
}

Row defines the headers in a SAINT file.

type SAINT

type SAINT []Row

SAINT is an array of Rows from a SAINT file.

func Read

func Read(filename string, fdr float64, minBaits int) *SAINT

Read reads a SAINT file and filters by FDR.

func (*SAINT) FilterByBaitNumber

func (saint *SAINT) FilterByBaitNumber(minimumBaits int)

FilterByBaitNumber filters a SAINT file by a minimum bait number required per prey.

func (*SAINT) FilterByFDR

func (s *SAINT) FilterByFDR(fdr float64)

FilterByFDR removes preys not passing an FDR.

func (*SAINT) GetUniProtMapping

func (s *SAINT) GetUniProtMapping() map[string]string

GetUniProtMapping creates a map from UniProt accessions to gene names using the Refseq "Prey" column IDs.

func (*SAINT) LengthNormalizeSpectralCounts

func (s *SAINT) LengthNormalizeSpectralCounts()

LengthNormalizeSpectralCounts substracts control counts from the average spectral count and then multiplies by the median prey length for the bait / current prey length.

func (*SAINT) ParseInteractors

func (s *SAINT) ParseInteractors(fdr float64) map[string][]string

ParseInteractors returns significant interactors for each bait.

func (*SAINT) SortByPreyRank

func (s *SAINT) SortByPreyRank(field string) map[string][]string

SortByPreyRank returns a list of preys for each bait, sorted in order of the spectral count or normalized spectral count

Jump to

Keyboard shortcuts

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