| Safe Haskell | Safe-Inferred |
|---|---|
| Language | Haskell2010 |
Poseidon.GenotypeData
Synopsis
- data GenoDataSource
- = PacBaseDir { }
- | GenoDirect { }
- data GenotypeDataSpec = GenotypeDataSpec {}
- data GenotypeFileSpec
- = GenotypeEigenstrat { }
- | GenotypePlink { }
- | GenotypeVCF { }
- data GenotypeOutFormatSpec
- data SNPSetSpec
- snpSetMergeList :: [SNPSetSpec] -> Bool -> SNPSetSpec
- snpSetMerge :: SNPSetSpec -> SNPSetSpec -> Bool -> SNPSetSpec
- reduceGenotypeFilepaths :: MonadThrow m => GenotypeDataSpec -> m (FilePath, GenotypeDataSpec)
- loadIndividuals :: FilePath -> GenotypeDataSpec -> PoseidonIO [EigenstratIndEntry]
- findGroupNamesInVCFheader :: [ByteString] -> Maybe [ByteString]
- findGeneticSexInVCFheader :: [ByteString] -> Maybe (Either String [Sex])
- loadGenotypeData :: MonadSafe m => FilePath -> GenotypeDataSpec -> m (Producer (EigenstratSnpEntry, GenoLine) m ())
- vcf2eigenstratPipe :: MonadThrow 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)
- writeVCF :: MonadSafe m => LogA -> [JannoRow] -> FilePath -> Consumer (EigenstratSnpEntry, GenoLine) m ()
- createVCFentry :: MonadIO m => LogA -> [JannoRow] -> (EigenstratSnpEntry, GenoLine) -> m VCFentry
Documentation
data GenoDataSource Source #
Constructors
| PacBaseDir | |
Fields | |
| GenoDirect | |
Fields | |
Instances
| Show GenoDataSource Source # | |
Defined in Poseidon.GenotypeData Methods showsPrec :: Int -> GenoDataSource -> ShowS # show :: GenoDataSource -> String # showList :: [GenoDataSource] -> ShowS # | |
data GenotypeDataSpec Source #
Constructors
| GenotypeDataSpec | |
Fields | |
Instances
| FromJSON GenotypeDataSpec Source # | To facilitate automatic parsing of GenotypeDataSpec from JSON files |
Defined in Poseidon.GenotypeData Methods parseJSON :: Value -> Parser GenotypeDataSpec parseJSONList :: Value -> Parser [GenotypeDataSpec] | |
| ToJSON GenotypeDataSpec Source # | |
Defined in Poseidon.GenotypeData Methods toJSON :: GenotypeDataSpec -> Value toEncoding :: GenotypeDataSpec -> Encoding toJSONList :: [GenotypeDataSpec] -> Value toEncodingList :: [GenotypeDataSpec] -> Encoding | |
| Show GenotypeDataSpec Source # | |
Defined in Poseidon.GenotypeData Methods showsPrec :: Int -> GenotypeDataSpec -> ShowS # show :: GenotypeDataSpec -> String # showList :: [GenotypeDataSpec] -> ShowS # | |
| Eq GenotypeDataSpec Source # | |
Defined in Poseidon.GenotypeData Methods (==) :: GenotypeDataSpec -> GenotypeDataSpec -> Bool # (/=) :: GenotypeDataSpec -> GenotypeDataSpec -> Bool # | |
data GenotypeFileSpec Source #
Constructors
| GenotypeEigenstrat | |
Fields | |
| GenotypePlink | |
Fields | |
| GenotypeVCF | |
Fields | |
Instances
| Show GenotypeFileSpec Source # | |
Defined in Poseidon.GenotypeData Methods showsPrec :: Int -> GenotypeFileSpec -> ShowS # show :: GenotypeFileSpec -> String # showList :: [GenotypeFileSpec] -> ShowS # | |
| Eq GenotypeFileSpec Source # | |
Defined in Poseidon.GenotypeData Methods (==) :: GenotypeFileSpec -> GenotypeFileSpec -> Bool # (/=) :: GenotypeFileSpec -> GenotypeFileSpec -> Bool # | |
data GenotypeOutFormatSpec Source #
Instances
| Read GenotypeOutFormatSpec Source # | |
Defined in Poseidon.GenotypeData Methods readsPrec :: Int -> ReadS GenotypeOutFormatSpec # readList :: ReadS [GenotypeOutFormatSpec] # | |
| Show GenotypeOutFormatSpec Source # | |
Defined in Poseidon.GenotypeData Methods showsPrec :: Int -> GenotypeOutFormatSpec -> ShowS # show :: GenotypeOutFormatSpec -> String # showList :: [GenotypeOutFormatSpec] -> ShowS # | |
data SNPSetSpec Source #
Constructors
| SNPSet1240K | |
| SNPSetHumanOrigins | |
| SNPSetOther |
Instances
| FromJSON SNPSetSpec Source # | |
Defined in Poseidon.GenotypeData | |
| ToJSON SNPSetSpec Source # | |
Defined in Poseidon.GenotypeData Methods toJSON :: SNPSetSpec -> Value toEncoding :: SNPSetSpec -> Encoding toJSONList :: [SNPSetSpec] -> Value toEncodingList :: [SNPSetSpec] -> Encoding | |
| Show SNPSetSpec Source # | |
Defined in Poseidon.GenotypeData Methods showsPrec :: Int -> SNPSetSpec -> ShowS # show :: SNPSetSpec -> String # showList :: [SNPSetSpec] -> ShowS # | |
| Eq SNPSetSpec Source # | |
Defined in Poseidon.GenotypeData | |
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
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.
findGroupNamesInVCFheader :: [ByteString] -> Maybe [ByteString] Source #
findGeneticSexInVCFheader :: [ByteString] -> Maybe (Either String [Sex]) 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 :: MonadThrow 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 #