parser

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: 20 Imported by: 1

Documentation

Overview

Package parser provides methods for reading file formats, in particular focused toward dna sequence parsing

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func AssemblyFromCsv

func AssemblyFromCsv(designfile string, partsfile string) (assemblyparameters []enzymes.Assemblyparameters, err error)

func Build_rebase

func Build_rebase(name string, prototype string, recognitionseq string, methylationsite string, commercialsource string, refs string) (Record wtype.RestrictionEnzyme)

func Handlesnapgenelines

func Handlesnapgenelines(lines []string) (dnaseq string)

func MakePartsFromXLSXPartsList

func MakePartsFromXLSXPartsList(data []byte) (parts []*wtype.Liquid, concMap map[string]wunit.Concentration, err error)

MakePartsFromXLSXPartsList parses the parts in an xlsx format design file into a list of LHComponents. The concentration will be set if a concentration column is present in the parts list. If no concentrations are found the parts list will be created with no concentrations and an error returned.

func Parse

func Parse(filename string) (parts_list []string, err error)

func ParseExcel

func ParseExcel(filename string) ([]enzymes.Assemblyparameters, error)

func ParseExcelBinary

func ParseExcelBinary(data []byte) ([]enzymes.Assemblyparameters, error)

ParseExcelBinary parses the contents of a typeIIs assembly design file in xlsx format. An example file is provided: "Assembly_Input_Controls.xlsx" The output will be []enzymes.AssemblyParameters which can be used in the enzymes.Assemblysimulator() and enzymes.Digestionsimulator() functions. The design file is expected to follow a format as shown in the provided example files An error will be returned if no data is found within the .xlsx design file or if the file is not in the expected format.

func ParseGDX

func ParseGDX(file wtype.File) ([]enzymes.Assemblyparameters, error)

ParsesGDX parses a typeIIs assembly design file in gdx format. An example file is provided: "Assembly_Input_Controls.gdx" The output will be []enzymes.AssemblyParameters which can be used in the enzymes.Assemblysimulator() and enzymes.Digestionsimulator() functions. The design file is expected to follow a format as shown in the provided example files An error will be returned if no data is found within the .gdx design file or if the file is not in the expected format.

func ParseGDXBinary

func ParseGDXBinary(data []byte) ([]enzymes.Assemblyparameters, error)

ParseGDXBinary parses the contents of a typeIIs assembly design file in gdx format. An example file is provided: "Assembly_Input_Controls.gdx" The output will be []enzymes.AssemblyParameters which can be used in the enzymes.Assemblysimulator() and enzymes.Digestionsimulator() functions. The design file is expected to follow a format as shown in the provided example files An error will be returned if no data is found within the .gdx design file or if the file is not in the expected format.

func ParsePCRExcel

func ParsePCRExcel(designfile wtype.File) ([]pcr.Reaction, error)

ParsePCRExc3el takes in a pcr design file (.xlsx or .csv) and converts this into an array of type PCRReactions.

func ParseToAssemblyParameters

func ParseToAssemblyParameters(filename string) ([]enzymes.Assemblyparameters, error)

func ReadDesign

func ReadDesign(filename string) [][]string

func ReadParts

func ReadParts(filename string) map[string]wtype.DNASequence

func RebaseParse

func RebaseParse(rebaseRh io.Reader) []wtype.RestrictionEnzyme

func RecognitionSeqHandler

func RecognitionSeqHandler(RecognitionSeq string) (RecognitionSequence string, EndLength int, Topstrand3primedistancefromend int, Bottomstrand5primedistancefromend int, Class string)

func SnapGenetoSimpleSeq

func SnapGenetoSimpleSeq(filename string) (string, error)

func Xlsxparser

func Xlsxparser(filename string, sheetIndex int, outputprefix string) (f *os.File, err error)

Types

type AAElement

type AAElement struct {
	Label    string `xml:"label,attr"`
	Sequence string `xml:"sequence"`
	Notes    string `xml:"notes"`
}

type DNAElement

type DNAElement struct {
	Label    string `xml:"label,attr"`
	Sequence string `xml:"sequence"`
	Notes    string `xml:"notes"`
}

type DesignConstruct

type DesignConstruct struct {
	Label       string       `xml:"label,attr"`
	Plasmid     string       `xml:"circular,attr"`
	Rev         string       `xml:"reverseComplement,attr"`
	Notes       string       `xml:"notes"`
	DNAElements []DNAElement `xml:"DNAElement"`
	AAElements  []AAElement  `xml:"AAElement"`
}

type Project

type Project struct {
	DesignConstruct []DesignConstruct `xml:"DesignConstruct"`
}

type TypeIIs

type TypeIIs struct {
	wtype.RestrictionEnzyme
	Name                              string
	Isoschizomers                     []string
	Topstrand3primedistancefromend    int
	Bottomstrand5primedistancefromend int
}

Jump to

Keyboard shortcuts

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