diff --git a/test_data/cmqt_hematology.tsv b/test_data/cmqt_hematology.tsv index e119655..1eaa6e2 100644 --- a/test_data/cmqt_hematology.tsv +++ b/test_data/cmqt_hematology.tsv @@ -1,21 +1,21 @@ subject_id age_at_obs visit rbc_1 hemoglobin_1 hematocrit_1 mcv_1 mch_1 mchc_1 rdw_1 wbc_1 basophil_count_1 eosinophil_count_1 lymphocyte_count_1 monocyte_count_1 neutrophil_count_1 platelet_count_1 mean_platelet_volume_1 -subject1 59 visit_1 4.325132294295363 17.622444942612933 0.937483450479749 2.1675254921479365 35.86295385902645 36.57385666659503 10.684801935982016 7.600293163441274 300.04998709787844 234.20340890495638 274.98394655251263 571.473014377524 3422.0048029466243 603.2111681998314 7.521621937029895 -subject2 46 visit_1 3.186261141604862 13.495507059129762 0.47261415383917543 1.4832875675756076 40.12890149360826 33.57170067452322 9.884886490458578 5.00070481215926 271.93289907884605 249.08294804171615 1371.0717294977026 295.21997318589365 5333.678600210294 795.4598875730798 8.99155813908785 -subject3 55 visit_1 5.336716967608491 16.92286708076371 0.917004934566857 1.7182941125277411 35.374556470925036 32.8505090713972 9.643524820181518 13.621280351191137 115.56358479576589 106.8000974030938 1681.711161646161 419.7753967516861 3726.737559935488 623.0899589794328 12.633563355254331 -subject4 55 visit_1 4.8939708657812115 16.86477063376474 -0.2752194303459178 -0.5623642598084516 42.12738940450381 31.05854591141534 9.894228392360946 6.987834703933746 262.1985390347415 57.21080161022263 -322.58831749571505 553.9207716309046 4448.178615431377 897.0080877678893 11.58886038213768 -subject5 62 visit_1 6.453427001669459 14.778690821944084 0.07160256894761835 0.11095278358164622 38.262766021325355 31.934523134355 10.04488279008542 10.919810865991021 127.73862196484127 297.5765094607528 3200.542669889818 373.21582744134145 6234.413334245976 633.6938753648045 10.97006835064897 -subject6 55 visit_1 5.033913162879584 12.1511689470332 0.055141542360093165 0.10954011437207664 37.536623102170125 31.386950289520662 8.273826768011807 10.963483792590361 155.05213748633423 45.365881222933666 583.8208336334947 602.4672580543775 1123.0112048529631 1034.6301641752973 14.742063625852968 -subject7 61 visit_1 2.0781300548482653 16.767652076799553 0.439537475655182 2.1150624073298183 37.20528895405309 32.323495185361715 11.5557870203106 5.176230174420642 80.44939499311161 201.77034792190517 1680.4596689057294 207.79126927194477 5268.731449623816 812.2030926987908 9.436589902978806 -subject8 65 visit_1 3.680283221082456 15.729517453685874 0.24973794232065624 0.6785834875154052 39.77886416456275 31.73869263795044 10.776412691732506 9.04755678171443 239.04723630168436 122.52825987780575 1740.8428474014622 505.63283175288973 3001.610392770148 831.3507242668209 10.397990954360015 -subject9 66 visit_1 6.844809807863908 10.21591568477695 0.6895616621137035 1.0074226771377572 39.05233807899346 34.73749635056603 8.901492491246513 6.216743954936394 148.36233573634303 177.06577127571126 1557.3258583450393 560.5533907121132 6252.544874980189 893.7811511205126 11.62047044172219 -subject10 51 visit_1 6.6652948205240845 16.720542514009427 -0.3189528074290151 -0.4785276810965373 37.65745351407476 33.59639395933824 8.271980246357806 0.8532715059663865 290.9868977935881 172.56178956099063 1120.5514628579476 466.64368158983604 3799.630625916291 909.0321590809087 9.7554828289856 -subject11 61 visit_1 4.8499067472704755 13.460392538663887 0.13450274336951068 0.2773305763975952 38.31735379488651 31.444680194453674 10.427638224556889 11.234056921132225 287.69846529586744 379.60637815269996 609.8723207400225 427.453770274667 1780.3159678502925 879.1204326117057 12.015438884874985 -subject12 55 visit_1 4.023579181006855 16.15579773696883 0.15050940450832806 0.3740684543224642 37.02866986765515 32.40397503866285 10.744564645243804 10.004735315067858 118.38041901281272 152.18871006333444 1299.57719753351 427.1587669181431 5315.848523890034 615.7273309314264 11.035164284836954 -subject13 52 visit_1 4.574586007775727 10.737366361547448 0.3681470272647353 0.8047657791086918 36.08218785000159 34.318164845892 10.865220797014493 5.106122999806655 353.92932698972027 140.52371469927994 1865.5808964445987 424.6810773155952 3913.407971480952 664.6854778104007 9.540057216236947 -subject14 66 visit_1 3.932294326130037 8.553432641046307 0.5742499051317631 1.4603431419562902 38.36103458421411 35.22959526628691 10.305328810056075 2.074288004406199 337.45257156092345 -25.793821702835913 91.2529902161823 656.8273331958253 5256.778450014236 411.22093885184114 9.664732442940606 -subject15 57 visit_1 4.051527861095489 15.583395617493153 1.1883603878896962 2.9331166627307272 39.443468565637836 35.37589592477283 9.885977208752555 6.245678297815839 151.67512888341756 368.26072117979635 953.8288439859309 608.3189858480944 2126.3415749328706 823.9966313289008 5.0479167273722645 -subject16 57 visit_1 4.25354016132746 11.786440507729012 0.16129653099634933 0.3792053792340621 37.260919043758406 33.90589797788752 10.423652240248318 10.907831108617831 255.03499503389 207.22906844212528 649.8029555728975 345.7409254647473 3285.2331896932055 1053.2154539560975 8.797691547079966 -subject17 67 visit_1 5.747540258541509 12.317783748179153 0.17899711535641527 0.31143255602325687 38.47507662507931 38.66064335659898 9.202290313193137 9.656876977815678 114.26343369929609 155.9975906826424 410.40832921490255 449.1612599622644 3909.8541641364536 580.4026398921327 10.063017221093515 -subject18 59 visit_1 3.933694004121869 15.802288512587474 0.6783866534804426 1.724553696270234 36.66815577517017 32.844868018038014 9.395802750630239 7.753533497858336 129.30386338275255 262.6573392588267 2777.029887306173 316.59121069599075 3303.892279283257 887.5812916491656 12.452249176572817 -subject19 67 visit_1 3.849447336121143 11.602312360627149 0.33773441415680605 0.8773581885058875 36.406384980314485 35.936958268583695 11.7150105937509 2.9698587246794848 -9.707753342933955 120.02039405625881 104.52486148489174 464.653602921763 3282.0521893331625 923.2786087419738 8.601570381694092 -subject20 62 visit_1 3.5748331466896133 11.08736950428935 0.9395592780790926 2.6282605076243866 37.89660613737723 33.44492874507535 9.284051722201893 11.637822281053985 309.9436754759688 87.2013977768164 3050.4948348315243 371.21765760935324 4791.230490643542 803.573928456392 6.9917024211199426 +subject1 59 visit_1 4.331242107540918 14.699831955867218 1.0507007173563738 2.425864662534217 38.306928369408766 36.68741726479722 9.33625684885929 4.837801587922566 71.42772404350012 94.27227724731605 10.65974915778088 92.64244538466608 67.63941344781097 736.8528701918846 12.156038334456646 +subject2 46 visit_1 0.6490170494106229 21.12323036312705 0.25918453116543316 3.9934934128587307 35.066673320966075 35.10191109304475 10.330876844482647 7.20416513742026 79.39636294584326 96.77233454209555 62.15570094970758 93.96357057999614 65.78050849353485 698.0350961379306 7.553121986292599 +subject3 55 visit_1 3.1980202589448847 13.047185612998463 0.5375344561422558 1.6808350561218874 40.10386511486943 34.36307073793644 9.3762735204598755 11.200648410483769 48.88121147558951 58.93912225932215 22.321686175271225 79.93157314915618 78.02542645121639 578.0545075181684 11.336490679094158 +subject4 55 visit_1 3.1263743668291184 12.924394473329048 0.20262728579993228 0.6481222720791566 40.72793324820852 36.76992766588175 10.081419678713079 6.134925878556956 97.00901780820928 51.03445334772283 90.0376464491842 74.33729324054906 30.01939965825568 810.6677990274707 7.639034212955718 +subject5 62 visit_1 5.340715423573847 14.149192814228957 0.961091097136232 1.7995549676621758 36.49157757418824 36.58502471622523 9.920367569109894 4.122746433104384 31.185114488057593 45.50139768568556 57.8448072929441 74.33198103732025 81.40702468371228 979.8198153207237 8.070750625543084 +subject6 55 visit_1 3.0500120361002647 15.872085292265494 0.10389887095259559 0.3406506916131398 38.65608445705722 30.867105720639945 10.18757961117527 9.79678417198308 61.22373470412549 15.56409593425434 25.968998061953926 36.07140212522006 55.974919301464524 460.46475274142426 4.829004093854326 +subject7 61 visit_1 4.898715793982734 12.864617239095438 0.9536798790737273 1.9467956892807825 35.03562180804909 30.62390278207973 10.43562475975714 14.195821163793196 72.0935297201866 15.276083235005075 74.26374632377974 80.13123679754148 63.14665804360129 700.5809197907139 6.049535145450654 +subject8 65 visit_1 5.978826777809061 16.00499616517567 0.9333799093905899 1.5611422509427955 38.07448401003646 38.5676104111825 9.200891240400765 5.514167198490328 98.56613688039826 29.772883761288625 27.885157284530123 81.65744798624922 48.47308829934582 851.8412695389802 10.276039822533358 +subject9 66 visit_1 6.456227524503385 13.103082604607906 0.691945093478521 1.0717483094459959 39.72226371777236 32.35801282228957 11.970900990481827 8.407161180831487 85.78047607122514 28.587851084480377 76.55138112768714 83.176752761290345 46.68863779671028 906.2353440351303 8.830453411428179 +subject10 51 visit_1 1.8585079840661032 13.224158007248933 0.5368324581033729 2.888513058355949 41.815538156982306 36.93759254094799 10.875624035500651 6.827592319362273 61.459014070450024 84.94724259419142 96.03383508037382 27.33603824459749 97.0884073963125 650.5337788435525 12.809173350157668 +subject11 61 visit_1 5.038398349541582 13.507104596895823 0.385568952474845 0.7652609534335965 37.19096031542644 32.27570772185876 9.40324132625517 7.322427283778194 53.24530426480112 19.77684802955605 49.685158953081555 29.513045299988676 67.49661696302564 907.9834930821021 11.93855445597262 +subject12 55 visit_1 3.164376155023718 10.870990649246837 0.7173750797582257 2.2670347790964462 38.670933254618845 31.71671126150096 9.744384026449396 5.378905951845624 8.4349891455212 75.11231898863137 91.44127828763908 97.28269461946172 84.839729514792 520.2914742217849 13.170023303923719 +subject13 52 visit_1 2.1072189633830214 16.49509377712789 0.941302211920198 4.467035596571275 37.54518918214765 34.19768738212932 9.44749277902548 6.828305332148935 73.79284419739945 35.57231620975256 99.0685898491156 98.38209897507045 22.095863207618095 589.093879395676 11.104585125000993 +subject14 66 visit_1 6.531223987188424 14.192694888090621 0.7967450472284645 1.2199015816810916 37.206056033510244 32.78847995045633 9.982435738478829 5.330558522765378 97.8167732176243 66.63150241736679 24.389152077818153 88.02449089787314 19.080751758793213 705.5060479810853 10.393691497825055 +subject15 57 visit_1 3.6888878001464 12.867416595874264 0.8100279740111506 2.1958596137811597 39.86819231089057 33.24868973829392 10.695966638651418 10.676300620280028 42.0384670478268 25.273330428640776 29.472236180941763 93.58004215951803 28.28153386847771 817.845017374823 9.835689755023369 +subject16 57 visit_1 3.8387251164439995 18.68845527121347 0.4130665035858365 1.0760512697728157 38.99113682714732 31.24404162103528 10.026817792153352 11.55648022781224 91.01508567928023 0.7303644154252709 71.66503914633745 92.50372265149338 59.27362056677657 805.4123743012162 12.300959536797052 +subject17 67 visit_1 6.8473317646864995 12.698924635972869 0.19861312771314057 0.2900591566739047 37.068208237656556 35.44780830112809 9.844336035800064 9.588419550006606 37.1110597034245 77.4808808162987 84.19512572069016 52.078220338043195 95.88002580707143 653.762105604393 6.646578015284696 +subject18 59 visit_1 4.324289957643888 13.932680937521425 0.1958217641468802 0.45284142845401315 37.70480218882887 33.72078973767995 10.809597015514536 6.244331249967679 44.95512367435171 40.63588105728326 48.12692674732034 57.738195580550155 26.119343846592074 999.2530795459547 12.79798374411447 +subject19 67 visit_1 6.667937982954537 12.149701457099965 0.9353034472497997 1.4026876819201766 36.724913033950294 30.405235842855383 11.348898207846023 7.50277481368734 64.62057896292924 59.381829864982564 40.572445263914005 29.447147916447022 24.611362824565276 311.2736854250777 12.425215195338607 +subject20 62 visit_1 5.07211015424058 5.5650216694648265 0.7143852596478991 1.4084576989137971 35.77725913248309 35.056223678308804 8.53216220346032 1.610828711104471 86.77092059988642 82.49153079927703 9.94479230358479 89.43651066161601 28.236995685596412 929.0797952542335 10.555195850440816 diff --git a/test_data/phenotype_harmonized.tsv b/test_data/phenotype_harmonized.tsv index 97d601e..36f6253 100644 --- a/test_data/phenotype_harmonized.tsv +++ b/test_data/phenotype_harmonized.tsv @@ -1,10 +1,10 @@ domain md5sum file_path file_readme_path n_subjects n_rows -population_descriptor a3b245349c56f8805dbb11d7aa331950 gs://fc-e3b6ff37-761e-4e53-89c0-fb243b8bd8e5/test_data/population_descriptor.tsv gs://fc-e3b6ff37-761e-4e53-89c0-fb243b8bd8e5/test_data/readme.tsv 20 20 +population_descriptor 98316ca7ae3b5332e28e916155b844d3 gs://fc-e3b6ff37-761e-4e53-89c0-fb243b8bd8e5/test_data/population_descriptor.tsv gs://fc-e3b6ff37-761e-4e53-89c0-fb243b8bd8e5/test_data/readme.tsv 20 20 cmqt_flags 99dee9ebbef7e7a0681d4ae5b3b0063e gs://fc-e3b6ff37-761e-4e53-89c0-fb243b8bd8e5/test_data/cmqt_flags.tsv gs://fc-e3b6ff37-761e-4e53-89c0-fb243b8bd8e5/test_data/readme.tsv 20 20 cmqt_anthropometry d26b5af92459c0961442e2dcf7ce9235 gs://fc-e3b6ff37-761e-4e53-89c0-fb243b8bd8e5/test_data/cmqt_anthropometry.tsv gs://fc-e3b6ff37-761e-4e53-89c0-fb243b8bd8e5/test_data/readme.tsv 20 20 cmqt_blood_pressure 9877023cd800d4235e1b99a650f88694 gs://fc-e3b6ff37-761e-4e53-89c0-fb243b8bd8e5/test_data/cmqt_blood_pressure.tsv gs://fc-e3b6ff37-761e-4e53-89c0-fb243b8bd8e5/test_data/readme.tsv 20 20 cmqt_lipids 17ce825be3d94425e26c08987fa78cd9 gs://fc-e3b6ff37-761e-4e53-89c0-fb243b8bd8e5/test_data/cmqt_lipids.tsv gs://fc-e3b6ff37-761e-4e53-89c0-fb243b8bd8e5/test_data/readme.tsv 20 20 -cmqt_hematology 01f2848bccf4ac09c8addd2434323a0b gs://fc-e3b6ff37-761e-4e53-89c0-fb243b8bd8e5/test_data/cmqt_hematology.tsv gs://fc-e3b6ff37-761e-4e53-89c0-fb243b8bd8e5/test_data/readme.tsv 20 20 +cmqt_hematology 155f8eac3c84a91fdb17eff3739e7799 gs://fc-e3b6ff37-761e-4e53-89c0-fb243b8bd8e5/test_data/cmqt_hematology.tsv gs://fc-e3b6ff37-761e-4e53-89c0-fb243b8bd8e5/test_data/readme.tsv 20 20 cmqt_glycemic 4af06300bac223b5462356532fa98729 gs://fc-e3b6ff37-761e-4e53-89c0-fb243b8bd8e5/test_data/cmqt_glycemic.tsv gs://fc-e3b6ff37-761e-4e53-89c0-fb243b8bd8e5/test_data/readme.tsv 20 20 cmqt_kidney_function 35962811d3e9c081de82e4f3f8e4bfb5 gs://fc-e3b6ff37-761e-4e53-89c0-fb243b8bd8e5/test_data/cmqt_kidney_function.tsv gs://fc-e3b6ff37-761e-4e53-89c0-fb243b8bd8e5/test_data/readme.tsv 20 20 diabetes_diabetes bf4ff29e1312614c66a08a27b4d129c5 gs://fc-e3b6ff37-761e-4e53-89c0-fb243b8bd8e5/test_data/diabetes_diabetes.tsv gs://fc-e3b6ff37-761e-4e53-89c0-fb243b8bd8e5/test_data/readme.tsv 20 20 diff --git a/test_data/population_descriptor.tsv b/test_data/population_descriptor.tsv index 4d86b8b..92b22ae 100644 --- a/test_data/population_descriptor.tsv +++ b/test_data/population_descriptor.tsv @@ -1,21 +1,21 @@ -subject_id population_descriptor_id population_descriptor population_label country_of_recruitment country_of_birth -subject1 022f19bfe0b628e1 population|superpopulation MSL|AFR USA Sierra Leone -subject2 01bb18a183122d64 population|superpopulation IBS|EUR Peru UK -subject3 01bb18a183122d64 population|superpopulation MXL|AMR Sierra Leone USA -subject4 01bb18a183122d64 population|superpopulation PEL|AMR Sierra Leone Sierra Leone -subject5 0224684f6cb9e980 population|superpopulation MSL|AFR Spain Sierra Leone -subject6 01bb18a183122d64 population|superpopulation PEL|AMR UK Peru -subject7 0224684f6cb9e980 population|superpopulation MSL|AFR Peru Peru -subject8 0224684f6cb9e980 population|superpopulation MSL|AFR USA Sierra Leone -subject9 0224684f6cb9e980 population|superpopulation GBR|EUR Sierra Leone Spain -subject10 01bb18a183122d64 population|superpopulation MXL|AMR Sierra Leone Sierra Leone -subject11 0224684f6cb9e980 population|superpopulation IBS|EUR Spain Peru -subject12 01bb18a183122d64 population|superpopulation GBR|EUR UK Peru -subject13 01bb18a183122d64 population|superpopulation MSL|AFR USA USA -subject14 0224684f6cb9e980 population|superpopulation MSL|AFR Spain Spain -subject15 022f19bfe0b628e1 population|superpopulation MSL|AFR Sierra Leone Spain -subject16 022f19bfe0b628e1 population|superpopulation MXL|AMR UK Peru -subject17 0224684f6cb9e980 population|superpopulation PEL|AMR Spain UK -subject18 022f19bfe0b628e1 population|superpopulation PEL|AMR USA USA -subject19 0224684f6cb9e980 population|superpopulation MSL|AFR Spain Peru -subject20 0224684f6cb9e980 population|superpopulation GBR|EUR Peru UK +subject_id population_descriptor population_label country_of_recruitment country_of_birth +subject1 population|superpopulation GBR|EUR Sierra Leone USA +subject2 population|superpopulation MSL|AFR Spain Peru +subject3 population|superpopulation MXL|AMR USA Sierra Leone +subject4 population|superpopulation MXL|AMR Peru Sierra Leone +subject5 population|superpopulation GBR|EUR Sierra Leone Spain +subject6 population|superpopulation MSL|AFR Peru UK +subject7 population|superpopulation MXL|AMR Sierra Leone Peru +subject8 population|superpopulation MSL|AFR Sierra Leone USA +subject9 population|superpopulation MXL|AMR UK Sierra Leone +subject10 population|superpopulation MXL|AMR USA Sierra Leone +subject11 population|superpopulation MXL|AMR Spain Spain +subject12 population|superpopulation IBS|EUR UK UK +subject13 population|superpopulation MSL|AFR Sierra Leone USA +subject14 population|superpopulation GBR|EUR Sierra Leone Spain +subject15 population|superpopulation MXL|AMR Sierra Leone Sierra Leone +subject16 population|superpopulation MSL|AFR USA UK +subject17 population|superpopulation MXL|AMR Peru Spain +subject18 population|superpopulation GBR|EUR Peru USA +subject19 population|superpopulation IBS|EUR Sierra Leone Spain +subject20 population|superpopulation PEL|AMR UK Peru diff --git a/test_data/test_files.R b/test_data/test_files.R index 6f4b076..2c067d1 100644 --- a/test_data/test_files.R +++ b/test_data/test_files.R @@ -40,8 +40,8 @@ subject <- tibble( subject_id = paste0("subject", 1:n), age_at_obs=round(rtnorm(n, 58, 5, 0, 90)), consent_code = sample(x = c("GRU", "HMB-IRB", "DS-CVD"), size = n, replace = TRUE), - study_nickname = sample(x = c("UKBB", "JHS", "ARIC"), size = n, replace = TRUE), - dbgap_submission = c(rep(TRUE, 2), rep(FALSE, n-2)), + study_nickname = sample(x = c("UKBB", "JHS", "ARIC"), size = n, replace = TRUE), + dbgap_submission = c(rep(TRUE, 2), rep(FALSE, n-2)), reported_sex = sample(x = c("Female", "Male", "Unknown", "Other"), size = n, replace = TRUE) ) @@ -51,7 +51,7 @@ population_descriptor <- tibble( subject_id=rep(subject$subject_id), # population_descriptor_id = sample(x = c("01bb18a183122d64", "022f19bfe0b628e1", "0224684f6cb9e980"), size = n, replace = TRUE), population_descriptor = sample(x = c("population|superpopulation"), size = n, replace = TRUE), - population_label = sample(x = c("PEL|AMR", "IBS|EUR", "MXL|AMR", "GBR|EUR", "MSL|AFR"), size = n, replace = TRUE), + population_label = sample(x = c("PEL|AMR", "IBS|EUR", "MXL|AMR", "GBR|EUR", "MSL|AFR"), size = n, replace = TRUE), country_of_recruitment = sample(x = c("Peru", "Spain", "USA", "UK", "Sierra Leone"), size = n, replace = TRUE), country_of_birth = sample(x = c("Peru", "Spain", "USA", "UK", "Sierra Leone"), size = n, replace = TRUE) ) @@ -122,21 +122,21 @@ cmqt_hematology <- tibble( subject_id=rep(subject$subject_id), age_at_obs=rep(subject$age_at_obs), visit=rep("visit_1", n), - rbc_1=rnorm(n, 4, 1.5), - hemoglobin_1=rnorm(n, 13, 3), - hematocrit_1=rnorm(n, 0.4, 0.4), + rbc_1=rtnorm(n, 4, 1.5, a=0, b=100), + hemoglobin_1=rtnorm(n, 13, 3, a=0, b=100), + hematocrit_1=rtnorm(n, 0.4, 0.4, a=0, b=100), mcv_1=(hematocrit_1 * 10) / rbc_1, - mch_1=rnorm(n, 38, 2), - mchc_1=rnorm(n, 34, 2), - rdw_1=rnorm(n, 10, 1), - wbc_1=rnorm(n, 8, 3), - basophil_count_1=rnorm(n, 200, 100), - eosinophil_count_1=rnorm(n, 200, 100), - lymphocyte_count_1=rnorm(n, 1300, 1000), - monocyte_count_1=rnorm(n, 450, 100), - neutrophil_count_1=rnorm(n, 4000, 2000), - platelet_count_1=rnorm(n, 800, 200), - mean_platelet_volume_1=rnorm(n, 10, 2) + mch_1=rtnorm(n, 38, 2, a=0, b=1000), + mchc_1=rtnorm(n, 34, 2, a=0, b=1000), + rdw_1=rtnorm(n, 10, 1, a=0, b=100), + wbc_1=rtnorm(n, 8, 3, a=0, b=10000), + basophil_count_1=rtnorm(n, 200, 100, a=0, b=100), + eosinophil_count_1=rtnorm(n, 200, 100, a=0, b=100), + lymphocyte_count_1=rtnorm(n, 1300, 1000, a=0, b=100), + monocyte_count_1=rtnorm(n, 450, 100, a=0, b=100), + neutrophil_count_1=rtnorm(n, 4000, 2000, a=0, b=100), + platelet_count_1=rtnorm(n, 800, 200, a=0, b=1000), + mean_platelet_volume_1=rtnorm(n, 10, 2, a=0, b=100) ) set.seed(4) @@ -249,7 +249,7 @@ cancer_prostate <- tibble( T_stage_unknown_2=sample(x = c("localized", "regional", "distant", "in_situ", "unstaged", "unknown"), size = n, replace = TRUE), nodal_involvement_1=sample(x = c("NX", "N0", "N1", "N2", "N3"), size = n, replace = TRUE), distant_metastasis_1=sample(x = c("MX", "M0", "M1"), size = n, replace = TRUE), - stage_system_1=rep(NA, n), + stage_system_1=rep(NA, n), gleason_score_clinical_1=sample(x = c(2, 3, 4, 5, 6, 7, 8, 9, 10), size = n, replace = TRUE), gleason_score_pathological_1=sample(x = c(2, 3, 4, 5, 6, 7, 8, 9, 10), size = n, replace = TRUE), gleason_score_unknown_1=sample(x = c(2, 3, 4, 5, 6, 7, 8, 9, 10), size = n, replace = TRUE), @@ -311,7 +311,7 @@ readme <- tibble( subject <- subject %>% select(-age_at_obs) -# working in primed_data_models/test_data directory +# working in primed_data_models/test_data directory write_tsv(readme, "readme.tsv") write_tsv(subject, "subject.tsv") @@ -331,11 +331,11 @@ write_tsv(family_history, "family_history.tsv") phenotype_harmonized <- tibble( # phenotype_harmonized_id= - domain=(file_names), - md5sum=as.vector(md5sum(paste0(file_names, ".tsv"))), - file_path=paste0(bucket, file_names, '.tsv'), - file_readme_path=paste0(bucket, 'readme.tsv'), - n_subjects=rep(n, length(file_names)), + domain=(file_names), + md5sum=as.vector(md5sum(paste0(file_names, ".tsv"))), + file_path=paste0(bucket, file_names, '.tsv'), + file_readme_path=paste0(bucket, 'readme.tsv'), + n_subjects=rep(n, length(file_names)), n_rows=rep(n, length(file_names)), )