dataset

package
v0.0.0-...-040724e Latest Latest
Warning

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

Go to latest
Published: Jun 6, 2019 License: BSD-3-Clause, GPL-2.0, BSD-3-Clause, + 1 more Imports: 11 Imported by: 1

Documentation

Overview

interface

platereaderparse.go Part of the Antha language Copyright (C) 2015 The Antha authors. All rights reserved.

This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version.

This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.

You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.

For more information relating to the software or licensing issues please contact license@antha-lang.org or write to the Antha team c/o Synthace Ltd. The London Bioscience Innovation Centre 2 Royal College St, London NW1 0NH UK

Part of the Antha language Copyright (C) 2015 The Antha authors. All rights reserved.

This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version.

This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.

You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.

For more information relating to the software or licensing issues please contact license@antha-lang.org or write to the Antha team c/o Synthace Ltd. The London Bioscience Innovation Centre 2 Royal College St, London NW1 0NH UK

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type AbsorbanceData

type AbsorbanceData interface {
	Absorbance(wellname string, wavelength int, options ...interface{}) (average wtype.Absorbance, err error)
	AllAbsorbanceData() (map[string][]wtype.Absorbance, error)
}

/////

type AbsorbanceTimeCourseData

type AbsorbanceTimeCourseData interface {
	AbsorbanceData
	TimeCourseData
}

type FluorescenceData

type FluorescenceData interface {
	Fluorescence(wellname string, excitationWavelength, emissionWavelength int, options ...interface{}) (average float64, err error)
}

type FluorescenceTimeCourseData

type FluorescenceTimeCourseData interface {
	FluorescenceData
	TimeCourseData
}

minimal interface to support existing fluoresence based antha elements which use plate reader data (AddGFPODPlateReaderResults)

type MarsData

type MarsData struct {
	User            string
	Path            string
	TestID          int
	Testname        string
	Date            time.Time
	Time            time.Time
	ID1             string
	ID2             string
	ID3             string
	Description     string
	Dataforeachwell map[string]WellData
}

MarsData represents the contents of a parsed platereader data file exported from Mars.

func (MarsData) AbsScanData

func (data MarsData) AbsScanData(well string) (wavelengths []int, Readings []float64)

AbsScanData returns all wavelengths and readings for a specified well.

func (MarsData) Absorbance

func (data MarsData) Absorbance(well string, wavelength int, options ...interface{}) (average wtype.Absorbance, err error)

Absorbance returns the average of all readings at a specified wavelength. First the exact absorbance reading is searched for, failing that a scan will be searched for. If a value for options is declared, this can be used as the header to look for when matching in cases where multiple headers are present for a sample ... e.g. "Blank corrected based on Raw Data (Abs Spectrum)" and "Raw Data (Abs Spectrum)"

func (MarsData) AllAbsorbanceData

func (data MarsData) AllAbsorbanceData() (readings map[string][]wtype.Absorbance, err error)

AllAbsorbanceData returns all absorbance readings using the well location as key.

func (MarsData) AvailableReadings

func (data MarsData) AvailableReadings(wellname string) (readingDescriptions []string)

func (MarsData) EMScanData

func (data MarsData) EMScanData(well string, exWavelength int) (wavelengths []int, Readings []float64)

EMScanData returns all emmission wavelengths and readings for a specified well and excitation wavelength.

func (MarsData) EXScanData

func (data MarsData) EXScanData(well string, emWavelength int) (wavelengths []int, Readings []float64)

EMScanData returns all excitation wavelengths and readings for a specified well and emmission wavelength.

func (MarsData) FindOptimalAbsorbanceWavelength

func (data MarsData) FindOptimalAbsorbanceWavelength(well string, blankname string) (wavelength int, err error)

FindOptimalAbsorbanceWavelength returns the wavelength for which the difference in signal between the sample and blank is greatest.

func (MarsData) Readings

func (data MarsData) Readings(well string) []PRMeasurement

Readings returns all measurements found for the sepcified well (wells should be specified in A1 format).

func (MarsData) ReadingsAsAverage

func (data MarsData) ReadingsAsAverage(well string, emexortime platereader.FilterOption, fieldvalue interface{}, readingtypekeyword string) (average float64, err error)

ReadingsAsAverage returnwwellnameamee data for the specified well matching ReadingType with appropriate fieldvalue. field value is the value which the data is to be filtered by, e.g. if filtering by time, this would be the time at which to return readings for; if filtering by excitation wavelength, this would be the wavelength at which to return readings for. readingtypekeyword corresponds to key words found in the header of a data column. Examples:

//const (

absorbanceSpectrumHeader = "(Abs Spectrum)"
emissionSpectrumHeader   = "(Em Spectrum)"
excitationSpectrumHeader = "(Ex Spectrum)"
absorbanceHeader         = "(A-"
rawDataHeader            = "Raw Data"

)

func (MarsData) TimeCourse

func (data MarsData) TimeCourse(wellname string, exWavelength int, emWavelength int, scriptnumber int) (xaxis []time.Duration, yaxis []float64, err error)

TimeCourse returns either a fluorescence timecourse or an Absorbance timecourse data series. If Absorbance, the excitation and emmission wavelengths should both be set to the Absorbance wavelength. scriptnumber allows the possibility to distinguish runs with the same excitation and emmission wavelengths but run as different scripts, e.g. if ran with different gains. If scriptnumber is set to 0 this will not be used.

func (MarsData) WelltoDataMap

func (data MarsData) WelltoDataMap() map[string]WellData

WelltoDataMap returns a map of well location (in format A1) to plate reader data for that well.

type MoreSettings

type MoreSettings struct {
	Calibrate     string `xml:"Calibrate"`
	CarriageSpeed string `xml:"CarriageSpeed"`
	ReadOrder     string `xml:"ReadOrder"`
}

MoreSettings is exported so requires a comment

type PRMeasurement

type PRMeasurement struct {
	EWavelength int           //	excitation wavelength
	RWavelength int           //	emission wavelength
	Reading     float64       //int           // 	value read
	Xoff        int           //	position - x, relative to well centre
	Yoff        int           //	position - y, relative to well centre
	Zoff        int           // 	position - z, relative to well centre
	Timestamp   time.Duration // instant measurement was taken
	Temp        float64       //int       //   temperature
	O2          int           // o2 conc when measurement was taken
	CO2         int           // co2 conc when measurement was taken
	EBand       int
	RBand       int
	Script      int
	Gain        int
	// ReadingType is the annotation found in the column header in the exported mars excel file
	// e.g. Raw Data (Abs Scan)
	ReadingType string
}

PRMeasurement contains the details of a plate reader measurement.

type PRMeasurementSet

type PRMeasurementSet []PRMeasurement

PRMeasurementSet is a set of Plate reader measurements

type PROutput

type PROutput struct {
	Readings []PRMeasurementSet
}

PROutput is a modified version of the platereeader data type from antha/microArch/driver/platereading.

type PlateReaderData

type PlateReaderData interface {
	ReadingsAsAverage(wellname string, emexortime platereader.FilterOption, fieldvalue interface{}) (average float64, err error)
}

minimal interface to support existing antha elements which use plate reader data (AddPlateReder_Results)

type Reading

type Reading struct {
	Wavelength Wavelength `xml:"Wavelength"`
	Wells      []Well     `xml:"Wells"`
}

Reading is exported so requires a comment

type SpectraMaxData

type SpectraMaxData struct {
	Name       xml.Name           `xml:"Experiment"`
	Experiment []XMLPlateSections `xml:"PlateSections"`
}

XMLExperiment is exported so requires a comment

func (SpectraMaxData) Absorbance

func (s SpectraMaxData) Absorbance(wellname string, wavelength int, options ...interface{}) (average wtype.Absorbance, err error)

Absorbance returns the absorbance reading of the specified well at the specified wavelength. currently no additional options are supported.

func (SpectraMaxData) AllAbsorbanceData

func (s SpectraMaxData) AllAbsorbanceData() (readings map[string][]wtype.Absorbance, err error)

AllAbsorbanceData returns all readings for using the well name as key.

func (SpectraMaxData) BlankCorrect

func (s SpectraMaxData) BlankCorrect(wellnames []string, blanknames []string, wavelength int) (blankcorrectedaverage float64, err error)

BlankCorrect subtracts the mean of the values matching the specified wavelength of the blank wells specified by the sample wells.

func (SpectraMaxData) FindOptimalAbsorbanceWavelength

func (s SpectraMaxData) FindOptimalAbsorbanceWavelength(wellname string, blankname string) (wavelength int, err error)

FindOptimalAbsorbanceWavelength returns the wavelength for which the difference in signal between the sample and blank is greatest.

func (SpectraMaxData) ReadingsAsAverage

func (s SpectraMaxData) ReadingsAsAverage(wellname string, emexortime platereader.FilterOption, fieldvalue interface{}) (average float64, err error)

ReadingsAsAverage returns the data for the specified well matching ReadingType with appropriate fieldvalue. Currently only Absorbance data as endpoint scans are supported. Currently the only valid FilterOptions are platereader.EMWAVELENGTH or platereader.EXWAVELENGTH with the field value being the wavelength as an int.

type TimeCourseData

type TimeCourseData interface {
	TimeCourse(wellname string, exWavelength int, emWavelength int, scriptnumber int) (xaxis []time.Duration, yaxis []float64, err error)
}

type Wavelength

type Wavelength struct {
	Index int     `xml:"WavelengthIndex,attr"`
	Wells []Wells `xml:"Wells"`
}

Wavelength is exported so requires a comment

type WavelengthSettings

type WavelengthSettings struct {
	NumberOfWavelengths int      `xml:"NumberOfWavelengths,attr"`
	Wavelength          []string `xml:"Wavelength"`
}

WavelengthSettings is exported so requires a comment

type Well

type Well struct {
	ID       string `xml:"ID,attr"`     // Single reading
	WellID   string `xml:"WellID,attr"` // Scan data
	Name     string `xml:"Name,attr"`
	Row      int    `xml:"Row,attr"`
	Column   int    `xml:"Col,attr"`
	RawData  string `xml:"RawData"`
	WaveData string `xml:"WaveData"` // Scan data
}

Well is exported so requires a comment

func (Well) IsScanData

func (w Well) IsScanData() bool

type WellData

type WellData struct {
	Well            string // in a1 format
	Name            string
	Data            PROutput
	Injected        bool
	InjectionVolume float64
}

WellData represents the details of a reading for a well.

type Wells

type Wells struct {
	Wells []Well `xml:"Well"`
}

Wells is exported so requires a comment

type XMLInstrumentSettings

type XMLInstrumentSettings struct {
	ReadMode           platereader.ReadMode `xml:"ReadMode,attr"`
	ReadType           platereader.ReadType `xml:"ReadType,attr"`
	PlateType          string               `xml:"PlateType,attr"` // may need to change to a string for now since it's unlikely the plate names in the platereader software will correspond to those in antha
	AutoMix            bool                 `xml:"AutoMix"`
	MoreSettings       MoreSettings         `xml:"MoreSettings"`
	WavelengthSettings WavelengthSettings   `xml:"WavelengthSettings"`
}

XMLInstrumentSettings is exported so requires a comment

type XMLPlateSection

type XMLPlateSection struct {
	Name               string                `xml:"Name,attr"`
	InstrumentInfo     string                `xml:"InstrumentInfo,attr"`
	ReadTime           customTime            `xml:"ReadTime,attr"`
	Barcode            string                `xml:"Barcode"`
	InstrumentSettings XMLInstrumentSettings `xml:"InstrumentSettings"`
	Wavelengths        []Reading             `xml:"Wavelengths"`
	TemperatureData    wunit.Temperature     `xml:"TemperatureData"`
}

XMLPlateSection is exported so requires a comment

type XMLPlateSections

type XMLPlateSections struct {
	PlateSections []XMLPlateSection `xml:"PlateSection"`
}

XMLPlateSections is exported so requires a comment

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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