Safe Haskell | Safe-Inferred |
---|---|
Language | Haskell2010 |
Synopsis
- data GenoDataSource
- = PacBaseDir { }
- | GenoDirect { }
- data GenotypeDataSpec = GenotypeDataSpec {}
- data GenotypeFileSpec
- = GenotypeEigenstrat { }
- | GenotypePlink { }
- | GenotypeVCF { }
- data SNPSetSpec
- snpSetMergeList :: [SNPSetSpec] -> Bool -> SNPSetSpec
- snpSetMerge :: SNPSetSpec -> SNPSetSpec -> Bool -> SNPSetSpec
- reduceGenotypeFilepaths :: MonadThrow m => GenotypeDataSpec -> m (FilePath, GenotypeDataSpec)
- loadIndividuals :: FilePath -> GenotypeDataSpec -> PoseidonIO [EigenstratIndEntry]
- loadGenotypeData :: MonadSafe m => FilePath -> GenotypeDataSpec -> m (Producer (EigenstratSnpEntry, GenoLine) m ())
- vcf2eigenstratPipe :: MonadIO m => Pipe VCFentry (EigenstratSnpEntry, GenoLine) m r
- joinEntries :: MonadIO m => LogA -> [Int] -> [String] -> [Maybe (EigenstratSnpEntry, GenoLine)] -> m (EigenstratSnpEntry, GenoLine)
- getConsensusSnpEntry :: MonadIO m => LogA -> [EigenstratSnpEntry] -> m EigenstratSnpEntry
- recodeAlleles :: EigenstratSnpEntry -> EigenstratSnpEntry -> GenoLine -> Either String GenoLine
- printSNPCopyProgress :: MonadIO m => LogA -> UTCTime -> Pipe a a m ()
- selectIndices :: [Int] -> (EigenstratSnpEntry, GenoLine) -> (EigenstratSnpEntry, GenoLine)
Documentation
data GenoDataSource Source #
Instances
Show GenoDataSource Source # | |
Defined in Poseidon.GenotypeData showsPrec :: Int -> GenoDataSource -> ShowS # show :: GenoDataSource -> String # showList :: [GenoDataSource] -> ShowS # |
data GenotypeDataSpec Source #
Instances
FromJSON GenotypeDataSpec Source # | To facilitate automatic parsing of GenotypeDataSpec from JSON files |
Defined in Poseidon.GenotypeData parseJSON :: Value -> Parser GenotypeDataSpec parseJSONList :: Value -> Parser [GenotypeDataSpec] | |
ToJSON GenotypeDataSpec Source # | |
Defined in Poseidon.GenotypeData toJSON :: GenotypeDataSpec -> Value toEncoding :: GenotypeDataSpec -> Encoding toJSONList :: [GenotypeDataSpec] -> Value toEncodingList :: [GenotypeDataSpec] -> Encoding | |
Show GenotypeDataSpec Source # | |
Defined in Poseidon.GenotypeData showsPrec :: Int -> GenotypeDataSpec -> ShowS # show :: GenotypeDataSpec -> String # showList :: [GenotypeDataSpec] -> ShowS # | |
Eq GenotypeDataSpec Source # | |
Defined in Poseidon.GenotypeData (==) :: GenotypeDataSpec -> GenotypeDataSpec -> Bool # (/=) :: GenotypeDataSpec -> GenotypeDataSpec -> Bool # |
data GenotypeFileSpec Source #
Instances
Show GenotypeFileSpec Source # | |
Defined in Poseidon.GenotypeData showsPrec :: Int -> GenotypeFileSpec -> ShowS # show :: GenotypeFileSpec -> String # showList :: [GenotypeFileSpec] -> ShowS # | |
Eq GenotypeFileSpec Source # | |
Defined in Poseidon.GenotypeData (==) :: GenotypeFileSpec -> GenotypeFileSpec -> Bool # (/=) :: GenotypeFileSpec -> GenotypeFileSpec -> Bool # |
data SNPSetSpec Source #
Instances
FromJSON SNPSetSpec Source # | |
Defined in Poseidon.GenotypeData parseJSON :: Value -> Parser SNPSetSpec parseJSONList :: Value -> Parser [SNPSetSpec] | |
ToJSON SNPSetSpec Source # | |
Defined in Poseidon.GenotypeData toJSON :: SNPSetSpec -> Value toEncoding :: SNPSetSpec -> Encoding toJSONList :: [SNPSetSpec] -> Value toEncodingList :: [SNPSetSpec] -> Encoding | |
Show SNPSetSpec Source # | |
Defined in Poseidon.GenotypeData showsPrec :: Int -> SNPSetSpec -> ShowS # show :: SNPSetSpec -> String # showList :: [SNPSetSpec] -> ShowS # | |
Eq SNPSetSpec Source # | |
Defined in Poseidon.GenotypeData (==) :: SNPSetSpec -> SNPSetSpec -> Bool # (/=) :: SNPSetSpec -> SNPSetSpec -> Bool # |
snpSetMergeList :: [SNPSetSpec] -> Bool -> SNPSetSpec Source #
snpSetMerge :: SNPSetSpec -> SNPSetSpec -> Bool -> SNPSetSpec Source #
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
:: 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.
:: 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 #
selectIndices :: [Int] -> (EigenstratSnpEntry, GenoLine) -> (EigenstratSnpEntry, GenoLine) Source #