sequence-formats-1.5.1.3: A package with basic parsing utilities for several Bioinformatic data formats.

Safe HaskellNone
LanguageHaskell2010

SequenceFormats.Plink

Synopsis

Documentation

readBimStdIn :: (MonadThrow m, MonadIO m) => Producer EigenstratSnpEntry m () Source #

Function to read a Bim File from StdIn. Returns a Pipes-Producer over the EigenstratSnpEntries.

readBimFile :: MonadSafe m => FilePath -> Producer EigenstratSnpEntry m () Source #

Function to read a Bim File from a file. Returns a Pipes-Producer over the EigenstratSnpEntries.

writeBim Source #

Arguments

:: MonadIO m 
=> Handle

The Eigenstrat Snp File handle.

-> Consumer EigenstratSnpEntry m ()

A consumer to read EigenstratSnpEntries

Function to write a Bim file. Returns a consumer expecting EigenstratSnpEntries.

readFamFile :: MonadIO m => FilePath -> m [EigenstratIndEntry] Source #

Function to read a Plink fam file. Returns the Eigenstrat Individual Entries as list.

readPlinkBedFile :: MonadSafe m => FilePath -> Int -> m (Producer GenoLine m ()) Source #

A function to read a bed file from a file. Returns a Producer over all lines.

readPlink Source #

Arguments

:: MonadSafe m 
=> FilePath

The Bed file

-> FilePath

The Bim File

-> FilePath

The Fam file

-> m ([EigenstratIndEntry], Producer (EigenstratSnpEntry, GenoLine) m ()) 

Function to read a full Plink dataset from files. Returns a pair of the Plink Individual Entries, and a joint Producer over the snp entries and the genotypes.