interpro

package
v0.0.0-...-35b420c Latest Latest
Warning

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

Go to latest
Published: May 22, 2026 License: BSD-2-Clause Imports: 27 Imported by: 0

Documentation

Overview

Package interpro provides the implementation of the `interpro download` command, which fetches InterPro protein records for a given taxonomy ID and writes them to an output file in TSV format.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func DownloadAndWrite

func DownloadAndWrite(_ context.Context, cmd *cli.Command) error

func FormatTSVChunk

func FormatTSVChunk(results []Result) string

func Scan

func Scan(_ context.Context, cmd *cli.Command) error

Types

type APIResponse

type APIResponse struct {
	Count    int      `json:"count"`
	Next     *string  `json:"next"`
	Previous *string  `json:"previous"`
	Results  []Result `json:"results"`
}

type CompletedJob

type CompletedJob struct {
	JobID  string
	SeqID  string
	Client ioehttp.Client
	Config ScanRequest
}

CompletedJob holds state after polling reports FINISHED.

type ExtractConfig

type ExtractConfig = T.Tuple3[ioehttp.Client, string, string]

type FetchConfig

type FetchConfig = T.Tuple2[ioehttp.Client, string]

type Metadata

type Metadata struct {
	Accession      string         `json:"accession"`
	Name           string         `json:"name"`
	SourceDatabase string         `json:"source_database"`
	Length         int            `json:"length"`
	SourceOrganism SourceOrganism `json:"source_organism"`
	Gene           string         `json:"gene"`
	InAlphafold    bool           `json:"in_alphafold"`
	InBfvd         bool           `json:"in_bfvd"`
}

type PageStep

type PageStep = T.Tuple2[string, string]

type Result

type Result struct {
	Metadata Metadata `json:"metadata"`
	Taxa     []Taxon  `json:"taxa"`
}

type RuntimeState

type RuntimeState = T.Tuple4[ioehttp.Client, string, string, *os.File]

type ScanRequest

type ScanRequest struct {
	FastaPath    string
	Email        string
	OutputDir    string
	SeqType      string
	BaseURL      string
	PollInterval time.Duration
	Timeout      time.Duration
}

ScanRequest carries the user-provided inputs extracted from CLI flags.

type SourceOrganism

type SourceOrganism struct {
	TaxID          string `json:"taxId"`
	ScientificName string `json:"scientificName"`
	FullName       string `json:"fullName"`
}

type SubmitArgs

type SubmitArgs = T.Tuple2[ioehttp.Client, ScanRequest]

SubmitArgs bundles the shared HTTP client and scan config. Uses project-wide T.Tuple2 convention for arg bundles.

type SubmitInput

type SubmitInput = T.Tuple3[ioehttp.Client, ScanRequest, seqio.Fasta]

SubmitInput bundles client, config, and fasta record for submission.

type SubmittedJob

type SubmittedJob struct {
	JobID  string
	SeqID  string
	Client ioehttp.Client
	Config ScanRequest
}

SubmittedJob holds state after a successful API submission.

type Taxon

type Taxon struct {
	Accession      string   `json:"accession"`
	Lineage        []string `json:"lineage"`
	SourceDatabase string   `json:"source_database"`
}

type WriteConfig

type WriteConfig = T.Tuple3[*os.File, string, string]

Jump to

Keyboard shortcuts

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