poseidon-hs-1.6.0.0: A package with tools for working with Poseidon genotype data
Safe HaskellSafe-Inferred
LanguageHaskell2010

Poseidon.GenotypeData

Synopsis

Documentation

data GenotypeDataSpec Source #

Instances

Instances details
FromJSON GenotypeDataSpec Source #

To facilitate automatic parsing of GenotypeDataSpec from JSON files

Instance details

Defined in Poseidon.GenotypeData

Methods

parseJSON :: Value -> Parser GenotypeDataSpec

parseJSONList :: Value -> Parser [GenotypeDataSpec]

ToJSON GenotypeDataSpec Source # 
Instance details

Defined in Poseidon.GenotypeData

Show GenotypeDataSpec Source # 
Instance details

Defined in Poseidon.GenotypeData

Eq GenotypeDataSpec Source # 
Instance details

Defined in Poseidon.GenotypeData

data SNPSetSpec Source #

Instances

Instances details
FromJSON SNPSetSpec Source # 
Instance details

Defined in Poseidon.GenotypeData

Methods

parseJSON :: Value -> Parser SNPSetSpec

parseJSONList :: Value -> Parser [SNPSetSpec]

ToJSON SNPSetSpec Source # 
Instance details

Defined in Poseidon.GenotypeData

Methods

toJSON :: SNPSetSpec -> Value

toEncoding :: SNPSetSpec -> Encoding

toJSONList :: [SNPSetSpec] -> Value

toEncodingList :: [SNPSetSpec] -> Encoding

Show SNPSetSpec Source # 
Instance details

Defined in Poseidon.GenotypeData

Eq SNPSetSpec Source # 
Instance details

Defined in Poseidon.GenotypeData

reduceGenotypeFilepaths :: MonadThrow m => GenotypeDataSpec -> m (FilePath, GenotypeDataSpec) Source #

removes directories of all filenames and returns a tuple of the basename and a modified GenotypeDataSpec with pure filenames In case basedirectories do not match, this function will throw an exception

loadIndividuals Source #

Arguments

:: FilePath

the base directory

-> GenotypeDataSpec

the Genotype spec

-> PoseidonIO [EigenstratIndEntry]

the returned list of EigenstratIndEntries.

A function to return a list of all individuals in the genotype files of a package.

loadGenotypeData Source #

Arguments

:: MonadSafe m 
=> FilePath

the base path

-> GenotypeDataSpec

the genotype spec

-> m (Producer (EigenstratSnpEntry, GenoLine) m ())

a Producer over the Snp position values and the genotype line.

A function to read the genotype data of a package

vcf2eigenstratPipe :: MonadIO m => Pipe VCFentry (EigenstratSnpEntry, GenoLine) m r Source #

joinEntries :: MonadIO m => LogA -> [Int] -> [String] -> [Maybe (EigenstratSnpEntry, GenoLine)] -> m (EigenstratSnpEntry, GenoLine) Source #

getConsensusSnpEntry :: MonadIO m => LogA -> [EigenstratSnpEntry] -> m EigenstratSnpEntry Source #

recodeAlleles :: EigenstratSnpEntry -> EigenstratSnpEntry -> GenoLine -> Either String GenoLine Source #

printSNPCopyProgress :: MonadIO m => LogA -> UTCTime -> Pipe a a m () Source #

selectIndices :: [Int] -> (EigenstratSnpEntry, GenoLine) -> (EigenstratSnpEntry, GenoLine) Source #