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

Poseidon.Package

Synopsis

Documentation

data PoseidonYamlStruct Source #

Internal structure for YAML loading only

Instances

Instances details
FromJSON PoseidonYamlStruct Source # 
Instance details

Defined in Poseidon.Package

Methods

parseJSON :: Value -> Parser PoseidonYamlStruct

parseJSONList :: Value -> Parser [PoseidonYamlStruct]

ToJSON PoseidonYamlStruct Source # 
Instance details

Defined in Poseidon.Package

Generic PoseidonYamlStruct Source # 
Instance details

Defined in Poseidon.Package

Associated Types

type Rep PoseidonYamlStruct :: Type -> Type #

Show PoseidonYamlStruct Source # 
Instance details

Defined in Poseidon.Package

Eq PoseidonYamlStruct Source # 
Instance details

Defined in Poseidon.Package

HasNameAndVersion PoseidonYamlStruct Source # 
Instance details

Defined in Poseidon.Package

type Rep PoseidonYamlStruct Source # 
Instance details

Defined in Poseidon.Package

type Rep PoseidonYamlStruct = D1 ('MetaData "PoseidonYamlStruct" "Poseidon.Package" "poseidon-hs-1.5.5.0-64IxIR1JUiELWCZhD8ICmR" 'False) (C1 ('MetaCons "PoseidonYamlStruct" 'PrefixI 'True) (((S1 ('MetaSel ('Just "_posYamlPoseidonVersion") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 Version) :*: (S1 ('MetaSel ('Just "_posYamlTitle") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 String) :*: S1 ('MetaSel ('Just "_posYamlDescription") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (Maybe String)))) :*: ((S1 ('MetaSel ('Just "_posYamlContributor") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 [ContributorSpec]) :*: S1 ('MetaSel ('Just "_posYamlPackageVersion") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (Maybe Version))) :*: (S1 ('MetaSel ('Just "_posYamlLastModified") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (Maybe Day)) :*: S1 ('MetaSel ('Just "_posYamlGenotypeData") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 GenotypeDataSpec)))) :*: (((S1 ('MetaSel ('Just "_posYamlJannoFile") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (Maybe FilePath)) :*: S1 ('MetaSel ('Just "_posYamlJannoFileChkSum") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (Maybe String))) :*: (S1 ('MetaSel ('Just "_posYamlSeqSourceFile") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (Maybe FilePath)) :*: S1 ('MetaSel ('Just "_posYamlSeqSourceFileChkSum") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (Maybe String)))) :*: ((S1 ('MetaSel ('Just "_posYamlBibFile") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (Maybe FilePath)) :*: S1 ('MetaSel ('Just "_posYamlBibFileChkSum") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (Maybe String))) :*: (S1 ('MetaSel ('Just "_posYamlReadmeFile") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (Maybe FilePath)) :*: S1 ('MetaSel ('Just "_posYamlChangelogFile") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (Maybe FilePath)))))))

data PoseidonPackage Source #

A data type to represent a Poseidon Package

Constructors

PoseidonPackage 

Fields

Instances

Instances details
Generic PoseidonPackage Source # 
Instance details

Defined in Poseidon.Package

Associated Types

type Rep PoseidonPackage :: Type -> Type #

Show PoseidonPackage Source # 
Instance details

Defined in Poseidon.Package

Eq PoseidonPackage Source # 
Instance details

Defined in Poseidon.Package

Ord PoseidonPackage Source # 
Instance details

Defined in Poseidon.Package

HasNameAndVersion PoseidonPackage Source # 
Instance details

Defined in Poseidon.Package

type Rep PoseidonPackage Source # 
Instance details

Defined in Poseidon.Package

type Rep PoseidonPackage = D1 ('MetaData "PoseidonPackage" "Poseidon.Package" "poseidon-hs-1.5.5.0-64IxIR1JUiELWCZhD8ICmR" 'False) (C1 ('MetaCons "PoseidonPackage" 'PrefixI 'True) ((((S1 ('MetaSel ('Just "posPacBaseDir") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 FilePath) :*: S1 ('MetaSel ('Just "posPacPoseidonVersion") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 Version)) :*: (S1 ('MetaSel ('Just "posPacNameAndVersion") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 PacNameAndVersion) :*: S1 ('MetaSel ('Just "posPacDescription") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (Maybe String)))) :*: ((S1 ('MetaSel ('Just "posPacContributor") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 [ContributorSpec]) :*: S1 ('MetaSel ('Just "posPacLastModified") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (Maybe Day))) :*: (S1 ('MetaSel ('Just "posPacGenotypeData") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 GenotypeDataSpec) :*: (S1 ('MetaSel ('Just "posPacJannoFile") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (Maybe FilePath)) :*: S1 ('MetaSel ('Just "posPacJanno") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 JannoRows))))) :*: (((S1 ('MetaSel ('Just "posPacJannoFileChkSum") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (Maybe String)) :*: S1 ('MetaSel ('Just "posPacSeqSourceFile") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (Maybe FilePath))) :*: (S1 ('MetaSel ('Just "posPacSeqSource") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 SeqSourceRows) :*: S1 ('MetaSel ('Just "posPacSeqSourceFileChkSum") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (Maybe String)))) :*: ((S1 ('MetaSel ('Just "posPacBibFile") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (Maybe FilePath)) :*: S1 ('MetaSel ('Just "posPacBib") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 BibTeX)) :*: (S1 ('MetaSel ('Just "posPacBibFileChkSum") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (Maybe String)) :*: (S1 ('MetaSel ('Just "posPacReadmeFile") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (Maybe FilePath)) :*: S1 ('MetaSel ('Just "posPacChangelogFile") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (Maybe FilePath))))))))

data PoseidonException Source #

A Poseidon Exception data type with several concrete constructors

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

data PackageReadOptions Source #

Constructors

PackageReadOptions 

Fields

readPoseidonPackageCollection Source #

Arguments

:: PackageReadOptions 
-> [FilePath]

A list of base directories where to search in

-> PoseidonIO [PoseidonPackage]

A list of returned poseidon packages

readPoseidonPackageCollectionWithSkipIndicator Source #

Arguments

:: 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)

getJointGenotypeData Source #

Arguments

:: MonadSafe m 
=> LogA

how messages should be logged

-> Bool

whether to generate an intersection instead of union of input sites

-> PlinkPopNameMode

how to read population labels from Plink

-> [PoseidonPackage]

A list of poseidon packages.

-> Maybe FilePath

a genotype file to select SNPs from

-> m ([EigenstratIndEntry], 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

newMinimalPackageTemplate :: FilePath -> String -> GenotypeDataSpec -> 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 #

readPoseidonPackage Source #

Arguments

:: 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.

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