diff --git a/src-executables/Main-trident.hs b/src-executables/Main-trident.hs index e5c6348b..a83e2934 100644 --- a/src-executables/Main-trident.hs +++ b/src-executables/Main-trident.hs @@ -243,6 +243,7 @@ rectifyOptParser = RectifyOptions <$> parseBasePaths <*> parseMaybePackageVersionUpdate <*> parseChecksumsToRectify <*> parseMaybeContributors + <*> parseJannoRemoveEmptyCols <*> parseOnlyLatest validateOptParser :: OP.Parser ValidateOptions diff --git a/src/Poseidon/CLI/OptparseApplicativeParsers.hs b/src/Poseidon/CLI/OptparseApplicativeParsers.hs index a3a82fe3..64b38fc1 100644 --- a/src/Poseidon/CLI/OptparseApplicativeParsers.hs +++ b/src/Poseidon/CLI/OptparseApplicativeParsers.hs @@ -236,6 +236,12 @@ readContributorString s = case P.runParser contributorSpecParser () "" s of Left p -> Left (showParsecErr p) Right x -> Right x +parseJannoRemoveEmptyCols :: OP.Parser Bool +parseJannoRemoveEmptyCols = OP.switch ( + OP.long "jannoRemoveEmpty" <> + OP.help "Reorder the .janno file and remove empty colums. \ + \Remember to pair this option with --checksumJanno to also update the checksum." + ) parseMaybeLog :: OP.Parser (Maybe String) parseMaybeLog = OP.option (Just <$> OP.str) ( diff --git a/src/Poseidon/CLI/Rectify.hs b/src/Poseidon/CLI/Rectify.hs index f1b9ec40..72583811 100644 --- a/src/Poseidon/CLI/Rectify.hs +++ b/src/Poseidon/CLI/Rectify.hs @@ -10,17 +10,19 @@ import Poseidon.EntityTypes (HasNameAndVersion (..), renderNameWithVersion) import Poseidon.GenotypeData (GenotypeDataSpec (..), GenotypeFileSpec (..)) +import Poseidon.Janno (writeJannoFileWithoutEmptyCols) import Poseidon.Package (PackageReadOptions (..), PoseidonPackage (..), defaultPackageReadOptions, readPoseidonPackageCollection, writePoseidonPackage) import Poseidon.Utils (PoseidonIO, getChecksum, logDebug, - logInfo) + logInfo, logWarning) import Poseidon.Version (VersionComponent (..), updateThreeComponentVersion) import Control.DeepSeq ((<$!!>)) +import Control.Monad (when) import Control.Monad.IO.Class (MonadIO, liftIO) import Data.List (nub) import Data.Maybe (fromJust) @@ -36,6 +38,7 @@ data RectifyOptions = RectifyOptions , _rectifyPackageVersionUpdate :: Maybe PackageVersionUpdate , _rectifyChecksums :: ChecksumsToRectify , _rectifyNewContributors :: Maybe [ContributorSpec] + , _rectifyJannoRemoveEmptyCols :: Bool , _rectifyOnlyLatest :: Bool } @@ -55,7 +58,12 @@ data ChecksumsToRectify = } runRectify :: RectifyOptions -> PoseidonIO () -runRectify (RectifyOptions baseDirs ignorePosVer newPosVer pacVerUpdate checksumUpdate newContributors onlyLatest) = do +runRectify (RectifyOptions + baseDirs + ignorePosVer newPosVer pacVerUpdate checksumUpdate newContributors + jannoRemoveEmptyCols + onlyLatest + ) = do let pacReadOpts = defaultPackageReadOptions { _readOptIgnoreChecksums = True , _readOptIgnoreGeno = True @@ -72,6 +80,13 @@ runRectify (RectifyOptions baseDirs ignorePosVer newPosVer pacVerUpdate checksum rectifyOnePackage :: PoseidonPackage -> PoseidonIO () rectifyOnePackage inPac = do logInfo $ "Rectifying package: " ++ renderNameWithVersion inPac + when jannoRemoveEmptyCols $ do + case posPacJannoFile inPac of + Nothing -> do + logWarning "No .janno file to modify with --jannoRemoveEmpty" + Just jannoPath -> do + logInfo "Reordering and removing empty columns from .janno file" + liftIO $ writeJannoFileWithoutEmptyCols (posPacBaseDir inPac jannoPath) (posPacJanno inPac) updatedPacPosVer <- updatePoseidonVersion newPosVer inPac updatedPacContri <- addContributors newContributors updatedPacPosVer updatedPacChecksums <- updateChecksums checksumUpdate updatedPacContri @@ -156,7 +171,6 @@ updateChecksums checksumSetting pac = do if e then Just <$!!> getChk file else return defaultChkSum - completeAndWritePackage :: Maybe PackageVersionUpdate -> PoseidonPackage -> PoseidonIO () completeAndWritePackage Nothing pac = do logDebug "Writing rectified POSEIDON.yml file" diff --git a/src/Poseidon/CLI/Survey.hs b/src/Poseidon/CLI/Survey.hs index fed67e58..d9bc9f45 100644 --- a/src/Poseidon/CLI/Survey.hs +++ b/src/Poseidon/CLI/Survey.hs @@ -97,7 +97,7 @@ renderJannoCompleteness (JannoRows rows) = in init ratioString -- remove last entry covering the additional columns (CsvNamedRecord) where -- the following magic was heavily inspired by https://stackoverflow.com/a/41524511/3216883 - getRatiosForEachField :: (Generics.SOP.Generic a, Code a ~ '[ xs ], All PresenceCountable xs) => [a] -> [Ratio Int] + getRatiosForEachField :: (Generics.SOP.Generic a, Code a ~ '[ xs ], All PresenceCountable xs) => [a] -> [Ratio Int] --' getRatiosForEachField = hcollapse . hcmap (Proxy :: Proxy PresenceCountable) (K . measureFillState) diff --git a/src/Poseidon/Janno.hs b/src/Poseidon/Janno.hs index a4772ba5..827b0a8d 100644 --- a/src/Poseidon/Janno.hs +++ b/src/Poseidon/Janno.hs @@ -24,6 +24,7 @@ module Poseidon.Janno ( JannoRelationDegree (..), JannoLibraryBuilt (..), writeJannoFile, + writeJannoFileWithoutEmptyCols, readJannoFile, createMinimalJanno, createMinimalSample, @@ -64,7 +65,7 @@ import Data.Either (lefts, rights) import qualified Data.HashMap.Strict as HM import Data.List (elemIndex, foldl', intercalate, nub, sort, - (\\)) + transpose, (\\)) import Data.Maybe (fromJust) import qualified Data.Text as T import qualified Data.Vector as V @@ -282,8 +283,11 @@ cleanInput (Just rawInputBS) = transNA rawInputBS transNA "n/a" = Nothing transNA x = Just x +explicitNA :: Csv.NamedRecord -> Csv.NamedRecord +explicitNA = HM.map (\x -> if Bchs.null x then "n/a" else x) + instance Csv.ToNamedRecord JannoRow where - toNamedRecord j = Csv.namedRecord [ + toNamedRecord j = explicitNA $ Csv.namedRecord [ "Poseidon_ID" Csv..= jPoseidonID j , "Genetic_Sex" Csv..= jGeneticSex j , "Group_Name" Csv..= jGroupName j @@ -394,15 +398,27 @@ createMinimalSample (EigenstratIndEntry id_ sex pop) = -- Janno file writing +makeHeaderWithAdditionalColumns :: [JannoRow] -> Csv.Header +makeHeaderWithAdditionalColumns rows = + V.fromList $ jannoHeader ++ sort (HM.keys (HM.unions (map (getCsvNR . jAdditionalColumns) rows))) + writeJannoFile :: FilePath -> JannoRows -> IO () writeJannoFile path (JannoRows rows) = do - let jannoAsBytestring = Csv.encodeByNameWith encodingOptions makeHeaderWithAdditionalColumns rows - let jannoAsBytestringwithNA = explicitNA jannoAsBytestring - Bch.writeFile path jannoAsBytestringwithNA - where - makeHeaderWithAdditionalColumns :: Csv.Header - makeHeaderWithAdditionalColumns = - V.fromList $ jannoHeader ++ sort (HM.keys (HM.unions (map (getCsvNR . jAdditionalColumns) rows))) + let jannoAsBytestring = Csv.encodeByNameWith encodingOptions (makeHeaderWithAdditionalColumns rows) rows + Bch.writeFile path jannoAsBytestring + +writeJannoFileWithoutEmptyCols :: FilePath -> JannoRows -> IO () +writeJannoFileWithoutEmptyCols path (JannoRows rows) = do + let jannoAsBytestring = Csv.encodeByNameWith encodingOptions (makeHeaderWithAdditionalColumns rows) rows + case Csv.decodeWith decodingOptions Csv.NoHeader jannoAsBytestring :: Either String (V.Vector (V.Vector Bch.ByteString)) of + Left _ -> error "internal error, please report" + Right x -> do + let janno = V.toList $ V.map V.toList x + jannoTransposed = transpose janno + jannoTransposedFiltered = filter (any (/= "n/a") . tail) jannoTransposed + jannoBackTransposed = transpose jannoTransposedFiltered + jannoConcat = Bch.intercalate "\n" $ map (Bch.intercalate "\t") jannoBackTransposed + Bch.writeFile path (jannoConcat <> "\n") encodingOptions :: Csv.EncodeOptions encodingOptions = Csv.defaultEncodeOptions { @@ -528,18 +544,6 @@ renderCsvParseError (CsvParseError expected actual leftover) = "broken value: " ++ actual ++ ", " ++ "problematic characters: " ++ show leftover ++ ")" --- | A helper functions to replace empty bytestrings values in janno files with explicit "n/a" -explicitNA :: Bch.ByteString -> Bch.ByteString -explicitNA = replaceInJannoBytestring Bch.empty "n/a" - -replaceInJannoBytestring :: Bch.ByteString -> Bch.ByteString -> Bch.ByteString -> Bch.ByteString -replaceInJannoBytestring from to tsv = - let tsvRows = Bch.lines tsv - tsvCells = map (Bch.splitWith (=='\t')) tsvRows - tsvCellsUpdated = map (map (\y -> if y == from || y == Bch.append from "\r" then to else y)) tsvCells - tsvRowsUpdated = map (Bch.intercalate (Bch.pack "\t")) tsvCellsUpdated - in Bch.unlines tsvRowsUpdated - -- Global janno consistency checks checkJannoConsistency :: FilePath -> JannoRows -> Either PoseidonException JannoRows diff --git a/src/Poseidon/SequencingSource.hs b/src/Poseidon/SequencingSource.hs index 918595b3..0c52887c 100644 --- a/src/Poseidon/SequencingSource.hs +++ b/src/Poseidon/SequencingSource.hs @@ -355,7 +355,7 @@ instance Csv.FromNamedRecord SeqSourceRow where <*> pure (CsvNamedRecord (m `HM.difference` seqSourceRefHashMap)) instance Csv.ToNamedRecord SeqSourceRow where - toNamedRecord s = Csv.namedRecord [ + toNamedRecord s = explicitNA $ Csv.namedRecord [ "poseidon_IDs" Csv..= sPoseidonID s , "udg" Csv..= sUDG s , "library_built" Csv..= sLibraryBuilt s @@ -385,8 +385,7 @@ instance Csv.ToNamedRecord SeqSourceRow where writeSeqSourceFile :: FilePath -> SeqSourceRows -> IO () writeSeqSourceFile path (SeqSourceRows rows) = do let seqSourceAsBytestring = Csv.encodeByNameWith encodingOptions makeHeaderWithAdditionalColumns rows - let seqSourceAsBytestringwithNA = explicitNA seqSourceAsBytestring - Bch.writeFile path seqSourceAsBytestringwithNA + Bch.writeFile path seqSourceAsBytestring where makeHeaderWithAdditionalColumns :: Csv.Header makeHeaderWithAdditionalColumns = diff --git a/test/PoseidonGoldenTests/GoldenTestCheckSumFile.txt b/test/PoseidonGoldenTests/GoldenTestCheckSumFile.txt index 415bb16f..df9c3837 100644 --- a/test/PoseidonGoldenTests/GoldenTestCheckSumFile.txt +++ b/test/PoseidonGoldenTests/GoldenTestCheckSumFile.txt @@ -22,10 +22,10 @@ d41d8cd98f00b204e9800998ecf8427e validate validate/validate8 d41d8cd98f00b204e9800998ecf8427e validate validate/validate9 bc636b9c03ea9359acd254a9911e5af3 list list/list1 b18847f5498ae55882689b75916fdf64 list list/list2 -63ef5f277f6f29163192382234211224 list list/list3 -1c1f24de305405ece44393d378c0e15a list list/list4 +d6eafec9087c88ed6a95e4a22f1f306c list list/list3 +27c6118de70743426f8d8157ddd0f1c7 list list/list4 bc636b9c03ea9359acd254a9911e5af3 list list/list5 -ad5590b0ad65e64d6b2c8d874571c9f8 list list/list6 +b69c17ad4893e4e9bdcb767a229eaccb list list/list6 b197fb8dd883c7469a4791e4a677f1c0 summarise summarise/summarise1 d9e4b3f15d4e129a365d2064198d95b6 summarise summarise/summarise2 a1186fdad9ed555dff4dd61dc9838645 survey survey/survey1 @@ -55,6 +55,9 @@ da981f8d52f60ec4d96865b224648c92 rectify init/Schiffels/POSEIDON.yml 3bb396e099d5b8771a3409f5fe85d70b rectify init/Schiffels/CHANGELOG.md dc322649188ce2995cea8a46a7f97f3e rectify init/Schiffels/POSEIDON.yml 3bb396e099d5b8771a3409f5fe85d70b rectify init/Schiffels/CHANGELOG.md +a61f78b4e9b7e3c7e00ec7bc6aaab95b rectify init/Schiffels/POSEIDON.yml +3bb396e099d5b8771a3409f5fe85d70b rectify init/Schiffels/CHANGELOG.md +083fe7ef4206c979356a3a2454d780b1 rectify init/Schiffels/Schiffels.janno 2757f727e02dd6453fffe68c4c6ec4c8 forge forge/ForgePac1/POSEIDON.yml 1286a2580e4bfbed7d804d5f3fe125f7 forge forge/ForgePac1/ForgePac1.geno 8846333d9a1de6510f25a3816cc70fef forge forge/ForgePac1/ForgePac1.janno @@ -125,7 +128,7 @@ e375863bca9e4a91c9855396abde31c7 forge forge/ForgePac20/ForgePac20.janno d4a05cfef045648238a94a9d621cf667 chronicle chronicle/chronicle1.yml b43da4d5734371c0648553120f812466 timetravel timetravel/Lamnidis_2018-1.0.0/POSEIDON.yml 8d57ce1a1ab28c0d8a5f391dd790a59c timetravel timetravel/Lamnidis_2018-1.0.1/POSEIDON.yml -dc322649188ce2995cea8a46a7f97f3e timetravel timetravel/Schiffels-1.1.1/POSEIDON.yml +a61f78b4e9b7e3c7e00ec7bc6aaab95b timetravel timetravel/Schiffels-1.1.1/POSEIDON.yml 1ab24c45ef3a13e0fb34afac7a21dca8 timetravel timetravel/Schmid_2028-1.0.0/POSEIDON.yml 8d57ce1a1ab28c0d8a5f391dd790a59c fetch fetch/by_package/Lamnidis_2018-1.0.1/POSEIDON.yml 1ab24c45ef3a13e0fb34afac7a21dca8 fetch fetch/by_package/Schmid_2028-1.0.0/POSEIDON.yml @@ -141,9 +144,9 @@ b43da4d5734371c0648553120f812466 fetch fetch/multi_packages_2/Lamnidis_2018-1.0. 8d57ce1a1ab28c0d8a5f391dd790a59c fetch fetch/multi_packages_2/Lamnidis_2018-1.0.1/POSEIDON.yml 1d2a588b88e6d1017147c01f19d0b878 listRemote listRemote/listRemote1 0ddad9ea097bca0253e0c3c6157efa68 listRemote listRemote/listRemote2 -b2286cf9af7c6c8757b8109a1f58e2d9 listRemote listRemote/listRemote3 +705ecf31acfb9f21bfdc5bf4e77c10cd listRemote listRemote/listRemote3 0433b2a80ee5a2eb5bf8c6404130e562 listRemote listRemote/listRemote4 -8a13e5b31acabca6839100f411c38453 listRemote listRemote/listRemote5 +06eb810bcba832e75d72f10800ea7774 listRemote listRemote/listRemote5 eb610918796e03da3b0035655e9f8faa jannocoalesce jannocoalesce/target1.janno df34d0542c0a94cf9556619bff2e301d jannocoalesce jannocoalesce/target2.janno cc76b2bf0ad6637ea6502fdefcca3508 jannocoalesce jannocoalesce/target3.janno \ No newline at end of file diff --git a/test/PoseidonGoldenTests/GoldenTestData/chronicle/Schiffels/POSEIDON.yml b/test/PoseidonGoldenTests/GoldenTestData/chronicle/Schiffels/POSEIDON.yml index 1feb73d5..1e71dd7f 100644 --- a/test/PoseidonGoldenTests/GoldenTestData/chronicle/Schiffels/POSEIDON.yml +++ b/test/PoseidonGoldenTests/GoldenTestData/chronicle/Schiffels/POSEIDON.yml @@ -16,7 +16,7 @@ genotypeData: indFile: ind.txt snpSet: Other jannoFile: Schiffels.janno -jannoFileChkSum: fd632717ecaf337a39cfd7a828a54e99 +jannoFileChkSum: 083fe7ef4206c979356a3a2454d780b1 bibFile: Schiffels.bib bibFileChkSum: 9edc4a757f785a8ecb59c54d16c5690a changelogFile: CHANGELOG.md diff --git a/test/PoseidonGoldenTests/GoldenTestData/chronicle/Schiffels/Schiffels.janno b/test/PoseidonGoldenTests/GoldenTestData/chronicle/Schiffels/Schiffels.janno index 3bf96b2c..c80c86ca 100644 --- a/test/PoseidonGoldenTests/GoldenTestData/chronicle/Schiffels/Schiffels.janno +++ b/test/PoseidonGoldenTests/GoldenTestData/chronicle/Schiffels/Schiffels.janno @@ -1,11 +1,11 @@ -Poseidon_ID Genetic_Sex Group_Name Alternative_IDs Relation_To Relation_Degree Relation_Type Relation_Note Collection_ID Country Country_ISO Location Site Latitude Longitude Date_Type Date_C14_Labnr Date_C14_Uncal_BP Date_C14_Uncal_BP_Err Date_BC_AD_Start Date_BC_AD_Median Date_BC_AD_Stop Date_Note MT_Haplogroup Y_Haplogroup Source_Tissue Nr_Libraries Library_Names Capture_Type UDG Library_Built Genotype_Ploidy Data_Preparation_Pipeline_URL Endogenous Nr_SNPs Coverage_on_Target_SNPs Damage Contamination Contamination_Err Contamination_Meas Contamination_Note Genetic_Source_Accession_IDs Primary_Contact Publication Note Keywords -XXX001 M POP1 n/a n/a n/a n/a n/a n/a n/a n/a n/a n/a n/a n/a n/a n/a n/a n/a n/a n/a n/a n/a n/a n/a n/a n/a n/a n/a n/a n/a n/a n/a n/a n/a n/a n/a n/a n/a n/a n/a n/a n/a n/a n/a n/a -XXX002 F POP2 n/a n/a n/a n/a n/a n/a n/a n/a n/a n/a n/a n/a n/a n/a n/a n/a n/a n/a n/a n/a n/a n/a n/a n/a n/a n/a n/a n/a n/a n/a n/a n/a n/a n/a n/a n/a n/a n/a n/a n/a n/a n/a n/a -XXX003 M POP1 n/a n/a n/a n/a n/a n/a n/a n/a n/a n/a n/a n/a n/a n/a n/a n/a n/a n/a n/a n/a n/a n/a n/a n/a n/a n/a n/a n/a n/a n/a n/a n/a n/a n/a n/a n/a n/a n/a n/a n/a n/a n/a n/a -XXX004 F POP2 n/a n/a n/a n/a n/a n/a n/a n/a n/a n/a n/a n/a n/a n/a n/a n/a n/a n/a n/a n/a n/a n/a n/a n/a n/a n/a n/a n/a n/a n/a n/a n/a n/a n/a n/a n/a n/a n/a n/a n/a n/a n/a n/a -XXX005 M POP2 n/a n/a n/a n/a n/a n/a n/a n/a n/a n/a n/a n/a n/a n/a n/a n/a n/a n/a n/a n/a n/a n/a n/a n/a n/a n/a n/a n/a n/a n/a n/a n/a n/a n/a n/a n/a n/a n/a n/a n/a n/a n/a n/a -XXX006 F POP2 n/a n/a n/a n/a n/a n/a n/a n/a n/a n/a n/a n/a n/a n/a n/a n/a n/a n/a n/a n/a n/a n/a n/a n/a n/a n/a n/a n/a n/a n/a n/a n/a n/a n/a n/a n/a n/a n/a n/a n/a n/a n/a n/a -XXX007 M POP1 n/a n/a n/a n/a n/a n/a n/a n/a n/a n/a n/a n/a n/a n/a n/a n/a n/a n/a n/a n/a n/a n/a n/a n/a n/a n/a n/a n/a n/a n/a n/a n/a n/a n/a n/a n/a n/a n/a n/a n/a n/a n/a n/a -XXX008 F POP3 n/a n/a n/a n/a n/a n/a n/a n/a n/a n/a n/a n/a n/a n/a n/a n/a n/a n/a n/a n/a n/a n/a n/a n/a n/a n/a n/a n/a n/a n/a n/a n/a n/a n/a n/a n/a n/a n/a n/a n/a n/a n/a n/a -XXX009 F POP1 n/a n/a n/a n/a n/a n/a n/a n/a n/a n/a n/a n/a n/a n/a n/a n/a n/a n/a n/a n/a n/a n/a n/a n/a n/a n/a n/a n/a n/a n/a n/a n/a n/a n/a n/a n/a n/a n/a n/a n/a n/a n/a n/a -XXX010 M POP3 n/a n/a n/a n/a n/a n/a n/a n/a n/a n/a n/a n/a n/a n/a n/a n/a n/a n/a n/a n/a n/a n/a n/a n/a n/a n/a n/a n/a n/a n/a n/a n/a n/a n/a n/a n/a n/a n/a n/a n/a n/a n/a n/a +Poseidon_ID Genetic_Sex Group_Name +XXX001 M POP1 +XXX002 F POP2 +XXX003 M POP1 +XXX004 F POP2 +XXX005 M POP2 +XXX006 F POP2 +XXX007 M POP1 +XXX008 F POP3 +XXX009 F POP1 +XXX010 M POP3 diff --git a/test/PoseidonGoldenTests/GoldenTestData/chronicle/chronicle2.yml b/test/PoseidonGoldenTests/GoldenTestData/chronicle/chronicle2.yml index eca10705..585858ec 100644 --- a/test/PoseidonGoldenTests/GoldenTestData/chronicle/chronicle2.yml +++ b/test/PoseidonGoldenTests/GoldenTestData/chronicle/chronicle2.yml @@ -1,29 +1,29 @@ title: Chronicle title description: Chronicle description chronicleVersion: 0.2.0 -lastModified: 2024-11-13 +lastModified: 2025-01-09 packages: - title: Lamnidis_2018 version: 1.0.0 - commit: c59bfb82fec3f2742cc0e10ceb2932ee06e56aa1 + commit: 4262db441fc73a3a0fabe7165ba13261f0a994f2 path: Lamnidis_2018 - title: Lamnidis_2018 version: 1.0.1 - commit: c59bfb82fec3f2742cc0e10ceb2932ee06e56aa1 + commit: 4262db441fc73a3a0fabe7165ba13261f0a994f2 path: Lamnidis_2018_newVersion - title: Schiffels version: 1.1.1 - commit: a32a46cf82b8895af72c8920be4ca4843cd5e7f7 + commit: 88e86f51139053f19d55f453b9fbcaae205d37a3 path: Schiffels - title: Schiffels_2016 version: 1.0.1 - commit: c59bfb82fec3f2742cc0e10ceb2932ee06e56aa1 + commit: 4262db441fc73a3a0fabe7165ba13261f0a994f2 path: Schiffels_2016 - title: Schmid_2028 version: 1.0.0 - commit: c59bfb82fec3f2742cc0e10ceb2932ee06e56aa1 + commit: 4262db441fc73a3a0fabe7165ba13261f0a994f2 path: Schmid_2028 - title: Wang_2020 version: 0.1.0 - commit: c59bfb82fec3f2742cc0e10ceb2932ee06e56aa1 + commit: 4262db441fc73a3a0fabe7165ba13261f0a994f2 path: Wang_2020 diff --git a/test/PoseidonGoldenTests/GoldenTestData/init/Schiffels/POSEIDON.yml b/test/PoseidonGoldenTests/GoldenTestData/init/Schiffels/POSEIDON.yml index 1feb73d5..1e71dd7f 100644 --- a/test/PoseidonGoldenTests/GoldenTestData/init/Schiffels/POSEIDON.yml +++ b/test/PoseidonGoldenTests/GoldenTestData/init/Schiffels/POSEIDON.yml @@ -16,7 +16,7 @@ genotypeData: indFile: ind.txt snpSet: Other jannoFile: Schiffels.janno -jannoFileChkSum: fd632717ecaf337a39cfd7a828a54e99 +jannoFileChkSum: 083fe7ef4206c979356a3a2454d780b1 bibFile: Schiffels.bib bibFileChkSum: 9edc4a757f785a8ecb59c54d16c5690a changelogFile: CHANGELOG.md diff --git a/test/PoseidonGoldenTests/GoldenTestData/init/Schiffels/Schiffels.janno b/test/PoseidonGoldenTests/GoldenTestData/init/Schiffels/Schiffels.janno index 3bf96b2c..c80c86ca 100644 --- a/test/PoseidonGoldenTests/GoldenTestData/init/Schiffels/Schiffels.janno +++ b/test/PoseidonGoldenTests/GoldenTestData/init/Schiffels/Schiffels.janno @@ -1,11 +1,11 @@ -Poseidon_ID Genetic_Sex Group_Name Alternative_IDs Relation_To Relation_Degree Relation_Type Relation_Note Collection_ID Country Country_ISO Location Site Latitude Longitude Date_Type Date_C14_Labnr Date_C14_Uncal_BP Date_C14_Uncal_BP_Err Date_BC_AD_Start Date_BC_AD_Median Date_BC_AD_Stop Date_Note MT_Haplogroup Y_Haplogroup Source_Tissue Nr_Libraries Library_Names Capture_Type UDG Library_Built Genotype_Ploidy Data_Preparation_Pipeline_URL Endogenous Nr_SNPs Coverage_on_Target_SNPs Damage Contamination Contamination_Err Contamination_Meas Contamination_Note Genetic_Source_Accession_IDs Primary_Contact Publication Note Keywords -XXX001 M POP1 n/a n/a n/a n/a n/a n/a n/a n/a n/a n/a n/a n/a n/a n/a n/a n/a n/a n/a n/a n/a n/a n/a n/a n/a n/a n/a n/a n/a n/a n/a n/a n/a n/a n/a n/a n/a n/a n/a n/a n/a n/a n/a n/a -XXX002 F POP2 n/a n/a n/a n/a n/a n/a n/a n/a n/a n/a n/a n/a n/a n/a n/a n/a n/a n/a n/a n/a n/a n/a n/a n/a n/a n/a n/a n/a n/a n/a n/a n/a n/a n/a n/a n/a n/a n/a n/a n/a n/a n/a n/a -XXX003 M POP1 n/a n/a n/a n/a n/a n/a n/a n/a n/a n/a n/a n/a n/a n/a n/a n/a n/a n/a n/a n/a n/a n/a n/a n/a n/a n/a n/a n/a n/a n/a n/a n/a n/a n/a n/a n/a n/a n/a n/a n/a n/a n/a n/a -XXX004 F POP2 n/a n/a n/a n/a n/a n/a n/a n/a n/a n/a n/a n/a n/a n/a n/a n/a n/a n/a n/a n/a n/a n/a n/a n/a n/a n/a n/a n/a n/a n/a n/a n/a n/a n/a n/a n/a n/a n/a n/a n/a n/a n/a n/a -XXX005 M POP2 n/a n/a n/a n/a n/a n/a n/a n/a n/a n/a n/a n/a n/a n/a n/a n/a n/a n/a n/a n/a n/a n/a n/a n/a n/a n/a n/a n/a n/a n/a n/a n/a n/a n/a n/a n/a n/a n/a n/a n/a n/a n/a n/a -XXX006 F POP2 n/a n/a n/a n/a n/a n/a n/a n/a n/a n/a n/a n/a n/a n/a n/a n/a n/a n/a n/a n/a n/a n/a n/a n/a n/a n/a n/a n/a n/a n/a n/a n/a n/a n/a n/a n/a n/a n/a n/a n/a n/a n/a n/a -XXX007 M POP1 n/a n/a n/a n/a n/a n/a n/a n/a n/a n/a n/a n/a n/a n/a n/a n/a n/a n/a n/a n/a n/a n/a n/a n/a n/a n/a n/a n/a n/a n/a n/a n/a n/a n/a n/a n/a n/a n/a n/a n/a n/a n/a n/a -XXX008 F POP3 n/a n/a n/a n/a n/a n/a n/a n/a n/a n/a n/a n/a n/a n/a n/a n/a n/a n/a n/a n/a n/a n/a n/a n/a n/a n/a n/a n/a n/a n/a n/a n/a n/a n/a n/a n/a n/a n/a n/a n/a n/a n/a n/a -XXX009 F POP1 n/a n/a n/a n/a n/a n/a n/a n/a n/a n/a n/a n/a n/a n/a n/a n/a n/a n/a n/a n/a n/a n/a n/a n/a n/a n/a n/a n/a n/a n/a n/a n/a n/a n/a n/a n/a n/a n/a n/a n/a n/a n/a n/a -XXX010 M POP3 n/a n/a n/a n/a n/a n/a n/a n/a n/a n/a n/a n/a n/a n/a n/a n/a n/a n/a n/a n/a n/a n/a n/a n/a n/a n/a n/a n/a n/a n/a n/a n/a n/a n/a n/a n/a n/a n/a n/a n/a n/a n/a n/a +Poseidon_ID Genetic_Sex Group_Name +XXX001 M POP1 +XXX002 F POP2 +XXX003 M POP1 +XXX004 F POP2 +XXX005 M POP2 +XXX006 F POP2 +XXX007 M POP1 +XXX008 F POP3 +XXX009 F POP1 +XXX010 M POP3 diff --git a/test/PoseidonGoldenTests/GoldenTestData/list/list3 b/test/PoseidonGoldenTests/GoldenTestData/list/list3 index b4289eec..1410b8b4 100644 --- a/test/PoseidonGoldenTests/GoldenTestData/list/list3 +++ b/test/PoseidonGoldenTests/GoldenTestData/list/list3 @@ -1,14 +1,14 @@ .------------.-------.----------------.----------------.-----------.---------.---------. | Individual | Group | Package | PackageVersion | Is Latest | Country | Nr_SNPs | :============:=======:================:================:===========:=========:=========: -| XXX001 | POP1 | Schiffels_2016 | 1.0.1 | True | | | -| XXX002 | POP2 | Schiffels_2016 | 1.0.1 | True | | | -| XXX003 | POP1 | Schiffels_2016 | 1.0.1 | True | | | -| XXX004 | POP2 | Schiffels_2016 | 1.0.1 | True | | | -| XXX005 | POP2 | Schiffels_2016 | 1.0.1 | True | | | -| XXX006 | POP2 | Schiffels_2016 | 1.0.1 | True | | | -| XXX007 | POP1 | Schiffels_2016 | 1.0.1 | True | | | -| XXX008 | POP3 | Schiffels_2016 | 1.0.1 | True | | | -| XXX009 | POP1 | Schiffels_2016 | 1.0.1 | True | | | -| XXX010 | POP3 | Schiffels_2016 | 1.0.1 | True | | | +| XXX001 | POP1 | Schiffels_2016 | 1.0.1 | True | n/a | n/a | +| XXX002 | POP2 | Schiffels_2016 | 1.0.1 | True | n/a | n/a | +| XXX003 | POP1 | Schiffels_2016 | 1.0.1 | True | n/a | n/a | +| XXX004 | POP2 | Schiffels_2016 | 1.0.1 | True | n/a | n/a | +| XXX005 | POP2 | Schiffels_2016 | 1.0.1 | True | n/a | n/a | +| XXX006 | POP2 | Schiffels_2016 | 1.0.1 | True | n/a | n/a | +| XXX007 | POP1 | Schiffels_2016 | 1.0.1 | True | n/a | n/a | +| XXX008 | POP3 | Schiffels_2016 | 1.0.1 | True | n/a | n/a | +| XXX009 | POP1 | Schiffels_2016 | 1.0.1 | True | n/a | n/a | +| XXX010 | POP3 | Schiffels_2016 | 1.0.1 | True | n/a | n/a | '------------'-------'----------------'----------------'-----------'---------'---------' diff --git a/test/PoseidonGoldenTests/GoldenTestData/list/list4 b/test/PoseidonGoldenTests/GoldenTestData/list/list4 index 51ab7cb0..c3e3e8e8 100644 --- a/test/PoseidonGoldenTests/GoldenTestData/list/list4 +++ b/test/PoseidonGoldenTests/GoldenTestData/list/list4 @@ -1,11 +1,11 @@ Individual Group Package PackageVersion Is Latest Country Nr_SNPs -XXX001 POP1 Schiffels_2016 1.0.1 True -XXX002 POP2 Schiffels_2016 1.0.1 True -XXX003 POP1 Schiffels_2016 1.0.1 True -XXX004 POP2 Schiffels_2016 1.0.1 True -XXX005 POP2 Schiffels_2016 1.0.1 True -XXX006 POP2 Schiffels_2016 1.0.1 True -XXX007 POP1 Schiffels_2016 1.0.1 True -XXX008 POP3 Schiffels_2016 1.0.1 True -XXX009 POP1 Schiffels_2016 1.0.1 True -XXX010 POP3 Schiffels_2016 1.0.1 True +XXX001 POP1 Schiffels_2016 1.0.1 True n/a n/a +XXX002 POP2 Schiffels_2016 1.0.1 True n/a n/a +XXX003 POP1 Schiffels_2016 1.0.1 True n/a n/a +XXX004 POP2 Schiffels_2016 1.0.1 True n/a n/a +XXX005 POP2 Schiffels_2016 1.0.1 True n/a n/a +XXX006 POP2 Schiffels_2016 1.0.1 True n/a n/a +XXX007 POP1 Schiffels_2016 1.0.1 True n/a n/a +XXX008 POP3 Schiffels_2016 1.0.1 True n/a n/a +XXX009 POP1 Schiffels_2016 1.0.1 True n/a n/a +XXX010 POP3 Schiffels_2016 1.0.1 True n/a n/a diff --git a/test/PoseidonGoldenTests/GoldenTestData/list/list6 b/test/PoseidonGoldenTests/GoldenTestData/list/list6 index dc63d84c..b38f46bc 100644 --- a/test/PoseidonGoldenTests/GoldenTestData/list/list6 +++ b/test/PoseidonGoldenTests/GoldenTestData/list/list6 @@ -1,14 +1,14 @@ .------------.-------.----------------.----------------.-----------.-------------.-----------------.-------------.-----------------.---------------.---------------.---------------.---------.-------------.----------.------.----------.-----------.-----------.----------------.-------------------.-----------------------.------------------.-------------------.-----------------.-----------.---------------.--------------.---------------.--------------.---------------.--------------.-----.---------------.-----------------.-------------------------------.------------.---------.-------------------------.--------.---------------.-------------------.--------------------.--------------------.------------------------------.-----------------.------------------------------------.------.----------. | Individual | Group | Package | PackageVersion | Is Latest | Genetic_Sex | Alternative_IDs | Relation_To | Relation_Degree | Relation_Type | Relation_Note | Collection_ID | Country | Country_ISO | Location | Site | Latitude | Longitude | Date_Type | Date_C14_Labnr | Date_C14_Uncal_BP | Date_C14_Uncal_BP_Err | Date_BC_AD_Start | Date_BC_AD_Median | Date_BC_AD_Stop | Date_Note | MT_Haplogroup | Y_Haplogroup | Source_Tissue | Nr_Libraries | Library_Names | Capture_Type | UDG | Library_Built | Genotype_Ploidy | Data_Preparation_Pipeline_URL | Endogenous | Nr_SNPs | Coverage_on_Target_SNPs | Damage | Contamination | Contamination_Err | Contamination_Meas | Contamination_Note | Genetic_Source_Accession_IDs | Primary_Contact | Publication | Note | Keywords | :============:=======:================:================:===========:=============:=================:=============:=================:===============:===============:===============:=========:=============:==========:======:==========:===========:===========:================:===================:=======================:==================:===================:=================:===========:===============:==============:===============:==============:===============:==============:=====:===============:=================:===============================:============:=========:=========================:========:===============:===================:====================:====================:==============================:=================:====================================:======:==========: -| XXX001 | POP1 | Schiffels_2016 | 1.0.1 | True | M | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Schiffels2016 | | | -| XXX002 | POP2 | Schiffels_2016 | 1.0.1 | True | F | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Schiffels2016 | | | -| XXX003 | POP1 | Schiffels_2016 | 1.0.1 | True | M | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Schiffels2016 | | | -| XXX004 | POP2 | Schiffels_2016 | 1.0.1 | True | F | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Schiffels2016 | | | -| XXX005 | POP2 | Schiffels_2016 | 1.0.1 | True | M | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Schiffels2016;TestPaper1 | | | -| XXX006 | POP2 | Schiffels_2016 | 1.0.1 | True | F | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Schiffels2016;TestPaper1 | | | -| XXX007 | POP1 | Schiffels_2016 | 1.0.1 | True | M | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Schiffels2016;TestBook1 | | | -| XXX008 | POP3 | Schiffels_2016 | 1.0.1 | True | F | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Schiffels2016;TestBook1 | | | -| XXX009 | POP1 | Schiffels_2016 | 1.0.1 | True | F | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Schiffels2016;TestPaper1;TestBook1 | | | -| XXX010 | POP3 | Schiffels_2016 | 1.0.1 | True | M | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Schiffels2016;TestPaper1;TestBook1 | | | +| XXX001 | POP1 | Schiffels_2016 | 1.0.1 | True | M | n/a | n/a | n/a | n/a | n/a | n/a | n/a | n/a | n/a | n/a | n/a | n/a | n/a | n/a | n/a | n/a | n/a | n/a | n/a | n/a | n/a | n/a | n/a | n/a | n/a | n/a | n/a | n/a | n/a | n/a | n/a | n/a | n/a | n/a | n/a | n/a | n/a | n/a | n/a | n/a | Schiffels2016 | n/a | n/a | +| XXX002 | POP2 | Schiffels_2016 | 1.0.1 | True | F | n/a | n/a | n/a | n/a | n/a | n/a | n/a | n/a | n/a | n/a | n/a | n/a | n/a | n/a | n/a | n/a | n/a | n/a | n/a | n/a | n/a | n/a | n/a | n/a | n/a | n/a | n/a | n/a | n/a | n/a | n/a | n/a | n/a | n/a | n/a | n/a | n/a | n/a | n/a | n/a | Schiffels2016 | n/a | n/a | +| XXX003 | POP1 | Schiffels_2016 | 1.0.1 | True | M | n/a | n/a | n/a | n/a | n/a | n/a | n/a | n/a | n/a | n/a | n/a | n/a | n/a | n/a | n/a | n/a | n/a | n/a | n/a | n/a | n/a | n/a | n/a | n/a | n/a | n/a | n/a | n/a | n/a | n/a | n/a | n/a | n/a | n/a | n/a | n/a | n/a | n/a | n/a | n/a | Schiffels2016 | n/a | n/a | +| XXX004 | POP2 | Schiffels_2016 | 1.0.1 | True | F | n/a | n/a | n/a | n/a | n/a | n/a | n/a | n/a | n/a | n/a | n/a | n/a | n/a | n/a | n/a | n/a | n/a | n/a | n/a | n/a | n/a | n/a | n/a | n/a | n/a | n/a | n/a | n/a | n/a | n/a | n/a | n/a | n/a | n/a | n/a | n/a | n/a | n/a | n/a | n/a | Schiffels2016 | n/a | n/a | +| XXX005 | POP2 | Schiffels_2016 | 1.0.1 | True | M | n/a | n/a | n/a | n/a | n/a | n/a | n/a | n/a | n/a | n/a | n/a | n/a | n/a | n/a | n/a | n/a | n/a | n/a | n/a | n/a | n/a | n/a | n/a | n/a | n/a | n/a | n/a | n/a | n/a | n/a | n/a | n/a | n/a | n/a | n/a | n/a | n/a | n/a | n/a | n/a | Schiffels2016;TestPaper1 | n/a | n/a | +| XXX006 | POP2 | Schiffels_2016 | 1.0.1 | True | F | n/a | n/a | n/a | n/a | n/a | n/a | n/a | n/a | n/a | n/a | n/a | n/a | n/a | n/a | n/a | n/a | n/a | n/a | n/a | n/a | n/a | n/a | n/a | n/a | n/a | n/a | n/a | n/a | n/a | n/a | n/a | n/a | n/a | n/a | n/a | n/a | n/a | n/a | n/a | n/a | Schiffels2016;TestPaper1 | n/a | n/a | +| XXX007 | POP1 | Schiffels_2016 | 1.0.1 | True | M | n/a | n/a | n/a | n/a | n/a | n/a | n/a | n/a | n/a | n/a | n/a | n/a | n/a | n/a | n/a | n/a | n/a | n/a | n/a | n/a | n/a | n/a | n/a | n/a | n/a | n/a | n/a | n/a | n/a | n/a | n/a | n/a | n/a | n/a | n/a | n/a | n/a | n/a | n/a | n/a | Schiffels2016;TestBook1 | n/a | n/a | +| XXX008 | POP3 | Schiffels_2016 | 1.0.1 | True | F | n/a | n/a | n/a | n/a | n/a | n/a | n/a | n/a | n/a | n/a | n/a | n/a | n/a | n/a | n/a | n/a | n/a | n/a | n/a | n/a | n/a | n/a | n/a | n/a | n/a | n/a | n/a | n/a | n/a | n/a | n/a | n/a | n/a | n/a | n/a | n/a | n/a | n/a | n/a | n/a | Schiffels2016;TestBook1 | n/a | n/a | +| XXX009 | POP1 | Schiffels_2016 | 1.0.1 | True | F | n/a | n/a | n/a | n/a | n/a | n/a | n/a | n/a | n/a | n/a | n/a | n/a | n/a | n/a | n/a | n/a | n/a | n/a | n/a | n/a | n/a | n/a | n/a | n/a | n/a | n/a | n/a | n/a | n/a | n/a | n/a | n/a | n/a | n/a | n/a | n/a | n/a | n/a | n/a | n/a | Schiffels2016;TestPaper1;TestBook1 | n/a | n/a | +| XXX010 | POP3 | Schiffels_2016 | 1.0.1 | True | M | n/a | n/a | n/a | n/a | n/a | n/a | n/a | n/a | n/a | n/a | n/a | n/a | n/a | n/a | n/a | n/a | n/a | n/a | n/a | n/a | n/a | n/a | n/a | n/a | n/a | n/a | n/a | n/a | n/a | n/a | n/a | n/a | n/a | n/a | n/a | n/a | n/a | n/a | n/a | n/a | Schiffels2016;TestPaper1;TestBook1 | n/a | n/a | '------------'-------'----------------'----------------'-----------'-------------'-----------------'-------------'-----------------'---------------'---------------'---------------'---------'-------------'----------'------'----------'-----------'-----------'----------------'-------------------'-----------------------'------------------'-------------------'-----------------'-----------'---------------'--------------'---------------'--------------'---------------'--------------'-----'---------------'-----------------'-------------------------------'------------'---------'-------------------------'--------'---------------'-------------------'--------------------'--------------------'------------------------------'-----------------'------------------------------------'------'----------' diff --git a/test/PoseidonGoldenTests/GoldenTestData/listRemote/listRemote3 b/test/PoseidonGoldenTests/GoldenTestData/listRemote/listRemote3 index 49470cb1..661fd500 100644 --- a/test/PoseidonGoldenTests/GoldenTestData/listRemote/listRemote3 +++ b/test/PoseidonGoldenTests/GoldenTestData/listRemote/listRemote3 @@ -19,7 +19,7 @@ XXX017 POP1 Lamnidis_2018 1.0.1 True Lamnidis2018 XXX018 POP3 Lamnidis_2018 1.0.1 True Lamnidis2018 XXX019 POP1 Lamnidis_2018 1.0.1 True Lamnidis2018 XXX020 POP3 Lamnidis_2018 1.0.1 True Lamnidis2018 -SAMPLE0 1 Wang_2020 0.1.0 True +SAMPLE0 1 Wang_2020 0.1.0 True n/a SAMPLE1 2 Wang_2020 0.1.0 True TestPaper1 SAMPLE2 3 Wang_2020 0.1.0 True Wang2020;TestPaper1 SAMPLE3 4 Wang_2020 0.1.0 True Wang2020;TestBook2 diff --git a/test/PoseidonGoldenTests/GoldenTestData/listRemote/listRemote5 b/test/PoseidonGoldenTests/GoldenTestData/listRemote/listRemote5 index 66f95a8e..4a53c1a2 100644 --- a/test/PoseidonGoldenTests/GoldenTestData/listRemote/listRemote5 +++ b/test/PoseidonGoldenTests/GoldenTestData/listRemote/listRemote5 @@ -1,26 +1,26 @@ Individual Group Package PackageVersion Is Latest Genetic_Sex Alternative_IDs Relation_To Relation_Degree Relation_Type Relation_Note Collection_ID Country Country_ISO Location Site Latitude Longitude Date_Type Date_C14_Labnr Date_C14_Uncal_BP Date_C14_Uncal_BP_Err Date_BC_AD_Start Date_BC_AD_Median Date_BC_AD_Stop Date_Note MT_Haplogroup Y_Haplogroup Source_Tissue Nr_Libraries Library_Names Capture_Type UDG Library_Built Genotype_Ploidy Data_Preparation_Pipeline_URL Endogenous Nr_SNPs Coverage_on_Target_SNPs Damage Contamination Contamination_Err Contamination_Meas Contamination_Note Genetic_Source_Accession_IDs Primary_Contact Publication Note Keywords -XXX011 POP1 Lamnidis_2018 1.0.0 False M Lamnidis2018 -XXX012 POP2 Lamnidis_2018 1.0.0 False F Lamnidis2018 -XXX013 POP1 Lamnidis_2018 1.0.0 False M Lamnidis2018 -XXX014 POP2 Lamnidis_2018 1.0.0 False F Lamnidis2018 -XXX015 POP2 Lamnidis_2018 1.0.0 False M Lamnidis2018 -XXX016 POP2 Lamnidis_2018 1.0.0 False F Lamnidis2018 -XXX017 POP1 Lamnidis_2018 1.0.0 False M Lamnidis2018 -XXX018 POP3 Lamnidis_2018 1.0.0 False F Lamnidis2018 -XXX019 POP1 Lamnidis_2018 1.0.0 False F Lamnidis2018 -XXX099 POP3 Lamnidis_2018 1.0.0 False M Lamnidis2018 -XXX011 POP1 Lamnidis_2018 1.0.1 True M Lamnidis2018 -XXX012 POP2 Lamnidis_2018 1.0.1 True F Lamnidis2018 -XXX013 POP1 Lamnidis_2018 1.0.1 True M Lamnidis2018 -XXX014 POP2 Lamnidis_2018 1.0.1 True F Lamnidis2018 -XXX015 POP2 Lamnidis_2018 1.0.1 True M Lamnidis2018 -XXX016 POP2 Lamnidis_2018 1.0.1 True F Lamnidis2018 -XXX017 POP1 Lamnidis_2018 1.0.1 True M Lamnidis2018 -XXX018 POP3 Lamnidis_2018 1.0.1 True F Lamnidis2018 -XXX019 POP1 Lamnidis_2018 1.0.1 True F Lamnidis2018 -XXX020 POP3 Lamnidis_2018 1.0.1 True M Lamnidis2018 -SAMPLE0 1 Wang_2020 0.1.0 True F -SAMPLE1 2 Wang_2020 0.1.0 True M TestPaper1 -SAMPLE2 3 Wang_2020 0.1.0 True F Wang2020;TestPaper1 -SAMPLE3 4 Wang_2020 0.1.0 True M Wang2020;TestBook2 -SAMPLE4 5 Wang_2020 0.1.0 True F Wang2020;TestPaper1;TestBook2 +XXX011 POP1 Lamnidis_2018 1.0.0 False M n/a n/a n/a n/a n/a n/a n/a n/a n/a n/a n/a n/a n/a n/a n/a n/a n/a n/a n/a n/a n/a n/a n/a n/a n/a n/a n/a n/a n/a n/a n/a n/a n/a n/a n/a n/a n/a n/a n/a n/a Lamnidis2018 n/a n/a +XXX012 POP2 Lamnidis_2018 1.0.0 False F n/a n/a n/a n/a n/a n/a n/a n/a n/a n/a n/a n/a n/a n/a n/a n/a n/a n/a n/a n/a n/a n/a n/a n/a n/a n/a n/a n/a n/a n/a n/a n/a n/a n/a n/a n/a n/a n/a n/a n/a Lamnidis2018 n/a n/a +XXX013 POP1 Lamnidis_2018 1.0.0 False M n/a n/a n/a n/a n/a n/a n/a n/a n/a n/a n/a n/a n/a n/a n/a n/a n/a n/a n/a n/a n/a n/a n/a n/a n/a n/a n/a n/a n/a n/a n/a n/a n/a n/a n/a n/a n/a n/a n/a n/a Lamnidis2018 n/a n/a +XXX014 POP2 Lamnidis_2018 1.0.0 False F n/a n/a n/a n/a n/a n/a n/a n/a n/a n/a n/a n/a n/a n/a n/a n/a n/a n/a n/a n/a n/a n/a n/a n/a n/a n/a n/a n/a n/a n/a n/a n/a n/a n/a n/a n/a n/a n/a n/a n/a Lamnidis2018 n/a n/a +XXX015 POP2 Lamnidis_2018 1.0.0 False M n/a n/a n/a n/a n/a n/a n/a n/a n/a n/a n/a n/a n/a n/a n/a n/a n/a n/a n/a n/a n/a n/a n/a n/a n/a n/a n/a n/a n/a n/a n/a n/a n/a n/a n/a n/a n/a n/a n/a n/a Lamnidis2018 n/a n/a +XXX016 POP2 Lamnidis_2018 1.0.0 False F n/a n/a n/a n/a n/a n/a n/a n/a n/a n/a n/a n/a n/a n/a n/a n/a n/a n/a n/a n/a n/a n/a n/a n/a n/a n/a n/a n/a n/a n/a n/a n/a n/a n/a n/a n/a n/a n/a n/a n/a Lamnidis2018 n/a n/a +XXX017 POP1 Lamnidis_2018 1.0.0 False M n/a n/a n/a n/a n/a n/a n/a n/a n/a n/a n/a n/a n/a n/a n/a n/a n/a n/a n/a n/a n/a n/a n/a n/a n/a n/a n/a n/a n/a n/a n/a n/a n/a n/a n/a n/a n/a n/a n/a n/a Lamnidis2018 n/a n/a +XXX018 POP3 Lamnidis_2018 1.0.0 False F n/a n/a n/a n/a n/a n/a n/a n/a n/a n/a n/a n/a n/a n/a n/a n/a n/a n/a n/a n/a n/a n/a n/a n/a n/a n/a n/a n/a n/a n/a n/a n/a n/a n/a n/a n/a n/a n/a n/a n/a Lamnidis2018 n/a n/a +XXX019 POP1 Lamnidis_2018 1.0.0 False F n/a n/a n/a n/a n/a n/a n/a n/a n/a n/a n/a n/a n/a n/a n/a n/a n/a n/a n/a n/a n/a n/a n/a n/a n/a n/a n/a n/a n/a n/a n/a n/a n/a n/a n/a n/a n/a n/a n/a n/a Lamnidis2018 n/a n/a +XXX099 POP3 Lamnidis_2018 1.0.0 False M n/a n/a n/a n/a n/a n/a n/a n/a n/a n/a n/a n/a n/a n/a n/a n/a n/a n/a n/a n/a n/a n/a n/a n/a n/a n/a n/a n/a n/a n/a n/a n/a n/a n/a n/a n/a n/a n/a n/a n/a Lamnidis2018 n/a n/a +XXX011 POP1 Lamnidis_2018 1.0.1 True M n/a n/a n/a n/a n/a n/a n/a n/a n/a n/a n/a n/a n/a n/a n/a n/a n/a n/a n/a n/a n/a n/a n/a n/a n/a n/a n/a n/a n/a n/a n/a n/a n/a n/a n/a n/a n/a n/a n/a n/a Lamnidis2018 n/a n/a +XXX012 POP2 Lamnidis_2018 1.0.1 True F n/a n/a n/a n/a n/a n/a n/a n/a n/a n/a n/a n/a n/a n/a n/a n/a n/a n/a n/a n/a n/a n/a n/a n/a n/a n/a n/a n/a n/a n/a n/a n/a n/a n/a n/a n/a n/a n/a n/a n/a Lamnidis2018 n/a n/a +XXX013 POP1 Lamnidis_2018 1.0.1 True M n/a n/a n/a n/a n/a n/a n/a n/a n/a n/a n/a n/a n/a n/a n/a n/a n/a n/a n/a n/a n/a n/a n/a n/a n/a n/a n/a n/a n/a n/a n/a n/a n/a n/a n/a n/a n/a n/a n/a n/a Lamnidis2018 n/a n/a +XXX014 POP2 Lamnidis_2018 1.0.1 True F n/a n/a n/a n/a n/a n/a n/a n/a n/a n/a n/a n/a n/a n/a n/a n/a n/a n/a n/a n/a n/a n/a n/a n/a n/a n/a n/a n/a n/a n/a n/a n/a n/a n/a n/a n/a n/a n/a n/a n/a Lamnidis2018 n/a n/a +XXX015 POP2 Lamnidis_2018 1.0.1 True M n/a n/a n/a n/a n/a n/a n/a n/a n/a n/a n/a n/a n/a n/a n/a n/a n/a n/a n/a n/a n/a n/a n/a n/a n/a n/a n/a n/a n/a n/a n/a n/a n/a n/a n/a n/a n/a n/a n/a n/a Lamnidis2018 n/a n/a +XXX016 POP2 Lamnidis_2018 1.0.1 True F n/a n/a n/a n/a n/a n/a n/a n/a n/a n/a n/a n/a n/a n/a n/a n/a n/a n/a n/a n/a n/a n/a n/a n/a n/a n/a n/a n/a n/a n/a n/a n/a n/a n/a n/a n/a n/a n/a n/a n/a Lamnidis2018 n/a n/a +XXX017 POP1 Lamnidis_2018 1.0.1 True M n/a n/a n/a n/a n/a n/a n/a n/a n/a n/a n/a n/a n/a n/a n/a n/a n/a n/a n/a n/a n/a n/a n/a n/a n/a n/a n/a n/a n/a n/a n/a n/a n/a n/a n/a n/a n/a n/a n/a n/a Lamnidis2018 n/a n/a +XXX018 POP3 Lamnidis_2018 1.0.1 True F n/a n/a n/a n/a n/a n/a n/a n/a n/a n/a n/a n/a n/a n/a n/a n/a n/a n/a n/a n/a n/a n/a n/a n/a n/a n/a n/a n/a n/a n/a n/a n/a n/a n/a n/a n/a n/a n/a n/a n/a Lamnidis2018 n/a n/a +XXX019 POP1 Lamnidis_2018 1.0.1 True F n/a n/a n/a n/a n/a n/a n/a n/a n/a n/a n/a n/a n/a n/a n/a n/a n/a n/a n/a n/a n/a n/a n/a n/a n/a n/a n/a n/a n/a n/a n/a n/a n/a n/a n/a n/a n/a n/a n/a n/a Lamnidis2018 n/a n/a +XXX020 POP3 Lamnidis_2018 1.0.1 True M n/a n/a n/a n/a n/a n/a n/a n/a n/a n/a n/a n/a n/a n/a n/a n/a n/a n/a n/a n/a n/a n/a n/a n/a n/a n/a n/a n/a n/a n/a n/a n/a n/a n/a n/a n/a n/a n/a n/a n/a Lamnidis2018 n/a n/a +SAMPLE0 1 Wang_2020 0.1.0 True F n/a n/a n/a n/a n/a n/a n/a n/a n/a n/a n/a n/a n/a n/a n/a n/a n/a n/a n/a n/a n/a n/a n/a n/a n/a n/a n/a n/a n/a n/a n/a n/a n/a n/a n/a n/a n/a n/a n/a n/a n/a n/a n/a +SAMPLE1 2 Wang_2020 0.1.0 True M n/a n/a n/a n/a n/a n/a n/a n/a n/a n/a n/a n/a n/a n/a n/a n/a n/a n/a n/a n/a n/a n/a n/a n/a n/a n/a n/a n/a n/a n/a n/a n/a n/a n/a n/a n/a n/a n/a n/a n/a TestPaper1 n/a n/a +SAMPLE2 3 Wang_2020 0.1.0 True F n/a n/a n/a n/a n/a n/a n/a n/a n/a n/a n/a n/a n/a n/a n/a n/a n/a n/a n/a n/a n/a n/a n/a n/a n/a n/a n/a n/a n/a n/a n/a n/a n/a n/a n/a n/a n/a n/a n/a n/a Wang2020;TestPaper1 n/a n/a +SAMPLE3 4 Wang_2020 0.1.0 True M n/a n/a n/a n/a n/a n/a n/a n/a n/a n/a n/a n/a n/a n/a n/a n/a n/a n/a n/a n/a n/a n/a n/a n/a n/a n/a n/a n/a n/a n/a n/a n/a n/a n/a n/a n/a n/a n/a n/a n/a Wang2020;TestBook2 n/a n/a +SAMPLE4 5 Wang_2020 0.1.0 True F n/a n/a n/a n/a n/a n/a n/a n/a n/a n/a n/a n/a n/a n/a n/a n/a n/a n/a n/a n/a n/a n/a n/a n/a n/a n/a n/a n/a n/a n/a n/a n/a n/a n/a n/a n/a n/a n/a n/a n/a Wang2020;TestPaper1;TestBook2 n/a n/a diff --git a/test/PoseidonGoldenTests/GoldenTestData/timetravel/Schiffels-1.1.1/POSEIDON.yml b/test/PoseidonGoldenTests/GoldenTestData/timetravel/Schiffels-1.1.1/POSEIDON.yml index 1feb73d5..1e71dd7f 100644 --- a/test/PoseidonGoldenTests/GoldenTestData/timetravel/Schiffels-1.1.1/POSEIDON.yml +++ b/test/PoseidonGoldenTests/GoldenTestData/timetravel/Schiffels-1.1.1/POSEIDON.yml @@ -16,7 +16,7 @@ genotypeData: indFile: ind.txt snpSet: Other jannoFile: Schiffels.janno -jannoFileChkSum: fd632717ecaf337a39cfd7a828a54e99 +jannoFileChkSum: 083fe7ef4206c979356a3a2454d780b1 bibFile: Schiffels.bib bibFileChkSum: 9edc4a757f785a8ecb59c54d16c5690a changelogFile: CHANGELOG.md diff --git a/test/PoseidonGoldenTests/GoldenTestData/timetravel/Schiffels-1.1.1/Schiffels.janno b/test/PoseidonGoldenTests/GoldenTestData/timetravel/Schiffels-1.1.1/Schiffels.janno index 3bf96b2c..c80c86ca 100644 --- a/test/PoseidonGoldenTests/GoldenTestData/timetravel/Schiffels-1.1.1/Schiffels.janno +++ b/test/PoseidonGoldenTests/GoldenTestData/timetravel/Schiffels-1.1.1/Schiffels.janno @@ -1,11 +1,11 @@ -Poseidon_ID Genetic_Sex Group_Name Alternative_IDs Relation_To Relation_Degree Relation_Type Relation_Note Collection_ID Country Country_ISO Location Site Latitude Longitude Date_Type Date_C14_Labnr Date_C14_Uncal_BP Date_C14_Uncal_BP_Err Date_BC_AD_Start Date_BC_AD_Median Date_BC_AD_Stop Date_Note MT_Haplogroup Y_Haplogroup Source_Tissue Nr_Libraries Library_Names Capture_Type UDG Library_Built Genotype_Ploidy Data_Preparation_Pipeline_URL Endogenous Nr_SNPs Coverage_on_Target_SNPs Damage Contamination Contamination_Err Contamination_Meas Contamination_Note Genetic_Source_Accession_IDs Primary_Contact Publication Note Keywords -XXX001 M POP1 n/a n/a n/a n/a n/a n/a n/a n/a n/a n/a n/a n/a n/a n/a n/a n/a n/a n/a n/a n/a n/a n/a n/a n/a n/a n/a n/a n/a n/a n/a n/a n/a n/a n/a n/a n/a n/a n/a n/a n/a n/a n/a n/a -XXX002 F POP2 n/a n/a n/a n/a n/a n/a n/a n/a n/a n/a n/a n/a n/a n/a n/a n/a n/a n/a n/a n/a n/a n/a n/a n/a n/a n/a n/a n/a n/a n/a n/a n/a n/a n/a n/a n/a n/a n/a n/a n/a n/a n/a n/a -XXX003 M POP1 n/a n/a n/a n/a n/a n/a n/a n/a n/a n/a n/a n/a n/a n/a n/a n/a n/a n/a n/a n/a n/a n/a n/a n/a n/a n/a n/a n/a n/a n/a n/a n/a n/a n/a n/a n/a n/a n/a n/a n/a n/a n/a n/a -XXX004 F POP2 n/a n/a n/a n/a n/a n/a n/a n/a n/a n/a n/a n/a n/a n/a n/a n/a n/a n/a n/a n/a n/a n/a n/a n/a n/a n/a n/a n/a n/a n/a n/a n/a n/a n/a n/a n/a n/a n/a n/a n/a n/a n/a n/a -XXX005 M POP2 n/a n/a n/a n/a n/a n/a n/a n/a n/a n/a n/a n/a n/a n/a n/a n/a n/a n/a n/a n/a n/a n/a n/a n/a n/a n/a n/a n/a n/a n/a n/a n/a n/a n/a n/a n/a n/a n/a n/a n/a n/a n/a n/a -XXX006 F POP2 n/a n/a n/a n/a n/a n/a n/a n/a n/a n/a n/a n/a n/a n/a n/a n/a n/a n/a n/a n/a n/a n/a n/a n/a n/a n/a n/a n/a n/a n/a n/a n/a n/a n/a n/a n/a n/a n/a n/a n/a n/a n/a n/a -XXX007 M POP1 n/a n/a n/a n/a n/a n/a n/a n/a n/a n/a n/a n/a n/a n/a n/a n/a n/a n/a n/a n/a n/a n/a n/a n/a n/a n/a n/a n/a n/a n/a n/a n/a n/a n/a n/a n/a n/a n/a n/a n/a n/a n/a n/a -XXX008 F POP3 n/a n/a n/a n/a n/a n/a n/a n/a n/a n/a n/a n/a n/a n/a n/a n/a n/a n/a n/a n/a n/a n/a n/a n/a n/a n/a n/a n/a n/a n/a n/a n/a n/a n/a n/a n/a n/a n/a n/a n/a n/a n/a n/a -XXX009 F POP1 n/a n/a n/a n/a n/a n/a n/a n/a n/a n/a n/a n/a n/a n/a n/a n/a n/a n/a n/a n/a n/a n/a n/a n/a n/a n/a n/a n/a n/a n/a n/a n/a n/a n/a n/a n/a n/a n/a n/a n/a n/a n/a n/a -XXX010 M POP3 n/a n/a n/a n/a n/a n/a n/a n/a n/a n/a n/a n/a n/a n/a n/a n/a n/a n/a n/a n/a n/a n/a n/a n/a n/a n/a n/a n/a n/a n/a n/a n/a n/a n/a n/a n/a n/a n/a n/a n/a n/a n/a n/a +Poseidon_ID Genetic_Sex Group_Name +XXX001 M POP1 +XXX002 F POP2 +XXX003 M POP1 +XXX004 F POP2 +XXX005 M POP2 +XXX006 F POP2 +XXX007 M POP1 +XXX008 F POP3 +XXX009 F POP1 +XXX010 M POP3 diff --git a/test/PoseidonGoldenTests/GoldenTestsRunCommands.hs b/test/PoseidonGoldenTests/GoldenTestsRunCommands.hs index 8462a70a..2f9fbfe7 100644 --- a/test/PoseidonGoldenTests/GoldenTestsRunCommands.hs +++ b/test/PoseidonGoldenTests/GoldenTestsRunCommands.hs @@ -554,6 +554,7 @@ testPipelineRectify testDir checkFilePath = do , _rectifyPackageVersionUpdate = Just (PackageVersionUpdate Major (Just "test1")) , _rectifyChecksums = ChecksumNone , _rectifyNewContributors = Nothing + , _rectifyJannoRemoveEmptyCols = False , _rectifyOnlyLatest = False } let action1 = testLog (runRectify rectifyOpts1) >> patchLastModified testDir ("init" "Schiffels" "POSEIDON.yml") @@ -568,6 +569,7 @@ testPipelineRectify testDir checkFilePath = do , _rectifyPackageVersionUpdate = Just (PackageVersionUpdate Minor (Just "test2")) , _rectifyChecksums = ChecksumAll , _rectifyNewContributors = Nothing + , _rectifyJannoRemoveEmptyCols = False , _rectifyOnlyLatest = False } let action2 = testLog (runRectify rectifyOpts2) >> patchLastModified testDir ("init" "Schiffels" "POSEIDON.yml") @@ -585,6 +587,7 @@ testPipelineRectify testDir checkFilePath = do ContributorSpec "Josiah Carberry" "carberry@brown.edu" (Just $ ORCID {_orcidNums = "000000021825009", _orcidChecksum = '7'}) , ContributorSpec "Herbert Testmann" "herbert@testmann.tw" Nothing ] + , _rectifyJannoRemoveEmptyCols = False , _rectifyOnlyLatest = False } let action3 = testLog (runRectify rectifyOpts3) >> patchLastModified testDir ("init" "Schiffels" "POSEIDON.yml") @@ -592,6 +595,22 @@ testPipelineRectify testDir checkFilePath = do "init" "Schiffels" "POSEIDON.yml" , "init" "Schiffels" "CHANGELOG.md" ] + let rectifyOpts4 = RectifyOptions { + _rectifyBaseDirs = [testDir "init" "Schiffels"] + , _rectifyPoseidonVersion = Nothing + , _rectifyIgnorePoseidonVersion = False + , _rectifyPackageVersionUpdate = Nothing + , _rectifyChecksums = ChecksumAll + , _rectifyNewContributors = Nothing + , _rectifyJannoRemoveEmptyCols = True + , _rectifyOnlyLatest = False + } + let action4 = testLog (runRectify rectifyOpts4) >> patchLastModified testDir ("init" "Schiffels" "POSEIDON.yml") + runAndChecksumFiles checkFilePath testDir action4 "rectify" [ + "init" "Schiffels" "POSEIDON.yml" + , "init" "Schiffels" "CHANGELOG.md" + , "init" "Schiffels" "Schiffels.janno" + ] testPipelineForge :: FilePath -> FilePath -> IO () testPipelineForge testDir checkFilePath = do