model

package
v0.0.0-...-e8a583a Latest Latest
Warning

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

Go to latest
Published: Sep 8, 2021 License: MIT Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

DefaultPropertiesToComputeAfter specifies the properties to compute after all of the `PropertiesToCompute` properties of the RBS calc model have been computed

View Source
var DefaultPropertiesToComputeBefore []RBSPropertyFunc = []RBSPropertyFunc{
	ensureSaneInput,
	StartPosition,
}

DefaultPropertiesToComputeBefore specifies the properties to compute before any of the `PropertiesToCompute` properties of the RBS calc model are computed

Functions

func CleanRNA

func CleanRNA(rna string) string

CleanRNA converts DNA to RNA and makes sequence upper case

func ComputePropertiesForDataset

func ComputePropertiesForDataset(datasetName string,
	propertiesToCompute, propertiesToOutputToCSV []RBSPropertyFunc,
	fivePrimeUTRColIdx, cdsColIdx, tempColIdx, ribosomalRNAColIdx int,
	columnsToKeepInOutputCSV ...datasets.DatasetColumn)

ComputePropertiesForDataset creates a `RibosomeBindingSite` struct for each data point in the input dataset, computes the desired properties (the `propertiesToCompute` argument), and outputs the selected properties of each `RibosomeBindingSite` struct (the `propertiesToOutputToCSV` argument) to a CSV in the `dataset_with_properties` directory in the package this function is called from.

The input dataset may contain information that we'd like to include the output csv which may not be part of the `RibosomeBindingSite` struct. The `otherInformationMap` is an argument which specifies a map of column index to column header name which will be included in the outputted csv file.

func FivePrimeUTR

func FivePrimeUTR(rbs *RibosomeBindingSite) interface{}

FivePrimeUTR returns the `FivePrimeUTR` field of the `rbs` struct

func FuncName

func FuncName(fn interface{}) string

FuncName returns a string of the name of the function `fn`

func FuncNames

func FuncNames(properties []RBSPropertyFunc) (names []string)

FuncNames returns the names of the function from a list of `Property`

func ProteinCodingSequence

func ProteinCodingSequence(rbs *RibosomeBindingSite) interface{}

ProteinCodingSequence returns the `ProteinCodingSequence` field of the `rbs` struct

func StartPosition

func StartPosition(rbs *RibosomeBindingSite) interface{}

StartPosition makes note of the position at which the protein coding sequence starts in the mRNA sequence. This property is not used in the free energy model, but is added as we need to output the position at which the mRNA sequence is delimited into its five prime UTR and coding sequence.

We call this before any properties have been computed as the five prime UTR could be updated by a property which would give us an incorrect start position

func TranslationInitiationRate

func TranslationInitiationRate(rbs *RibosomeBindingSite) interface{}

TranslationInitiationRate returns the `TranslationInitiationRate` field of the `rbs` struct

Types

type RBSPropertyFunc

type RBSPropertyFunc (func(*RibosomeBindingSite) interface{})

RBSPropertyFunc is the type of a func that can be used to compute a property for the `RibosomeBindingSite` struct

type RibosomeBindingSite

type RibosomeBindingSite struct {
	// FivePrimeUTR is the untranslated region of the mRNA sequence on the five
	// prime end
	FivePrimeUTR string
	// ProteinCodingSequence is the sequence after the 5' UTR that encodes a
	// protein
	ProteinCodingSequence string
	Temperature           float64
	// RibosomalRNA is the 16S rRNA of the organism the mRNA strand is inserted
	// into
	RibosomalRNA string
	// Properties is a map that contains the computed properties
	Properties map[string]interface{}
	// OtherInformation contains information that we'd like to output to the
	// dataset with properties, but is not used to compute properties of a
	// binding site. This field is used by the `ComputePropertiesForDataset` func.
	OtherInformation []string
	// TranslationInitiationRate is the computed translation initiation rate for
	// this binding site. Please note that this field is only set during inference
	// in the `TranslationInitiationRate` func in the `rbs_calculator` package
	TranslationInitiationRate float64
}

RibosomeBindingSite is a struct to represent a ribosome binding site.

func (*RibosomeBindingSite) ComputeProperties

func (rbs *RibosomeBindingSite) ComputeProperties(properties []RBSPropertyFunc)

ComputeProperties computes the properties specified by the `properties` argument and adds the computed property value to the `Properties` field map of the `rbs` struct

func (*RibosomeBindingSite) PropertyValue

func (rbs *RibosomeBindingSite) PropertyValue(property RBSPropertyFunc) interface{}

PropertyValue returns the value of the property `property`

func (*RibosomeBindingSite) PropertyValues

func (rbs *RibosomeBindingSite) PropertyValues(propertyNames []string) (ret []interface{})

PropertyValues returns the values of the properties specified by `propertyNames`

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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