parquet

package
v0.13.2 Latest Latest
Warning

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

Go to latest
Published: Apr 29, 2026 License: MIT Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GenusFromSpecies

func GenusFromSpecies(species string) string

func ReadAll

func ReadAll[T any](path string) ([]T, error)

ReadAll reads all rows from a parquet file into a slice of T. Column projection is performed based on the struct's parquet tags.

func ReadFiltered

func ReadFiltered[T any](path string, fn func(T) bool) ([]T, error)

ReadFiltered reads rows from a parquet file, keeping only those where fn returns true. Column projection is performed based on the struct's parquet tags.

func ReadStreamFiltered

func ReadStreamFiltered[T any](path string, fn func(T) bool, limit int) ([]T, error)

ReadStreamFiltered reads rows from a parquet file, applying the predicate during deserialization and returning only matching rows. If limit > 0, reading stops as soon as limit matching rows have been collected.

Types

type AMRRow

type AMRRow struct {
	Name           string  `parquet:"Name"`
	GeneSymbol     string  `parquet:"Gene symbol"`
	HierarchyNode  string  `parquet:"Hierarchy node"`
	ElementType    string  `parquet:"Element type"`
	ElementSubtype string  `parquet:"Element subtype"`
	Coverage       float64 `parquet:"% Coverage of reference sequence"`
	Identity       float64 `parquet:"% Identity to reference sequence"`
	Method         string  `parquet:"Method"`
	Class          string  `parquet:"Class"`
	Subclass       string  `parquet:"Subclass"`
	Species        string  `parquet:"Species"`
	Genus          string  `parquet:"Genus"`
}

type AssemblyRow

type AssemblyRow struct {
	SampleAccession   string `parquet:"sample_accession"`
	RunAccession      string `parquet:"run_accession"`
	AssemblyAccession string `parquet:"assembly_accession"`
	SylphSpecies      string `parquet:"sylph_species"`
	HQFilter          string `parquet:"hq_filter"`
	AsmFastaOnOSF     int64  `parquet:"asm_fasta_on_osf"`
	Dataset           string `parquet:"dataset"`
	ScientificName    string `parquet:"scientific_name"`
	AWSUrl            string `parquet:"aws_url"`
	OSFTarballURL     string `parquet:"osf_tarball_url"`
}

type AssemblyStatsRow

type AssemblyStatsRow struct {
	SampleAccession string  `parquet:"sample_accession"`
	TotalLength     int64   `parquet:"total_length"`
	Number          int64   `parquet:"number"`
	MeanLength      float64 `parquet:"mean_length"`
	Longest         int64   `parquet:"longest"`
	Shortest        int64   `parquet:"shortest"`
	N50             int64   `parquet:"N50"`
	N90             int64   `parquet:"N90"`
}

type CheckM2Row

type CheckM2Row struct {
	SampleAccession      string  `parquet:"sample_accession"`
	CompletenessGeneral  float64 `parquet:"Completeness_General"`
	Contamination        float64 `parquet:"Contamination"`
	CompletenessSpecific float64 `parquet:"Completeness_Specific"`
	GenomeSize           float64 `parquet:"Genome_Size"`
	GCContent            float64 `parquet:"GC_Content"`
}

type ENARow

type ENARow struct {
	RunAccession       string `parquet:"run_accession"`
	SampleAccession    string `parquet:"sample_accession"`
	Country            string `parquet:"country"`
	CollectionDate     string `parquet:"collection_date"`
	InstrumentPlatform string `parquet:"instrument_platform"`
	InstrumentModel    string `parquet:"instrument_model"`
	ReadCount          int64  `parquet:"read_count"`
	BaseCount          int64  `parquet:"base_count"`
	LibraryStrategy    string `parquet:"library_strategy"`
	StudyAccession     string `parquet:"study_accession"`
	FastqFTP           string `parquet:"fastq_ftp"`
}

type MLSTRow

type MLSTRow struct {
	Sample  string `parquet:"sample"`
	Scheme  string `parquet:"mlst_scheme"`
	ST      string `parquet:"mlst_st"`
	Status  string `parquet:"mlst_status"`
	Score   int32  `parquet:"mlst_score"`
	Alleles string `parquet:"mlst_alleles"`
}

type RunRow

type RunRow struct {
	RunAccession    string `parquet:"run_accession"`
	SampleAccession string `parquet:"sample_accession"`
	Pass            int64  `parquet:"pass"`
}

type SylphRow

type SylphRow struct {
	SampleAccession    string  `parquet:"sample_accession"`
	RunAccession       string  `parquet:"run_accession"`
	AdjustedANI        float64 `parquet:"Adjusted_ANI"`
	TaxonomicAbundance float64 `parquet:"Taxonomic_abundance"`
	SequenceAbundance  float64 `parquet:"Sequence_abundance"`
	MedianCov          int64   `parquet:"Median_cov"`
	Species            string  `parquet:"Species"`
}

Jump to

Keyboard shortcuts

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