Version: v0.0.0-...-5130504 Latest Latest

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

Go to latest
Published: Jun 3, 2017 License: Apache-2.0 Imports: 6 Imported by: 0



Package parse provides some helpers to read tabular gene expression values.



This section is empty.


This section is empty.


func Lines

func Lines(in io.Reader, maxLineWidth int,
	cb func(lineno int, line string) error) error

Lines is a simple helper function that wraps some boilerplate around bufio.Scanner. It calls cb for each line read from in.

func Parse

func Parse(in io.Reader, maxLineWidth int) (
	genes []string, controls, experiments *mat64.Dense, err error)

Parse reads in gene expression values and returns the list of genes read in, and matrices representing the control and experiment values. The input data is expected to be of the form

gene-name-header control-1 control-2 control-3 experiment-1 experiment-2
gene-name 1.0 2.0 3.0 1.0 2.0
gene-name-2 1.0 -2.0 -3.0 2.5 1.0

All fields are separated by whitespace. The header should match:

<gene-name-header> <control-name>+ <experiment-name>+

where the control names have the string "control" in theme. The header line should be followed by one or more gene value lines, which start with a unique gene name, followed by a white-space separated list of floating point values, one per each control and experiment.


This section is empty.

Jump to

Keyboard shortcuts

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