dat

package
v0.0.0-...-8c2d65e Latest Latest
Warning

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

Go to latest
Published: Sep 21, 2024 License: GPL-3.0 Imports: 21 Imported by: 0

Documentation

Overview

Package dat (Database)

Package dat (Database)

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Classify

func Classify(s, decoyTag string) dbtype

Classify determines what kind of database originated the given sequence

func GetOrganismID

func GetOrganismID(temp string, uniprotID string) (string, string)

GetOrganismID maps the UniprotID to organismID

func ParseFile

func ParseFile(filename string, entriesChunk chan<- []fas.FastaEntry) int

func Run

func Run(m met.Data) met.Data

Run is the main entry point for the databse command

Types

type Base

type Base struct {
	FileName        string
	UniProtDB       string
	CrapDB          string
	Prefix          string
	Proteomes       string
	DownloadedFiles []string
	Records         []Record
	RecordsLen      int
	NParts          uint
	PartsLen        []int
	TaDeDB          map[string]string
}

Base main structure

func New

func New() Base

New constructor

func (*Base) Create

func (d *Base) Create(temp, add, enz, tag string, crap, noD, cTag bool, ids map[string]string)

Create processes the given fasta file and add decoy sequences

func (*Base) Deploy

func (d *Base) Deploy(temp string)

Deploy crap file to session folder

func (*Base) Fetch

func (d *Base) Fetch(uniprotID, proteomeID, temp string, iso, rev bool)

Fetch downloads a database file from UniProt

func (*Base) ProcessDBAndSerialize

func (d *Base) ProcessDBAndSerialize(filename, decoyTag string, verbose bool)

ProcessDB_and_serialize determines the type of sequence and sends it to the appropriate parsing function

func (*Base) Restore

func (d *Base) Restore()

Restore reads philosopher results files and restore the data sctructure

func (*Base) RestoreWithPath

func (d *Base) RestoreWithPath(p string)

RestoreWithPath reads philosopher results files and restore the data sctructure

func (*Base) Save

func (d *Base) Save(home, temp, ids, tag string, isRev, hasIso, noD, Crap bool) string

Save fasta file to disk

func (*Base) Serialize

func (d *Base) Serialize()

Serialize saves to disk a msgpack version of the database data structure

type Record

type Record struct {
	ID               string
	OriginalHeader   string
	PartHeader       string
	EntryName        string
	ProteinName      string
	Organism         string
	GeneNames        string
	ProteinExistence string
	Sequence         string
	Class            dbtype
	IsDecoy          bool
}

Record is the root of all database parsers

func ProcessHeader

func ProcessHeader(k, v string, class dbtype, tag string, verb bool) Record

ProcessHeader parses FASTA records looking for individial elements

Jump to

Keyboard shortcuts

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