Safe Haskell | Safe-Inferred |
---|---|
Language | Haskell2010 |
Synopsis
- data JannoRow = JannoRow {
- jPoseidonID :: String
- jGeneticSex :: GeneticSex
- jGroupName :: ListColumn GroupName
- jAlternativeIDs :: Maybe (ListColumn JannoAlternativeID)
- jRelationTo :: Maybe (ListColumn JannoRelationTo)
- jRelationDegree :: Maybe (ListColumn JannoRelationDegree)
- jRelationType :: Maybe (ListColumn JannoRelationType)
- jRelationNote :: Maybe JannoRelationNote
- jCollectionID :: Maybe JannoCollectionID
- jCountry :: Maybe JannoCountry
- jCountryISO :: Maybe JannoCountryISO
- jLocation :: Maybe JannoLocation
- jSite :: Maybe JannoSite
- jLatitude :: Maybe JannoLatitude
- jLongitude :: Maybe JannoLongitude
- jDateType :: Maybe JannoDateType
- jDateC14Labnr :: Maybe (ListColumn JannoDateC14Labnr)
- jDateC14UncalBP :: Maybe (ListColumn JannoDateC14UncalBP)
- jDateC14UncalBPErr :: Maybe (ListColumn JannoDateC14UncalBPErr)
- jDateBCADStart :: Maybe JannoDateBCADStart
- jDateBCADMedian :: Maybe JannoDateBCADMedian
- jDateBCADStop :: Maybe JannoDateBCADStop
- jDateNote :: Maybe JannoDateNote
- jMTHaplogroup :: Maybe JannoMTHaplogroup
- jYHaplogroup :: Maybe JannoYHaplogroup
- jSourceTissue :: Maybe (ListColumn JannoSourceTissue)
- jNrLibraries :: Maybe JannoNrLibraries
- jLibraryNames :: Maybe (ListColumn JannoLibraryName)
- jCaptureType :: Maybe (ListColumn JannoCaptureType)
- jUDG :: Maybe JannoUDG
- jLibraryBuilt :: Maybe JannoLibraryBuilt
- jGenotypePloidy :: Maybe JannoGenotypePloidy
- jDataPreparationPipelineURL :: Maybe JannoDataPreparationPipelineURL
- jEndogenous :: Maybe JannoEndogenous
- jNrSNPs :: Maybe JannoNrSNPs
- jCoverageOnTargets :: Maybe JannoCoverageOnTargets
- jDamage :: Maybe JannoDamage
- jContamination :: Maybe (ListColumn JannoContamination)
- jContaminationErr :: Maybe (ListColumn JannoContaminationErr)
- jContaminationMeas :: Maybe (ListColumn JannoContaminationMeas)
- jContaminationNote :: Maybe JannoContaminationNote
- jGeneticSourceAccessionIDs :: Maybe (ListColumn JannoGeneticSourceAccessionID)
- jPrimaryContact :: Maybe JannoPrimaryContact
- jPublication :: Maybe (ListColumn JannoPublication)
- jComments :: Maybe JannoComment
- jKeywords :: Maybe (ListColumn JannoKeyword)
- jAdditionalColumns :: CsvNamedRecord
- newtype GeneticSex = GeneticSex {}
- newtype GroupName = GroupName Text
- newtype ListColumn a = ListColumn {
- getListColumn :: [a]
- data Sex
- newtype JannoCountryISO = JannoCountryISO Country
- newtype JannoLatitude = JannoLatitude Double
- newtype JannoLongitude = JannoLongitude Double
- data JannoDateType
- = C14
- | Contextual
- | Modern
- newtype JannoDateBCADMedian = JannoDateBCADMedian Int
- data JannoCaptureType
- data JannoGenotypePloidy
- data JannoUDG
- data JannoRelationDegree
- data JannoLibraryBuilt
- writeJannoFile :: FilePath -> JannoRows -> IO ()
- readJannoFile :: FilePath -> PoseidonIO JannoRows
- createMinimalJanno :: [EigenstratIndEntry] -> JannoRows
- createMinimalSample :: EigenstratIndEntry -> JannoRow
- jannoHeaderString :: [String]
- newtype CsvNamedRecord = CsvNamedRecord NamedRecord
- newtype JannoRows = JannoRows {
- getJannoRows :: [JannoRow]
- type JannoStringList = ListColumn String
- filterLookup :: FromField a => NamedRecord -> ByteString -> Parser a
- filterLookupOptional :: FromField a => NamedRecord -> ByteString -> Parser (Maybe a)
- getCsvNR :: CsvNamedRecord -> NamedRecord
- encodingOptions :: EncodeOptions
- decodingOptions :: DecodeOptions
- explicitNA :: ByteString -> ByteString
- removeUselessSuffix :: String -> String
- parseCsvParseError :: Parser CsvParseError
- renderCsvParseError :: CsvParseError -> String
- getMaybeListColumn :: Maybe (ListColumn a) -> [a]
- jannoRows2EigenstratIndEntries :: JannoRows -> [EigenstratIndEntry]
Documentation
A data type to represent a sample/janno file row See https://github.com/poseidon-framework/poseidon2-schema/blob/master/janno_columns.tsv for more details
Instances
newtype GeneticSex Source #
A datatype for the Genetic_Sex .janno column
Instances
A datatype for the Group_Name .janno column
newtype ListColumn a Source #
A general datatype for janno list columns
ListColumn | |
|
Instances
newtype JannoCountryISO Source #
A datatype for countries in ISO-alpha2 code format
JannoCountryISO Country |
Instances
newtype JannoLatitude Source #
A datatype for the Latitude .janno column
Instances
newtype JannoLongitude Source #
A datatype for the Longitude .janno column
Instances
data JannoDateType Source #
A datatype for the Date_Type .janno column
Instances
newtype JannoDateBCADMedian Source #
A datatype for the Date_BC_AD_Median .janno column
Instances
data JannoCaptureType Source #
A datatype for the Capture_Type .janno column
Shotgun | |
A1240K | |
ArborComplete | |
ArborPrimePlus | |
ArborAncestralPlus | |
TwistAncientDNA | |
OtherCapture | |
ReferenceGenome |
Instances
data JannoGenotypePloidy Source #
A datatype for the Genotype_Ploidy .janno column
Instances
A datatype for the UDG .janno column
Instances
Bounded JannoUDG Source # | |
Enum JannoUDG Source # | |
Generic JannoUDG Source # | |
Show JannoUDG Source # | |
FromField JannoUDG Source # | |
Defined in Poseidon.ColumnTypes parseField :: Field -> Parser JannoUDG | |
ToField JannoUDG Source # | |
Defined in Poseidon.ColumnTypes | |
Eq JannoUDG Source # | |
Ord JannoUDG Source # | |
Defined in Poseidon.ColumnTypes | |
Makeable JannoUDG Source # | |
type Rep JannoUDG Source # | |
Defined in Poseidon.ColumnTypes type Rep JannoUDG = D1 ('MetaData "JannoUDG" "Poseidon.ColumnTypes" "poseidon-hs-1.6.0.0-CwGty8Kh6aTIT5Pu2ecao6" 'False) ((C1 ('MetaCons "Minus" 'PrefixI 'False) (U1 :: Type -> Type) :+: C1 ('MetaCons "Half" 'PrefixI 'False) (U1 :: Type -> Type)) :+: (C1 ('MetaCons "Plus" 'PrefixI 'False) (U1 :: Type -> Type) :+: C1 ('MetaCons "Mixed" 'PrefixI 'False) (U1 :: Type -> Type))) |
data JannoRelationDegree Source #
A datatype for the Relation_Degree .janno column
Instances
data JannoLibraryBuilt Source #
A datatype for the Library_Built .janno column
Instances
readJannoFile :: FilePath -> PoseidonIO JannoRows Source #
A function to load one janno file
createMinimalJanno :: [EigenstratIndEntry] -> JannoRows Source #
A function to create empty janno rows for a set of individuals
createMinimalSample :: EigenstratIndEntry -> JannoRow Source #
A function to create an empty janno row for an individual
jannoHeaderString :: [String] Source #
newtype CsvNamedRecord Source #
A datatype to collect additional, unpecified .janno file columns (a hashmap in cassava/Data.Csv)
CsvNamedRecord NamedRecord |
Instances
Generic CsvNamedRecord Source # | |
Defined in Poseidon.Janno type Rep CsvNamedRecord :: Type -> Type # from :: CsvNamedRecord -> Rep CsvNamedRecord x # to :: Rep CsvNamedRecord x -> CsvNamedRecord # | |
Show CsvNamedRecord Source # | |
Defined in Poseidon.Janno showsPrec :: Int -> CsvNamedRecord -> ShowS # show :: CsvNamedRecord -> String # showList :: [CsvNamedRecord] -> ShowS # | |
Eq CsvNamedRecord Source # | |
Defined in Poseidon.Janno (==) :: CsvNamedRecord -> CsvNamedRecord -> Bool # (/=) :: CsvNamedRecord -> CsvNamedRecord -> Bool # | |
PresenceCountable CsvNamedRecord Source # | |
Defined in Poseidon.CLI.Survey countPresence :: CsvNamedRecord -> Int Source # | |
type Rep CsvNamedRecord Source # | |
Defined in Poseidon.Janno type Rep CsvNamedRecord = D1 ('MetaData "CsvNamedRecord" "Poseidon.Janno" "poseidon-hs-1.6.0.0-CwGty8Kh6aTIT5Pu2ecao6" 'True) (C1 ('MetaCons "CsvNamedRecord" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 NamedRecord))) |
A data type to represent a janno file
type JannoStringList = ListColumn String Source #
filterLookup :: FromField a => NamedRecord -> ByteString -> Parser a Source #
filterLookupOptional :: FromField a => NamedRecord -> ByteString -> Parser (Maybe a) Source #
getCsvNR :: CsvNamedRecord -> NamedRecord Source #
encodingOptions :: EncodeOptions Source #
decodingOptions :: DecodeOptions Source #
explicitNA :: ByteString -> ByteString Source #
A helper functions to replace empty bytestrings values in janno files with explicit "n/a"
removeUselessSuffix :: String -> String Source #
parseCsvParseError :: Parser CsvParseError Source #
renderCsvParseError :: CsvParseError -> String Source #
getMaybeListColumn :: Maybe (ListColumn a) -> [a] Source #
jannoRows2EigenstratIndEntries :: JannoRows -> [EigenstratIndEntry] Source #
a convenience function to construct Eigenstrat Ind entries out of jannoRows