Safe Haskell | Safe-Inferred |
---|---|
Language | Haskell2010 |
Synopsis
- data PoseidonYamlStruct = PoseidonYamlStruct {
- _posYamlPoseidonVersion :: Version
- _posYamlTitle :: String
- _posYamlDescription :: Maybe String
- _posYamlContributor :: [ContributorSpec]
- _posYamlPackageVersion :: Maybe Version
- _posYamlLastModified :: Maybe Day
- _posYamlGenotypeData :: GenotypeDataSpec
- _posYamlJannoFile :: Maybe FilePath
- _posYamlJannoFileChkSum :: Maybe String
- _posYamlSeqSourceFile :: Maybe FilePath
- _posYamlSeqSourceFileChkSum :: Maybe String
- _posYamlBibFile :: Maybe FilePath
- _posYamlBibFileChkSum :: Maybe String
- _posYamlReadmeFile :: Maybe FilePath
- _posYamlChangelogFile :: Maybe FilePath
- data PoseidonPackage = PoseidonPackage {
- posPacBaseDir :: FilePath
- posPacPoseidonVersion :: Version
- posPacNameAndVersion :: PacNameAndVersion
- posPacDescription :: Maybe String
- posPacContributor :: [ContributorSpec]
- posPacLastModified :: Maybe Day
- posPacGenotypeData :: GenotypeDataSpec
- posPacJannoFile :: Maybe FilePath
- posPacJanno :: JannoRows
- posPacJannoFileChkSum :: Maybe String
- posPacSeqSourceFile :: Maybe FilePath
- posPacSeqSource :: SeqSourceRows
- posPacSeqSourceFileChkSum :: Maybe String
- posPacBibFile :: Maybe FilePath
- posPacBib :: BibTeX
- posPacBibFileChkSum :: Maybe String
- posPacReadmeFile :: Maybe FilePath
- posPacChangelogFile :: Maybe FilePath
- data PoseidonException
- = PoseidonYamlParseException FilePath ParseException
- | PoseidonPackageException String
- | PoseidonPackageVersionException FilePath String
- | PoseidonPackageMissingVersionException FilePath
- | PoseidonIndSearchException String
- | PoseidonGenotypeException String
- | PoseidonGenotypeExceptionForward ErrorLength SomeException
- | PoseidonHttpExceptionForward HttpException
- | PoseidonFileRowException FilePath String String
- | PoseidonFileConsistencyException FilePath String
- | PoseidonCrossFileConsistencyException String String
- | PoseidonCollectionException String
- | PoseidonFileExistenceException FilePath
- | PoseidonFileChecksumException FilePath
- | PoseidonFStatsFormatException String
- | PoseidonBibTeXException FilePath String
- | PoseidonPoseidonEntityParsingException ParseError
- | PoseidonForgeEntitiesException String
- | PoseidonEmptyForgeException
- | PoseidonNewPackageConstructionException String
- | PoseidonRemoteJSONParsingException String
- | PoseidonGenericException String
- | PoseidonEmptyOutPacNameException
- | PoseidonUnequalBaseDirException FilePath FilePath FilePath
- | PoseidonServerCommunicationException String
- | PoseidonUnzipException SomeException
- | PoseidonChronicleException String
- | PoseidonGitException FilePath String
- | PoseidonCantPreserveException
- data PackageReadOptions = PackageReadOptions {}
- findAllPoseidonYmlFiles :: FilePath -> IO [FilePath]
- readPoseidonPackageCollection :: PackageReadOptions -> [FilePath] -> PoseidonIO [PoseidonPackage]
- readPoseidonPackageCollectionWithSkipIndicator :: PackageReadOptions -> [FilePath] -> PoseidonIO ([PoseidonPackage], Bool)
- getJointGenotypeData :: MonadSafe m => LogA -> Bool -> [PoseidonPackage] -> Maybe FilePath -> m (Producer (EigenstratSnpEntry, GenoLine) m ())
- getJointJanno :: [PoseidonPackage] -> JannoRows
- getJointIndividualInfo :: MonadThrow m => [PoseidonPackage] -> m IndividualInfoCollection
- getExtendedIndividualInfo :: MonadThrow m => [PoseidonPackage] -> AddJannoColSpec -> m [ExtendedIndividualInfo]
- newMinimalPackageTemplate :: MonadThrow m => FilePath -> String -> GenotypeDataSpec -> m PoseidonPackage
- newPackageTemplate :: FilePath -> String -> GenotypeDataSpec -> Maybe (Either [EigenstratIndEntry] JannoRows) -> SeqSourceRows -> BibTeX -> PoseidonIO PoseidonPackage
- renderMismatch :: [String] -> [String] -> String
- zipWithPadding :: a -> b -> [a] -> [b] -> [(a, b)]
- writePoseidonPackage :: PoseidonPackage -> IO ()
- defaultPackageReadOptions :: PackageReadOptions
- readPoseidonPackage :: PackageReadOptions -> FilePath -> PoseidonIO PoseidonPackage
- makePseudoPackageFromGenotypeData :: GenotypeDataSpec -> PoseidonIO PoseidonPackage
- getJannoRowsFromPac :: PoseidonPackage -> [JannoRow]
- packagesToPackageInfos :: MonadThrow m => [PoseidonPackage] -> m [PackageInfo]
- getAllGroupInfo :: MonadThrow m => [PoseidonPackage] -> m [GroupInfo]
- validateGeno :: PoseidonPackage -> Bool -> PoseidonIO ()
- filterToRelevantPackages :: MonadThrow m => EntitySpec a => [a] -> [PoseidonPackage] -> m [PoseidonPackage]
Documentation
data PoseidonYamlStruct Source #
Internal structure for YAML loading only
Instances
data PoseidonPackage Source #
A data type to represent a Poseidon Package
PoseidonPackage | |
|
Instances
data PoseidonException Source #
A Poseidon Exception data type with several concrete constructors
PoseidonYamlParseException FilePath ParseException | An exception to represent YAML parsing errors |
PoseidonPackageException String | An exception to represent a logical error in a package |
PoseidonPackageVersionException FilePath String | An exception to represent an issue with a package version |
PoseidonPackageMissingVersionException FilePath | An exception to indicate a missing poseidonVersion field |
PoseidonIndSearchException String | An exception to represent an error when searching for individuals or populations |
PoseidonGenotypeException String | An exception to represent errors in the genotype data |
PoseidonGenotypeExceptionForward ErrorLength SomeException | An exception to represent errors in the genotype data forwarded from the sequence-formats library |
PoseidonHttpExceptionForward HttpException | An exception to represent errors in the remote data loading forwarded from simpleHttp |
PoseidonFileRowException FilePath String String | An exception to represent errors when trying to parse the janno or seqSource file |
PoseidonFileConsistencyException FilePath String | An exception to represent consistency errors in janno or seqSource files |
PoseidonCrossFileConsistencyException String String | An exception to represent inconsistencies across multiple files in a package |
PoseidonCollectionException String | An exception to represent logical issues in a poseidon package Collection |
PoseidonFileExistenceException FilePath | An exception to represent missing files |
PoseidonFileChecksumException FilePath | An exception to represent failed checksum tests |
PoseidonFStatsFormatException String | An exception type to represent FStat specification errors |
PoseidonBibTeXException FilePath String | An exception to represent errors when trying to parse the .bib file |
PoseidonPoseidonEntityParsingException ParseError | An exception to indicate failed entity parsing |
PoseidonForgeEntitiesException String | An exception to indicate issues in the forge selection |
PoseidonEmptyForgeException | An exception to throw if there is nothing to be forged |
PoseidonNewPackageConstructionException String | An exception to indicate an issue in newPackageTemplate |
PoseidonRemoteJSONParsingException String | An exception to indicate failed remote info JSON parsing |
PoseidonGenericException String | A catch-all for any other type of exception |
PoseidonEmptyOutPacNameException | An exception to throw if the output package lacks a name |
PoseidonUnequalBaseDirException FilePath FilePath FilePath | An exception to throw if genotype data files don't share a common base directory |
PoseidonServerCommunicationException String | An exception to mark server communication errors |
PoseidonUnzipException SomeException | An exception for unzipping issues in fetch |
PoseidonChronicleException String | An exception for issues in chronicle |
PoseidonGitException FilePath String | An exception for issues with git |
PoseidonCantPreserveException | An exception for issues with --preservePyml |
Instances
Exception PoseidonException Source # | |
Defined in Poseidon.Utils | |
Show PoseidonException Source # | |
Defined in Poseidon.Utils showsPrec :: Int -> PoseidonException -> ShowS # show :: PoseidonException -> String # showList :: [PoseidonException] -> ShowS # |
data PackageReadOptions Source #
PackageReadOptions | |
|
readPoseidonPackageCollection Source #
:: PackageReadOptions | |
-> [FilePath] | A list of base directories where to search in |
-> PoseidonIO [PoseidonPackage] | A list of returned poseidon packages |
readPoseidonPackageCollectionWithSkipIndicator Source #
:: PackageReadOptions | |
-> [FilePath] | A list of base directories where to search in |
-> PoseidonIO ([PoseidonPackage], Bool) | A list of returned poseidon packages and a flag for whether packages were skipped |
a utility function to load all poseidon packages found recursively in multiple base directories. This also takes care of smart filtering and duplication checks. Exceptions lead to skipping packages and outputting warnings. A flag is returned for whether packages were skipped (needed for validate)
:: MonadSafe m | |
=> LogA | how messages should be logged |
-> Bool | whether to generate an intersection instead of union of input sites |
-> [PoseidonPackage] | A list of poseidon packages. |
-> Maybe FilePath | a genotype file to select SNPs from |
-> m (Producer (EigenstratSnpEntry, GenoLine) m ()) | a pair of the EigenstratIndEntries and a Producer over the Snp position values and the genotype line, joined across all packages. |
A function to read genotype data jointly from multiple packages
getJointJanno :: [PoseidonPackage] -> JannoRows Source #
getJointIndividualInfo :: MonadThrow m => [PoseidonPackage] -> m IndividualInfoCollection Source #
getExtendedIndividualInfo :: MonadThrow m => [PoseidonPackage] -> AddJannoColSpec -> m [ExtendedIndividualInfo] Source #
newMinimalPackageTemplate :: MonadThrow m => FilePath -> String -> GenotypeDataSpec -> m PoseidonPackage Source #
A function to create a minimal POSEIDON package
newPackageTemplate :: FilePath -> String -> GenotypeDataSpec -> Maybe (Either [EigenstratIndEntry] JannoRows) -> SeqSourceRows -> BibTeX -> PoseidonIO PoseidonPackage Source #
A function to create a more complete POSEIDON package This will take only the filenames of the provided files, so it assumes that the files will be copied into the directory into which the YAML file will be written
zipWithPadding :: a -> b -> [a] -> [b] -> [(a, b)] Source #
writePoseidonPackage :: PoseidonPackage -> IO () Source #
:: PackageReadOptions | |
-> FilePath | the file path to the yaml file |
-> PoseidonIO PoseidonPackage | the returning package returned in the IO monad. |
A function to read in a poseidon package from a YAML file. Note that this function calls the addFullPaths function to make paths absolute.
packagesToPackageInfos :: MonadThrow m => [PoseidonPackage] -> m [PackageInfo] Source #
getAllGroupInfo :: MonadThrow m => [PoseidonPackage] -> m [GroupInfo] Source #
validateGeno :: PoseidonPackage -> Bool -> PoseidonIO () Source #
filterToRelevantPackages :: MonadThrow m => EntitySpec a => [a] -> [PoseidonPackage] -> m [PoseidonPackage] Source #
Filter packages such that only packages with individuals covered by the given EntitySpec are returned