From bb5b084d66df12ce7d9fccf1d9f7e87553e67999 Mon Sep 17 00:00:00 2001 From: Yuk Kei Wan Date: Wed, 22 Nov 2023 05:46:49 +0000 Subject: [PATCH] add assertions --- xpore/test/data/original_diffmod.table | 130 +++++++++++++++++++++++++ xpore/test/neues_config.yml | 15 --- xpore/test/test_diffmod.py | 23 ++--- 3 files changed, 140 insertions(+), 28 deletions(-) create mode 100644 xpore/test/data/original_diffmod.table delete mode 100644 xpore/test/neues_config.yml diff --git a/xpore/test/data/original_diffmod.table b/xpore/test/data/original_diffmod.table new file mode 100644 index 0000000..d75f9f7 --- /dev/null +++ b/xpore/test/data/original_diffmod.table @@ -0,0 +1,130 @@ +id,position,kmer,diff_mod_rate_KO_vs_WT,pval_KO_vs_WT,z_score_KO_vs_WT,mod_rate_KO-rep1,mod_rate_WT-rep1,coverage_KO-rep1,coverage_WT-rep1,mu_unmod,mu_mod,sigma2_unmod,sigma2_mod,conf_mu_unmod,conf_mu_mod,mod_assignment,t-test +ENSG00000114125,141745271,GGCAA,0.09304756154840654,0.1151368365427301,1.5755183921034628,0.32747458254894546,0.23442702100053892,159.9999999999999,84.99999999999996,109.22037305758336,105.8100139701271,3.7898285575242876,19.797393613708152,0.9420961707183468,0.4174361892483217,lower,0.06822740825614229 +ENSG00000114125,141745386,GGAGC,-0.055967115992809235,0.02315364711527003,-2.270889845741004,6.211102967664998e-06,0.055973327095776904,161.0,87.00000000000003,122.31005559794265,114.99442678610787,9.007115971633231,52.77258984759545,0.8439477969713307,0.27621874278945857,lower,0.08300539873601627 +ENSG00000114125,141745670,TTACA,0.11449562745755237,0.0047409488342823915,2.8241277216340896,0.9868359892707945,0.8723403618132421,134.0,71.99999999999999,81.55870614244542,75.68279219122806,4.793926720125592,4.946222358081216,0.4240678561853005,0.045644029305831155,lower,0.024476798562740786 +ENSG00000114125,141738411,AGTCG,0.031495311331373864,0.024388486139065184,2.2509534454532805,0.03150813151547171,1.2820184097843643e-05,156.00000000000003,78.0,124.90280738476415,118.13576320010601,6.949753521250514,39.965471615022196,0.743927401984326,0.4305929483259797,lower,0.07399115111856043 +ENSG00000114125,141745673,CAGTA,0.13073197059414626,3.273477671863784e-06,4.652869288812015,0.13074605470445302,1.4084110306751922e-05,144.0,71.0,127.55626489185686,115.9048272452894,6.501583967167016,27.334260547087833,0.31416677331699294,0.05947599222517257,lower,0.05369936910519054 +ENSG00000114125,141738319,CCGCC,0.01638470690149097,0.2813182323903066,1.0773627642231018,0.016411021305995997,2.6314404505026055e-05,70.00000000000003,38.0,85.28018392623595,80.40998610589017,3.45588411897059,31.88030084652191,0.6443615941639342,0.15808432861977761,lower,0.07511015353735548 +ENSG00000114125,141745369,GATGA,0.11291199953098008,0.07462472673429216,1.7827640093107682,0.6967268116976091,0.583814812166629,169.0,88.00000000000001,81.03129193768712,77.40730067881353,4.0268872581037,2.575461543485727,0.6809357519207664,0.5994126757398888,lower,0.08139582473486043 +ENSG00000114125,141738362,GGAGA,-0.09121796018197567,0.0976252546139797,-1.6564770219398555,0.151417172844102,0.24263513302607767,156.99999999999997,82.99999999999996,114.69930865485338,128.028796558718,15.189832987194597,18.55821158530844,0.4057451835759631,0.13073443352499606,higher,0.09733049212491204 +ENSG00000114125,141738383,GCCTC,-0.08741863585378906,0.003000378985104826,-2.967699094704583,0.9125617570719786,0.9999803929257677,91.99999999999997,51.0,67.43631848054459,71.96066111714175,2.6937457313030433,3.5356659155432424,0.8137359670571023,0.09109626873234498,higher,0.03980864694917599 +ENSG00000114125,141745361,CTACA,0.05934355143951877,0.0013013905591688882,3.2156729390815455,0.05935491481762381,1.1363378105043067e-05,163.99999999999997,88.0,80.03847740232509,82.84345540671407,1.0213851052683134,6.461843482185109,0.904663235760373,0.2240111521741558,higher,0.026886976435894938 +ENSG00000114125,141745641,GCTTA,-0.055688345837041214,0.25152487637647925,-1.1466534501931724,0.13052318542071867,0.18621153125775988,173.0,89.0,77.65551450541226,79.4547828620902,0.8776358876377613,5.0398750852500855,0.981698230497264,0.44341501620929635,higher,0.07783680683366709 +ENSG00000114125,141745197,GCTGC,0.15831965154296362,0.0019670052073826843,3.0951693977262678,0.29490291633678484,0.1365832647938212,167.0,86.00000000000001,82.23355469101618,84.79677111229806,1.3199869137418676,6.591845691148024,0.6746276405056068,0.6315340279483814,higher,0.038047200638709054 +ENSG00000114125,141745699,ACCCA,0.21357311561365153,0.03291662787324933,2.1330987309657923,0.32149437614724663,0.1079212605335951,44.00000000000001,19.0,65.91717625684952,97.2565149529589,2.120618109168339,143.37883707492895,0.8532768760225679,1.4483342361064893e-50,higher,0.05174061449495232 +ENSG00000114125,141745411,GGGAC,0.6603353324794075,3.758712658908938e-72,17.963565234455817,0.6603470969084797,1.1764429072257123e-05,166.00000000000003,85.0,117.41669369241039,120.33535678971646,8.510801119098739,2.6846884406140448,0.7829390787300419,0.5187827079131511,higher,2.625272285355091e-05 +ENSG00000114125,141745619,AGTTT,0.18031020168769607,0.006385672530151206,2.727290849696541,0.588740642961031,0.40843044127333494,162.00000000000006,84.00000000000003,124.85592538961887,116.83513930060252,9.847210888300902,38.23200041021118,0.945083630399947,0.31635128570388504,lower,0.08100058410007917 +ENSG00000114125,141738407,TCCAA,-0.053901838638808625,0.15129102505553516,-1.4349862176842372,0.04961412260098261,0.10351596123979123,161.0,83.00000000000003,73.1384685130524,75.93154693113785,1.2593264601115868,4.403727500570624,0.5722731634689954,0.44783641659837803,higher,0.07933657541162285 +ENSG00000114125,141743544,AAGAG,0.16221694645161325,0.005919855259354774,2.752187850184229,0.330369398479796,0.16815245202818277,142.00000000000006,73.0,126.88031020649747,116.11001377049917,8.70217195812839,18.70434915694997,0.41543708728127804,0.30751955449386204,lower,0.07016046759977076 +ENSG00000114125,141745609,CAGTG,-0.09640969248830444,0.08759273260708228,-1.7082350757017786,0.16558040541947522,0.26199009790777966,167.00000000000003,82.0,119.88366871409306,115.9513879910908,4.267243483960024,24.921147481090312,0.9300682362703574,0.3745444874763295,lower,0.05645344236835802 +ENSG00000114125,141743523,GATGT,0.08250890776559006,0.011221706934783367,2.5357179669237015,0.9903324639504911,0.9078235561849011,153.00000000000006,83.99999999999997,78.11838415100799,72.06009772211011,18.54549126070031,4.400979091789922,0.7411492507237498,0.21678701260707756,lower,0.06372390545664632 +ENSG00000114125,141738461,ATGTG,-0.08283409437214585,0.07255412466757857,-1.7956253296355473,0.08762065439905654,0.1704547487712024,158.99999999999991,86.99999999999999,92.49154277974947,81.51892160630808,6.526415689649407,13.98236291525855,0.15225114976468876,0.14124115744534568,lower,0.047775042113503835 +ENSG00000114125,141738447,GGAAC,0.22070056273017613,2.825900903362963e-06,4.683084397529571,0.2811070486545035,0.06040648592432734,140.00000000000006,73.0,122.26719347747873,114.5178483214092,19.497050305486212,43.43195253477865,0.9444809035049347,0.18546053790795158,lower,0.0782285612237511 +ENSG00000114125,141745650,TGATC,0.039419151433270815,0.00973311079464016,2.5851695984202188,0.03943091586234307,1.1764429072257123e-05,163.00000000000009,85.0,125.31039552252949,119.21061906085457,10.794056550697466,39.6814353469857,0.8814769658251158,0.2951284330445427,lower,0.06322760109696508 +ENSG00000114125,141745258,GGTCC,0.1558500418856945,0.01746177805544136,2.376837516869034,0.49689049374039906,0.34104045185470455,151.0,84.99999999999999,115.60430303831608,107.07396361506366,8.493780193457148,35.0955917228473,0.9362245513572868,0.13745279580440684,lower,0.08332617377417874 +ENSG00000114125,141745249,GGACT,-0.47882013838542886,7.910493699171347e-17,-8.332571676379107,0.09273332662909302,0.5715534650145219,161.99999999999997,87.99999999999997,123.52646931109537,118.73732790344282,5.561865722044068,19.762194971906652,0.9494738059689034,0.28769655397642624,lower,1.301525793906649e-06 +ENSG00000114125,141745428,TGGTT,-0.08742422026987891,0.06802892859711955,-1.8248151517433409,0.10355315663941884,0.19097737690929775,166.00000000000003,89.00000000000003,120.35843953645424,112.48702230222503,2.5880555633504567,10.995235968420541,0.6501578671115602,0.05981032773101846,lower,0.04365543988517968 +ENSG00000114125,141745639,ATGCT,-0.056956773128979496,0.08950922720953287,-1.6979922359966246,0.03340917575777827,0.09036594888675777,169.00000000000003,87.99999999999999,88.53752091396784,83.64748432092746,4.022203526774112,10.006961611240254,0.5507397130082898,0.33421436059519305,lower,0.033164091912884205 +ENSG00000114125,141738395,GGGAG,0.15150617093211827,0.02171784118959909,2.2952667623170826,0.6955163503457376,0.5440101794136193,158.99999999999994,82.00000000000001,119.18480965070411,124.11175539665729,6.114144577734338,3.533821892922271,0.727359227069917,0.22797134585869028,higher,0.07760416402869663 +ENSG00000114125,141745256,GTGGT,-0.05972830833064313,0.04602501672997622,-1.9951638098504898,0.015536546713551144,0.07526485504419428,158.99999999999994,86.99999999999996,96.78526987676616,103.72909537368095,6.249086431964031,25.419133501327803,0.5961066963376515,0.2261639540350857,higher,0.033322606173257815 +ENSG00000114125,141745394,TGGAT,0.042994597854632666,0.13328456672260053,1.501274542256162,0.9780005837777925,0.9350059859231599,165.99999999999997,87.99999999999999,121.42519240199503,129.24462499913378,25.63029261419915,6.608641545160327,0.23747271907556733,0.1986627881477544,higher,0.0002973546953575895 +ENSG00000114125,141745235,CCTCT,0.3207980231243622,3.139751117504593e-08,5.533459720396957,0.5051269989818192,0.18432897585745706,155.0,86.0,75.37094625598249,77.81223849614636,13.591264713650995,2.1744976634735225,0.9829388173176612,0.3799554300506115,higher,0.044257337306670565 +ENSG00000114125,141745542,TGCTA,0.03190053296543907,0.01800388033755169,2.365538313284982,0.03191202695408301,1.1493988643939218e-05,169.99999999999994,87.0,109.80916470200633,104.08173055973069,4.00376389610351,20.417638378007187,0.598523300387665,0.2771090904638258,lower,0.04753622358862603 +ENSG00000114125,141745213,GGTGA,-0.04895918583970363,0.19777707834111924,-1.287910619644731,0.057194577914139844,0.10615376375384347,164.00000000000003,84.99999999999999,93.52854547465112,106.21403521348986,14.266012104047595,88.63375736012314,0.9127732211493204,0.23029828683574927,higher,0.05325200842416054 +ENSG00000114125,141738508,CCAGG,-0.04148986833612016,0.20201901785494536,-1.275820390483362,0.02313282066560658,0.06462268900172674,134.00000000000003,67.99999999999999,94.94913647797985,85.87930929612098,14.510990123734322,45.51691240535296,0.5361200322781191,0.24474815107072734,lower,0.04212320399650844 +ENSG00000114125,141745672,ACAGT,0.06964562126211504,0.09855677031085577,1.651891013725512,0.9436579802838851,0.8740123590217701,152.99999999999997,76.99999999999999,87.80185157480521,98.51516580719412,34.04878437505349,19.140298595317212,0.45317798342970106,0.17552926378316247,higher,0.023593786310123776 +ENSG00000114125,141745466,CTGCG,-0.0601338664329686,0.016418927460917398,-2.3994677187173186,6.024023806942085e-06,0.06013989045677554,166.0,89.99999999999999,96.06976480257919,91.02909438176428,4.972650221715709,13.201313833901837,0.5166699145719111,0.3360743806898827,lower,0.09956317521099763 +ENSG00000114125,141745539,AAGTG,-0.04341052642174679,0.06160771475699504,-1.8691085426377017,6.24992187597655e-06,0.043416776343622766,160.0,76.99999999999999,116.61033583058551,122.9458044854166,13.532441926519077,47.16018935463401,0.8660710380798998,0.16049001402090413,higher,0.08617441496664854 +ENSG00000114125,141745356,GAACA,0.097502745021497,0.05347080001491384,1.931099086133577,0.228436769671911,0.130934024650414,153.99999999999997,81.00000000000001,94.30848605931513,98.95816309698068,2.1925561665363205,17.120340020980695,0.725465720531281,0.31897375277778306,higher,0.05267619175762593 +ENSG00000114125,141738439,CAAGA,-0.03136248192531593,0.517646550482933,-0.646977430715029,0.13252974555576183,0.16389222748107776,160.00000000000003,83.99999999999999,113.22288129519582,106.47151131105414,4.164245783097425,59.48841591122114,0.4853310426276689,0.3344721917259629,lower,0.08748075088789521 +ENSG00000114125,141738288,CTAGC,-0.30952318364199866,0.0217723848647664,-2.2943154655421645,0.06994906160690813,0.37947224524890677,26.0,15.0,97.48325969880828,92.40900566603989,4.816181402612843,20.20126177276413,0.9613325862232306,0.19569518168903088,lower,0.020138073228278205 +ENSG00000114125,141745412,GGACT,-0.8330423850231221,2.62831062050357e-124,-23.713313212365865,0.11599272942147902,0.9490351144446011,167.00000000000003,78.00000000000001,123.61837581578364,117.61408644753985,6.0183991005939275,18.125538290614674,0.9647605939786336,0.19439542774441498,lower,1.641956875281649e-19 +ENSG00000114125,141745295,TTCTT,-0.03870717460867658,0.06756172250490072,-1.8279189104828408,6.024023806942085e-06,0.03871319863248352,166.0,82.99999999999999,80.33651626309059,82.13944264543005,1.0011378750120865,7.324054063640312,0.6267971979756968,0.17471174042792514,higher,0.03567486852179156 +ENSG00000114125,141745397,ATCTG,0.3404639481126144,9.559623301269872e-10,6.116594457201242,0.9593530822164433,0.618889134103829,151.99999999999994,83.0,76.54741450455022,81.37449838672363,1.315223673631594,2.7120682245277274,0.7857908516287485,0.03938476242158366,higher,8.236539762898062e-11 +ENSG00000114125,141745693,TTTAA,0.008479709534746289,0.25687133367728154,1.133816963862737,0.008492696210417051,1.2986675670761797e-05,151.0,77.0,85.07720303704835,76.54008633879546,9.548590493334066,105.06408242102759,0.7956154692972279,0.0013211429271724959,lower,0.03999133079675775 +ENSG00000114125,141743528,CAAGC,-0.1518639528354148,0.023155535764291715,-2.270858656036569,0.19596569356657792,0.3478296464019927,133.00000000000006,69.00000000000001,110.83010116410607,91.61021495184326,7.842460137820767,6.495566414519106,0.051085145951379175,0.0053825898908014475,lower,0.007708195014245339 +ENSG00000114125,141745391,CGATG,0.25699956823764286,7.182883133833738e-05,3.9701452445482737,0.7562022690599368,0.49920270082229395,167.00000000000003,81.0,116.62289465608912,124.4092232570962,27.43792275889605,9.319778988348949,0.624981263294242,0.04384873022510906,higher,0.0067629775347065706 +ENSG00000114125,141745237,TCTCT,0.21364562087172023,4.9648713894995897e-05,4.057274509772535,0.9233431467304588,0.7096975258587386,164.00000000000009,87.99999999999999,78.37296170531638,82.25948609575399,4.127259639101181,3.7167620706445184,0.7081071880486474,0.32251962843955184,higher,0.004344606607026276 +ENSG00000114125,141745629,AACTT,-0.31575305318069674,1.8220249518757355e-08,-5.6281028010936565,0.07961485633361459,0.39536790951431133,170.0,88.0,95.39187199211199,89.63329492038544,2.1858107385434287,1.8179836266041989,0.3556099134520645,0.2357778304182936,lower,4.024305641859244e-06 +ENSG00000114125,141745423,AGCCT,0.17469232243690574,0.006829601408672309,2.7050407342676475,0.5639179827647303,0.3892256603278245,171.0,87.0,109.72719812527669,113.54804421126043,2.203905929794949,4.215094577051346,0.652206028901372,0.4773000748362062,higher,0.01737623261452064 +ENSG00000159111,47824201,CAGCC,-0.03972557681434363,0.031462813219983156,-2.1511696297847682,0.9602574746076421,0.9999830514219857,112.00000000000003,59.0,100.5438653475085,108.0583572356631,17.113251205012535,4.71298896689587,0.25659255703735206,0.1758127438294046,higher,0.09920633171963651 +ENSG00000159111,47824167,TCTGC,0.02552494757427086,0.07650356212885466,1.7713437152375977,0.025540572086004867,1.562451173400831e-05,120.0,64.0,84.62456986168374,87.83083538556558,1.5556864682273006,16.401646425348755,0.799313982327529,0.16782061911159218,higher,0.018855098005670038 +ENSG00000159111,47827059,GATGA,0.1290340805450767,0.07260512771902561,1.7953049443350875,0.7872782316541417,0.658244151109065,105.00000000000003,62.999999999999986,79.98736731643089,74.3696318601722,15.20599653750803,3.0002114785781515,0.8875234757499366,0.190137437188326,lower,0.09796316898812636 +ENSG00000159111,47824231,CAGAT,0.1693913132608114,3.0038917105144463e-06,4.670553542792361,0.1694091697659362,1.7856505124816974e-05,106.99999999999996,56.0,113.83510822959147,107.78407132384837,6.693277666916031,26.4090329427354,0.8042203174818823,0.4336552560638881,lower,0.03848467106517314 +ENSG00000159111,47823794,GAGCC,-0.06504940659943748,0.003585367061575544,-2.912510012301791,0.9349358879507227,0.9999852945501602,122.00000000000006,68.0,101.41500053553774,105.91006333089668,8.328525100598782,4.004824973000945,0.5814113656550143,0.34870348856320776,higher,0.00042099449942249457 +ENSG00000159111,47823826,CAAGC,-0.14334235271196105,0.04945360778144891,-1.964659954351456,0.2799298812017054,0.4232722339136665,120.0,66.99999999999999,103.72442728494315,95.42903675577047,8.003252504649346,4.181179693133716,0.8410130366674283,0.065387173223439,lower,0.03341671584904862 +ENSG00000159111,47828510,CCCCC,0.20073062528554647,0.01345086285840367,2.471603447857523,0.566775328596415,0.3660447033108685,89.99999999999999,59.99999999999999,62.85211208844594,61.60622675986909,4.420965416151599,0.6351516717736697,0.8573376162243441,0.6729427757227628,lower,0.0816726602583923 +ENSG00000159111,47824006,CTTAG,0.049420383003098416,0.18687409234370822,1.3198829758255608,0.09728200210542427,0.04786161910232586,119.99999999999993,67.99999999999999,86.56029819486498,81.32779246351937,1.7149900157720739,10.426833964589463,0.5419430807624337,0.1292269148101185,lower,0.07063447379544009 +ENSG00000159111,47826648,CCTGC,-0.020877576102370066,0.12436909510226567,-1.536690595927839,0.9791057577865003,0.9999833338888704,110.99999999999999,60.0,85.54013326921509,81.64140367138508,6.781945449261672,1.6357041700219894,0.6381962751178413,0.36931719460443047,lower,0.04150545195702591 +ENSG00000159111,47823525,CCACC,-0.037036823242759316,0.24389070409829827,-1.165316990566713,0.022009505492813754,0.05904632873557307,119.0,66.99999999999999,72.33162199314215,74.05014603062465,0.833770067892983,6.593879597704659,0.8948925714482245,0.4342189404550578,higher,0.061665952108190696 +ENSG00000159111,47824296,CCTGT,-0.08042700970003658,0.001673367146777572,-3.1428059838723588,0.9195565973948128,0.9999836070948493,113.00000000000003,61.0,85.58608380337476,88.52494880042464,4.989119993453723,2.3888342045409248,0.6523521809507693,0.5614535889675316,higher,0.017853307762187458 +ENSG00000159111,47828543,ATCCA,-0.19732938483267276,0.013578068107290115,-2.468236227510251,0.43533204839901035,0.6326614332316831,92.99999999999999,62.00000000000003,69.94891932712537,72.10946263441838,0.7188538256474486,6.030941326847471,0.9027335082548595,0.41383833114041446,higher,0.0553410930635826 +ENSG00000159111,47823979,AGGAG,0.17036683692392618,0.015415971186623982,2.422456502684108,0.447414104311713,0.27704726738778684,121.00000000000003,68.99999999999997,118.41548011914026,114.57600042778883,1.4848856068501957,5.610194396010124,0.5862243859678228,0.504850807731203,lower,0.020354410935387746 +ENSG00000159111,47827166,GCAGC,-0.12419067956898897,0.040238939391234865,-2.051287681512404,0.09647050776896288,0.22066118733795184,103.00000000000003,60.99999999999999,88.38099662009711,95.21238134893042,3.066668077779575,15.526578149845175,0.8183507915873705,0.2659438008299768,higher,0.03044093607224873 +ENSG00000159111,47823832,CTCAA,0.006145560251728806,0.8412544225465959,0.2002891821302373,0.04686497477538165,0.040719414523652846,118.99999999999994,69.00000000000001,79.18112637160897,82.54253719815287,1.2162029959722105,7.896482351704571,0.9822653985405987,0.1378853877547556,higher,0.054077923393784054 +ENSG00000159111,47828516,CCCAG,0.02622651224093291,0.10999544162114074,1.5982136288669195,0.026243460818947215,1.6948578014304603e-05,95.00000000000003,59.0,71.70757186935468,68.0189856698173,4.108376210921349,19.162648599265253,0.9085284682396418,0.0624566433785338,lower,0.06528253956284598 +ENSG00000159111,47824356,CACCT,0.07951727122735985,0.19427128212146982,1.2980467170898815,0.21332955186955416,0.1338122806421943,101.99999999999999,55.00000000000001,74.12557138453282,71.72083373285487,1.4805100943176788,12.8334001441646,0.6072299426099137,0.17074620107501748,lower,0.03140587234087956 +ENSG00000159111,47823495,TGGGA,0.06338187813883245,0.03458970140825311,2.1131293125758885,0.9999911505991044,0.9366092724602719,113.0,66.0,116.55468861136653,110.41843264156468,16.664093600650308,3.3069002182343845,0.46868857811916176,0.4292297166004284,lower,0.07336537228543644 +ENSG00000159111,47826722,GGGCA,-0.012591711362133134,0.8603638289296641,-0.17591104382971676,0.23438744216271762,0.24697915352485075,103.00000000000006,55.00000000000001,104.86627472264571,108.60848471663783,3.6698335212827278,24.460781922142022,0.7784770927542238,0.6719717497184139,higher,0.040369881993870635 +ENSG00000159111,47831474,TCTCC,0.11974957813949505,0.08964516745016471,1.697272428031439,0.8497467019474654,0.7299971238079703,83.99999999999997,57.0,72.78612709470443,79.43325137374319,5.779119838360421,4.181697905055285,0.3664657658868259,0.15294359463349147,higher,0.03177771393672162 +ENSG00000159111,47828578,TGGCT,-0.12931032812637094,0.017644513119412484,-2.3729947834364387,0.04598709420917823,0.17529742233554918,91.99999999999999,58.0,109.97802866661442,99.88480621516946,5.990623394045791,44.553788464169315,0.7995990524512445,0.09957260953042543,lower,0.021595576373482493 +ENSG00000159111,47827070,CACAA,0.27065202947914635,9.066029686461926e-05,3.9143174489649537,0.45095640964924233,0.18030438017009595,104.99999999999999,61.0,81.60900325149217,78.06765979822983,11.36490992565117,1.6397380956907264,0.9596220237007406,0.24431950209176712,lower,0.0898379322901563 +ENSG00000159111,47824184,CCTGC,0.0019069357516822774,0.9347397809884386,0.08188296489544596,0.023424285888694073,0.021517350137011795,116.00000000000009,60.99999999999999,85.11582949828787,80.67388875489033,2.1217528347584813,21.77926597454834,0.7479499556041301,0.21600095878988002,lower,0.04176579433554062 +ENSG00000159111,47824336,CCCAC,0.08301129141985293,0.035760147469463134,2.0996442463259926,0.1229584807349743,0.03994718931512137,112.99999999999997,62.999999999999986,72.28075107720773,67.63876897770943,1.461278167647414,7.887302047119821,0.4623680472095445,0.1429104415715643,lower,0.04604286281380762 +ENSG00000159111,47824249,TGTCG,-0.020669879794022905,0.4212738089723873,-0.8042132826840355,0.9594546420036462,0.9801245217976691,114.00000000000003,60.99999999999999,115.24298590105425,101.90347561455704,44.08849667349507,25.621457661974336,0.3950058798922509,0.17796779679377028,lower,0.06377679075760387 +ENSG00000159111,47826687,GGTCA,-0.14681549711535558,0.06621277194684022,-1.836980514842619,0.4599114630768181,0.6067269601921736,106.00000000000001,59.000000000000014,109.95873286002714,122.211690679236,46.37967420130947,18.524644076128336,0.6268215008207332,0.12542283603939128,higher,0.08990092914206382 +ENSG00000159111,47824212,GGACT,-0.8691569638743564,4.0778535691923213e-168,-27.63629853610469,0.13082549288154696,0.9999824567559034,114.99999999999994,57.0,126.02987281395919,120.5751220466267,2.6838980747925976,14.795523017745907,0.646044858132252,0.4968114607591201,lower,6.108593948122725e-18 +ENSG00000159111,47824384,TGGTG,-0.1000338125168525,0.00041949174014528737,-3.527507586320086,0.8999500589711641,0.9999838714880166,112.0,62.0,114.85361760013937,118.2211355766743,13.066193233665063,1.9799569748303767,0.8108864480459295,0.4472660118747295,higher,0.020928854813503886 +ENSG00000159111,47826774,GAAGC,0.18029041329578932,0.0079062217231588,2.656048608698792,0.8785079081158962,0.6982174948201069,102.99999999999999,59.000000000000014,100.5366488695314,95.4144101558872,55.42601190776409,5.257033376943194,0.9810080398630575,0.21577909811243035,lower,0.02443806781838766 +ENSG00000159111,47824064,ATAGG,-0.18791505521748095,0.00017202282229604931,-3.756912191935967,8.54686244679578e-06,0.18792360207992775,117.0,60.99999999999997,84.45790832874918,89.08422756731576,8.018254492363349,15.673242012827613,0.7245343997509239,0.38348733254108547,higher,0.017543966246600578 +ENSG00000159111,47824172,TACAC,0.010545567037140872,0.2651317285070264,1.1143437880149378,0.01056119154887488,1.562451173400831e-05,117.0,64.0,85.97394692942524,81.14449237315459,3.590139666294797,25.998345879391415,0.5812528372251063,0.3334736701509683,lower,0.02704642184152959 +ENSG00000159111,47823802,CCTGG,-0.09986556907726485,0.03001929800367547,-2.1698356581338745,0.8306999491566476,0.9305655182339124,119.0,69.00000000000001,86.4388362131553,92.3981087497224,12.115105606873982,4.779340647640064,0.5273951801177802,0.144569091416286,higher,0.0878676951390629 +ENSG00000159111,47824005,TTAGT,-0.01241465032696254,0.2201454472579324,-1.226141457084497,0.9875704247454233,0.9999850750723859,119.99999999999993,67.0,94.95411087718631,100.46993420937223,14.846288824473788,2.230971536086437,0.7840502385403603,0.2359511162719906,higher,0.02343741969486059 +ENSG00000159111,47827083,CCAGC,-0.14663873463113297,0.004632465446294514,-2.831538512680931,0.7996427559666598,0.9462814905977928,93.99999999999997,51.99999999999998,87.89725492619154,98.4716999601046,92.96456646850017,4.775302775170773,0.32761540531221156,0.27195749877255804,higher,0.016732772306886592 +ENSG00000159111,47831499,CCGTG,-0.020316314795702395,0.277167636151081,-1.0867040215381676,1.1627636566591474e-05,0.020327942432268986,86.0,57.00000000000002,89.76578416739757,94.05792509485994,5.13692489715618,37.34584373652406,0.9257561785828338,0.1888213695140739,higher,0.09712023302494452 +ENSG00000159111,47827198,TAGGC,0.13608101830129737,0.01602190226605811,2.408416240831158,0.22396334890757855,0.08788233060628119,96.0,58.0,85.13828995959868,108.89753423853959,12.190625629940133,45.66018497337612,0.27649432479824343,0.05210230173050983,higher,0.034103445439104665 +ENSG00000159111,47831465,CCAGG,-0.10866238442900494,0.05770330321081789,-1.897945185207876,0.03191751320786502,0.14057989763686995,66.00000000000004,43.0,102.90219327867659,77.1264917306587,21.011439401635773,39.655930950259304,0.029170293200160187,0.003941437789131657,lower,0.07162947094567942 +ENSG00000159111,47828642,CGCTA,0.032288043888660536,0.24818430677818515,1.1547707777242244,0.04905420452598097,0.016766160637320438,91.99999999999997,60.0,104.05369467781891,99.0132563864449,4.686268424969753,14.357590580415078,0.574385762775933,0.39076125703339337,lower,0.06592873609699654 +ENSG00000159111,47828539,ACCCA,-0.20741140693075527,0.010468046905961568,-2.559972424611761,0.2832076196020165,0.4906190265327718,90.00000000000001,58.0,66.05653522106958,68.96166260465733,1.534974024370516,5.380663809169547,0.9063720573372975,0.1985033245169312,higher,0.0770970126318124 +ENSG00000159111,47827146,CCGAA,-0.15005806017587348,0.0264710114026913,-2.2192310247652136,0.11384896078557206,0.2639070209614455,96.99999999999993,55.000000000000014,104.6517248900068,88.33339894229023,10.351642339905302,9.069941575076747,0.0750954500776747,0.020892302448320965,lower,0.0859129842693746 +ENSG00000159111,47828593,AGCGG,0.09500683692174139,0.07915702219153466,1.7555983030817934,0.9290932738416862,0.8340864369199448,90.0,63.0,103.62536994278693,117.73023838049176,75.57029237615016,10.031802311087057,0.7024923025900713,0.19387733062417722,higher,0.02346507749086361 +ENSG00000159111,47823937,CTGAA,-0.08725743869765598,0.05533598451502901,-1.9162287570726229,0.04374894387213032,0.1310063825697863,120.0,66.0,112.64541936737658,103.14678074062245,4.936100816279838,25.923278466116958,0.2936239820518465,0.2867379500888191,lower,0.07224256037453207 +ENSG00000159111,47824451,TGCAT,0.016265807461718264,0.5140853041533546,0.6524897172653248,0.035666489512780085,0.01940068205106182,113.00000000000003,60.0,108.68440907864505,99.45519348265904,5.58045401112885,35.97072553706619,0.504807037390062,0.08470005569521226,lower,0.0357844182438119 +ENSG00000159111,47828624,GTTAC,0.0162639201647119,0.2181157413216609,1.2315539782848686,0.0162814634088086,1.7543244096698364e-05,92.0,57.0,81.87802860950359,86.76310494728394,4.143421682381843,33.66558923573975,0.8990847350207992,0.06302915813234633,higher,0.008578360070670423 +ENSG00000159111,47823890,TGCTG,0.04891713867848369,0.012285305235022859,2.5038415119719293,0.048932289734512295,1.5151056028605191e-05,122.0,66.0,109.45028832011734,104.16751592906463,6.059555430403029,19.729193483125837,0.6974140312013822,0.2716410313455849,lower,0.07369164497189507 +ENSG00000159111,47824272,GCAAC,-0.03218226650554867,0.05068932868180664,-1.9541005363841175,0.9678016049824679,0.9999838714880166,114.99999999999999,62.0,80.94430391957337,84.42184916093137,8.957715552398389,1.9503322942068477,0.6110966843156354,0.5202264287589942,higher,0.035117552236060695 +ENSG00000159111,47827062,CCTGA,-0.060807201341960604,0.010583244258771949,-2.556166574904829,0.9391755578732389,0.9999827592151995,101.00000000000003,58.0,91.36034731974603,98.65517065501182,6.307234868325703,3.6032298461511365,0.3471001040232211,0.10537023125395532,higher,0.05547610703646719 +ENSG00000159111,47824220,ACTGT,-0.0032101890749271986,0.8786589583154449,-0.15266944409788805,0.015993405625064246,0.019203594699991444,118.00000000000004,61.00000000000002,88.92308228676742,84.77245590825754,2.1117371990253684,10.353776032554691,0.5384777254897877,0.4002115127076,lower,0.021168573559396647 +ENSG00000159111,47823983,TGATA,0.04254415444092567,0.02153914388818317,2.298398059046161,0.04255885989076538,1.4705449839710595e-05,119.00000000000003,68.0,123.63175902696767,117.36114053547307,8.498175017125872,42.86921149104194,0.9050670467464604,0.17740250840545568,lower,0.0679322978414945 +ENSG00000159111,47826753,CAAGT,0.05266348565284562,0.14477106602743547,1.4582521067831873,0.977542426467758,0.9248789408149124,109.00000000000004,63.00000000000001,107.75386141256341,100.11834133196542,30.218284600465125,4.030714636543665,0.5165101054159866,0.21797312954712644,lower,0.037075811437109835 +ENSG00000159111,47823701,CAGAG,-0.25377651405495816,0.000532060204281229,-3.4640739593177146,0.17529312667823402,0.42906964073319215,106.99999999999997,61.0,105.28693898653032,114.59874711878392,17.74950913441547,96.94886865809289,0.8058087009849041,0.1800821735756193,higher,0.04998619550556567 +ENSG00000159111,47824137,GGACA,-0.5986705727084076,1.5900501575271783e-23,-9.995795726389794,0.31406059483679777,0.9127311675452053,102.00000000000003,53.99999999999999,121.29629905683862,113.9833767135631,6.923232171209111,4.32239882346676,0.5454080310494893,0.356502083411398,lower,2.4987272001107523e-10 +ENSG00000159111,47823485,GCTTT,-0.08875239993238082,0.044536509936425855,-2.009005882082926,0.02300673736207167,0.1117591372944525,107.00000000000003,57.00000000000001,78.2090369558857,82.8965894152104,3.861025506996145,7.325624529527011,0.42491772115429705,0.2546670629543908,higher,0.028340884926561092 +ENSG00000159111,47824323,CCAGC,0.12688497900618878,5.929417351235205e-05,4.015602292586307,0.12690110751817227,1.6128511983484405e-05,110.99999999999997,62.0,96.94631640233816,84.44105224965384,8.728213336110313,53.5337845380093,0.4243580370529957,0.09732826277044167,lower,0.01848892948427682 +ENSG00000159111,47828594,CAGCG,0.07092116757996825,0.12111068081206251,1.5501284831240139,0.9559683641723947,0.8850471965924265,87.99999999999999,62.999999999999986,107.9019727857624,112.4402752815238,7.873069839280094,3.999649386349822,0.6697442200255181,0.28181542193258013,higher,0.07472235411245196 +ENSG00000159111,47824248,GTCGG,-0.03085980272588653,0.2572080353354743,-1.133014806837644,0.011050314233751043,0.041910116959637575,115.99999999999999,62.000000000000014,77.10016988712697,82.9442166727511,2.369216659528287,13.52376648291575,0.3798422426393312,0.09637192119301474,higher,0.0312808850995031 +ENSG00000159111,47824123,ACTTG,-0.02624963570890193,0.07232539426927774,-1.7970644144141719,0.9737349801490716,0.9999846158579735,120.0,65.0,79.55888615064778,83.17929295928131,3.978161814104624,1.7397181680009104,0.8230679689814844,0.2032185670231157,higher,0.014366787643372464 +ENSG00000159111,47828603,ATGCA,-0.023100055342385926,0.5551709921425578,-0.5900293209432612,0.03742355795250624,0.06052361329489216,81.99999999999999,51.999999999999986,78.53335445907138,91.10083974428235,5.497938852977398,22.90518355798332,0.05871756947045021,0.03359755133562116,higher,0.08767131930171466 +ENSG00000159111,47823524,CACCC,0.09436055915863974,0.00038546887564653784,3.549837592321818,0.09437571021466834,1.5151056028605191e-05,120.99999999999993,66.0,74.61951026950321,77.45657870695648,2.2002109360638666,10.050188040809664,0.8614320564379898,0.4036718838677119,higher,0.05698576875152743 +ENSG00000159111,47827080,GCTGC,-0.2047424734188367,0.004857369390330349,-2.8163435518314572,0.1944854092285269,0.3992278826473636,106.0,63.000000000000014,82.47985329676693,84.9240455000647,1.3149501726444301,3.9419344085817585,0.7388438292304613,0.6001210174719601,higher,0.012478739463631582 +ENSG00000159111,47823493,GGAGC,0.15350986810835357,4.426752157601139e-05,4.083997423982608,0.1535271088931541,1.7240784800524122e-05,92.0,58.0,119.19982188500161,109.11684566821852,19.473606743879706,135.08249689534364,0.7265130543267264,0.03385287814932425,lower,0.030953685982915948 +ENSG00000159111,47824135,ACATG,-0.1573338920923133,9.402245789829983e-05,-3.905521345869372,0.818724623505366,0.9760585155976793,117.99999999999997,64.0,81.02778514502324,77.07565464396366,5.056841610392676,1.7804715873695345,0.3856655032430878,0.3231744100535753,lower,0.026965068567592485 +ENSG00000159111,47826651,ATTCC,0.1260307106823133,0.10594609526006406,1.6166859174797683,0.6997295335371901,0.5736988228548768,104.99999999999997,60.0,75.33721477929677,81.0793556528109,2.1277399502681997,5.744592425903884,0.19001854231566606,0.14334241605517617,higher,0.07510932536145176 +ENSG00000159111,47826737,CTGCC,-0.2569793452987109,0.0006699908167311064,-3.401573612971037,0.18924279163897711,0.44622213693768803,101.00000000000003,58.99999999999999,91.20785303287462,88.2640009924222,3.1524840498105555,21.5102297362343,0.9292639553773346,0.39434904829849726,lower,0.03031108702209443 +ENSG00000159111,47824138,GGGAC,-0.7463895224331375,3.645062303768258e-69,-17.577790516005262,0.25359229640981373,0.9999818188429512,104.99999999999999,55.0,118.87299383205826,115.412308525127,3.8556974417232373,9.860865899008093,0.8540842745512908,0.3639896536818942,lower,1.0280555928024517e-07 +ENSG00000159111,47824155,GCTGT,-0.05137596736874417,0.010502518217869513,-2.5588296832394235,0.9486088815752272,0.9999848489439713,120.99999999999996,66.0,85.33372763368037,82.76321431157525,5.837099172035399,1.7144826168461411,0.7299683820192092,0.5776866960789617,lower,0.05159261723263683 +ENSG00000159111,47826668,ATCTT,-0.10071142063243196,0.0203846224225383,-2.3191921039319805,0.01994286795405384,0.1206542885864858,112.00000000000003,62.00000000000001,78.86420816867931,80.58551050781782,0.8838950497370177,2.8902906836998565,0.997767532966251,0.4072464311221511,higher,0.05782921408633931 +ENSG00000159111,47828503,AGGAG,0.19905084652982924,0.012035434215804885,2.5111036823123563,0.6101567142692859,0.4111058677394566,100.0,61.999999999999986,117.31694970549972,119.5694138519588,9.155633821478776,1.5746649542796338,0.8432203774245862,0.3637026053767607,higher,0.07513635533007339 +ENSG00000159111,47823640,AACCA,-0.3438294684022528,1.222013447320187e-06,-4.852034521920539,0.33902135872563843,0.6828508271278912,121.99999999999997,68.00000000000001,84.20781292499409,81.22722218514258,4.844634232919183,2.7650220841181747,0.6467394996856056,0.5468999017163171,lower,0.004090727545529284 +ENSG00000159111,47824433,CTCAG,0.14344437952132838,0.001055167716055461,3.2753884621496763,0.18069471990552122,0.03725034038419285,112.99999999999997,58.99999999999999,78.42812945359269,76.13572245477211,1.8889260560878816,10.999556150980023,0.6801707057477607,0.5589051536021619,lower,0.005545143116512402 +ENSG00000159111,47824176,TAAAT,-0.02085354771934653,0.25065945412641477,-1.148749097873772,8.620541025154738e-06,0.020862168260371686,116.0,62.0,108.02249065734576,111.76150747250423,2.7976998621820863,22.117202280562285,0.8556561259946707,0.22503461341566766,higher,0.028820548901812928 +ENSG00000159111,47831508,TGGCT,0.02839374897130516,0.21394601649191602,1.2427878620919894,0.028424050165172198,3.0301193867038366e-05,53.00000000000001,33.0,113.7950910733346,100.94032777647355,18.065669838173843,133.88491956901524,0.3306973626605594,0.14757532976825077,lower,0.02303658322671936 +ENSG00000159111,47824213,CGGAC,0.6720959024451475,2.1071094039983613e-51,15.082628358684712,0.672113143229948,1.7240784800524122e-05,111.0,58.0,120.00163665518487,125.19468784282061,16.08778611492367,2.526013049799163,0.7768737718839485,0.1754841173774615,higher,0.0021178493362134965 +ENSG00000159111,47823841,CCACA,0.02677884977788927,0.0717919610549931,1.8004351104035219,0.02679423391991567,1.5384142026399187e-05,118.00000000000003,65.0,74.52356963483328,78.1381904914351,1.8854845064105978,8.593141694627315,0.5669363219871126,0.1769834833421774,higher,0.0823208686002436 +ENSG00000159111,47824104,GTTTG,0.16317102351454738,0.021941306404005434,2.2913824033091377,0.770988045628201,0.6078170221136536,120.99999999999999,66.00000000000001,78.76103573630567,76.28052763207096,2.337565475917501,0.6965804992168014,0.9155242504212666,0.17218567373600546,lower,0.00733665426808102 +ENSG00000159111,47823547,GGTGT,0.07299805616149735,0.2759677238731154,1.0894222502037554,0.801192644158786,0.7281945879972886,113.99999999999999,64.0,98.88139203367277,84.12647034329181,102.32865462201772,18.591960331813166,0.5466238926672187,0.35764127178119065,lower,0.09734325161561792 +ENSG00000159111,47823487,CTGCT,-0.10087363471359302,0.05461782768145672,-1.9219040853849172,0.060684540260202854,0.16155817497379588,99.99999999999999,61.99999999999998,101.75606424074185,88.74032005954138,5.0757807394276355,9.410337966442238,0.11851363185226058,0.009394837646927145,lower,0.045145833871255495 +ENSG00000159111,47826731,CTTTT,0.15694208501853862,0.031463407750529915,2.1511620947348704,0.4179683643596161,0.26102627934107747,110.0,61.99999999999997,78.35327508959789,82.49912969231677,0.5552757331799117,1.9791584914433653,0.49101657791921505,0.1568335206885891,higher,0.07219594086878109 +ENSG00000159111,47824242,CAATG,0.0723872792860073,0.053764127579451815,1.9287321117706333,0.9851363841391912,0.912749104853184,117.99999999999996,61.999999999999986,100.29148372179296,106.61362188241664,14.99912904269116,5.857304590643756,0.4311037709503257,0.21293420961947063,higher,0.04895622420810198 +ENSG00000159111,47828654,CTCCA,-0.028930449273751414,0.3420341758305009,-0.9501536699519207,0.0173311038196979,0.046261553093449315,95.00000000000003,58.99999999999999,70.98970302504732,66.90082770522572,2.4588449844661744,8.731283153292269,0.5928894889337586,0.21382421037397426,lower,0.09699699198772598 +ENSG00000159111,47826671,CGGAT,-0.08052026712519732,0.05095620120612075,-1.9518484405541894,0.018929812887554767,0.09945008001275209,100.99999999999999,58.99999999999999,131.47930164714307,126.11265059054497,1.9918040118370814,21.98063860393461,0.40152743768219856,0.39307537930524616,lower,0.023796487053525887 diff --git a/xpore/test/neues_config.yml b/xpore/test/neues_config.yml deleted file mode 100644 index cef73a1..0000000 --- a/xpore/test/neues_config.yml +++ /dev/null @@ -1,15 +0,0 @@ -notes: Pairwise comparison without replicates with default parameter setting. - -data: - KO: - rep1: /mnt/dataHDD/wanyk/run_others/GIS_Hct116_directRNA_Rep2-Run1/xpore/xpore/test/data/data/HEK293T-METTL3-KO-rep1/dataprep - WT: - rep1: /mnt/dataHDD/wanyk/run_others/GIS_Hct116_directRNA_Rep2-Run1/xpore/xpore/test/data/data/HEK293T-WT-rep1/dataprep - -out: ./out - -method: - prefiltering: - method: t-test - threshold: 0.1 - diff --git a/xpore/test/test_diffmod.py b/xpore/test/test_diffmod.py index cd16523..e4c14c1 100644 --- a/xpore/test/test_diffmod.py +++ b/xpore/test/test_diffmod.py @@ -6,20 +6,9 @@ import subprocess from xpore.scripts import diffmod -#@pytest.fixture -#def dataprep_args(): -# return { -# 'eventalign': os.path.join(os.path.abspath(os.path.dirname(__file__)), "data/eventalign.txt"), -# 'out_dir': 'dataprep', -# 'readcount_min': 1, -# 'readcount_max': 1000, -# 'n_processes': 2 -# } - @pytest.fixture def diffmod_args(): class DiffmodArgs: - #config = os.path.join(os.path.abspath(os.path.dirname(__file__)), "data/config.yml") outfile=open(os.path.join(os.path.abspath(os.path.dirname(__file__)),'neues_config.yml'),'w') for ln in open(os.path.join(os.path.abspath(os.path.dirname(__file__)), "data/config.yml"),'r'): if 'rep1' in ln: @@ -36,6 +25,14 @@ class DiffmodArgs: return DiffmodArgs def test_diffmod(diffmod_args): - #cmd = ['xpore diffmod --config',os.path.join(os.path.abspath(os.path.dirname(__file__)), "data/config.yml"),'--n_processes 4'] - #subprocess.run(' '.join(cmd), shell=True, check=True) diffmod.diffmod(diffmod_args) + + assert(os.path.exists(os.path.join(os.path.abspath(os.path.dirname(__file__)), "out/diffmod.table"))) + test_diffmod_path=os.path.join(os.path.abspath(os.path.dirname(__file__)), "out/diffmod.table") + original_diffmod_path=os.path.join(os.path.abspath(os.path.dirname(__file__)), "data/original_diffmod.table") + test_diffmod_table=pd.read_csv(test_diffmod_path).sort_values(["id", "position", "kmer"]).reset_index(drop=True) + original_diffmod_table=pd.read_csv(original_diffmod_path).sort_values(["id", "position", "kmer"]).reset_index(drop=True) + + assert(np.all(original_diffmod_table["id"] == test_diffmod_table["id"])) + assert(np.allclose(original_diffmod_table["diff_mod_rate_KO_vs_WT"], test_diffmod_table["diff_mod_rate_KO_vs_WT"])) + assert(np.allclose(original_diffmod_table["z_score_KO_vs_WT"], test_diffmod_table["z_score_KO_vs_WT"]))