From 36027f2dfc10bcfdbdc360ca94dcca401b7ce40c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Joaqu=C3=ADn=20T=C3=A1rraga=20Gim=C3=A9nez?= Date: Tue, 18 Jul 2023 09:47:46 +0200 Subject: [PATCH 01/50] app: use the full qualified names for study IDs when calculating pedigree grap in migration step, #TASK-4770 --- .../v2_8_0/catalog/CalculatePedigreeGraphMigration.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/opencga-app/src/main/java/org/opencb/opencga/app/migrations/v2_8_0/catalog/CalculatePedigreeGraphMigration.java b/opencga-app/src/main/java/org/opencb/opencga/app/migrations/v2_8_0/catalog/CalculatePedigreeGraphMigration.java index 418f6ed3152..7107ae0a919 100644 --- a/opencga-app/src/main/java/org/opencb/opencga/app/migrations/v2_8_0/catalog/CalculatePedigreeGraphMigration.java +++ b/opencga-app/src/main/java/org/opencb/opencga/app/migrations/v2_8_0/catalog/CalculatePedigreeGraphMigration.java @@ -73,7 +73,7 @@ public List getStudies() throws CatalogException { for (Project project : catalogManager.getProjectManager().search(new Query(), projectOptions, token).getResults()) { if (CollectionUtils.isNotEmpty(project.getStudies())) { for (Study study : project.getStudies()) { - String id = project.getId() + ":" + study.getId(); + String id = study.getFqn(); for (Family family : catalogManager.getFamilyManager().search(id, new Query(), familyOptions, token).getResults()) { if (PedigreeGraphUtils.hasMinTwoGenerations(family) && (family.getPedigreeGraph() == null || StringUtils.isEmpty(family.getPedigreeGraph().getBase64()))) { From d3d0328592d2a39ecdf80a2f3a693ceaa49754ff Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jacobo=20Coll=20Morag=C3=B3n?= Date: Fri, 28 Jul 2023 10:13:53 +0100 Subject: [PATCH 02/50] storage: Fix aggregation on consecutive SNV and INS #TASK-4684 --- .../core/variant/VariantStorageBaseTest.java | 64 +++++++++++---- ...RCh38_1_22_v4.2.1_benchmark.partial.vcf.gz | Bin 0 -> 4248 bytes ...RCh38_1_22_v4.2.1_benchmark.partial.vcf.gz | Bin 0 -> 3540 bytes ...RCh38_1_22_v4.2.1_benchmark.partial.vcf.gz | Bin 0 -> 3682 bytes .../hadoop/variant/gaps/FillGapsTask.java | 36 ++++++--- .../HadoopVariantStorageEngineBNDTest.java | 2 +- ...oopVariantStorageEngineDuplicatedTest.java | 2 +- .../variant/VariantHadoopMultiSampleTest.java | 6 +- .../HadoopVariantDBAdaptorMultiFileTest.java | 4 +- .../analysis/gwas/FisherTestDriverTest.java | 2 +- .../hadoop/variant/gaps/FillGapsTaskTest.java | 33 +++++--- .../hadoop/variant/gaps/FillGapsTest.java | 75 ++++++++++++++++-- .../variant/io/HadoopVariantExporterTest.java | 2 +- ...ariantStatisticsManagerMultiFilesTest.java | 2 +- .../HadoopVariantStatisticsManagerTest.java | 8 +- .../variant/stats/SampleVariantStatsTest.java | 2 +- 16 files changed, 179 insertions(+), 59 deletions(-) create mode 100644 opencga-storage/opencga-storage-core/src/test/resources/giab_chinesse/HG005_GRCh38_1_22_v4.2.1_benchmark.partial.vcf.gz create mode 100644 opencga-storage/opencga-storage-core/src/test/resources/giab_chinesse/HG006_GRCh38_1_22_v4.2.1_benchmark.partial.vcf.gz create mode 100644 opencga-storage/opencga-storage-core/src/test/resources/giab_chinesse/HG007_GRCh38_1_22_v4.2.1_benchmark.partial.vcf.gz diff --git a/opencga-storage/opencga-storage-core/src/test/java/org/opencb/opencga/storage/core/variant/VariantStorageBaseTest.java b/opencga-storage/opencga-storage-core/src/test/java/org/opencb/opencga/storage/core/variant/VariantStorageBaseTest.java index e7ceeee7970..fe5313bdc80 100644 --- a/opencga-storage/opencga-storage-core/src/test/java/org/opencb/opencga/storage/core/variant/VariantStorageBaseTest.java +++ b/opencga-storage/opencga-storage-core/src/test/java/org/opencb/opencga/storage/core/variant/VariantStorageBaseTest.java @@ -17,8 +17,11 @@ package org.opencb.opencga.storage.core.variant; import org.apache.commons.lang3.RandomStringUtils; +import org.junit.Test; import org.junit.*; import org.junit.rules.ExpectedException; +import org.junit.rules.TestWatcher; +import org.junit.runner.Description; import org.opencb.biodata.formats.io.FileFormatException; import org.opencb.biodata.models.variant.Variant; import org.opencb.commons.datastore.core.ObjectMap; @@ -37,6 +40,7 @@ import java.io.IOException; import java.io.InputStream; +import java.lang.reflect.Method; import java.net.URI; import java.net.URISyntaxException; import java.nio.file.Files; @@ -115,6 +119,10 @@ public abstract class VariantStorageBaseTest extends GenericTest implements Vari @Rule public ExpectedException thrown = ExpectedException.none(); + @ClassRule + public static TestClassNameWatcher testClassNameWatcher = new TestClassNameWatcher(); + + @BeforeClass public static void _beforeClass() throws Exception { // System.setProperty(org.slf4j.impl.SimpleLogger.DEFAULT_LOG_LEVEL_KEY, "debug"); @@ -191,7 +199,7 @@ public static URI getPlatinumFile(int fileId) throws IOException { private static void newRootDir() throws IOException { - rootDir = Paths.get("target/test-data", "junit-opencga-storage-" + TimeUtils.getTimeMillis() + "_" + RandomStringUtils.randomAlphabetic(3)); + rootDir = Paths.get("target/test-data", "junit-" + testClassNameWatcher.getTestClassSimpleName() + "-" + TimeUtils.getTimeMillis() + "_" + RandomStringUtils.randomAlphabetic(3)); Files.createDirectories(rootDir); } @@ -199,21 +207,33 @@ public static void setRootDir(Path rootDir) { VariantStorageBaseTest.rootDir = rootDir; } - public static URI newOutputUri() throws IOException { - return newOutputUri(1, outputUri); - } - - public static URI newOutputUri(int extraCalls) throws IOException { - return newOutputUri(1 + extraCalls, outputUri); - } - - public static URI newOutputUri(int extraCalls, URI outputUri) throws IOException { + protected static URI newOutputUri() throws IOException { + String dirName = null; StackTraceElement[] stackTrace = Thread.currentThread().getStackTrace(); - // stackTrace[0] = "Thread.currentThread" - // stackTrace[1] = "newOutputUri" - // stackTrace[2] = caller method - String testName = stackTrace[2 + extraCalls].getMethodName(); - return newOutputUri(testName, outputUri); + for (int i = 0; i < stackTrace.length; i++) { + StackTraceElement element = stackTrace[i]; + try { + Class aClass = Class.forName(element.getClassName()); + Method method = aClass.getMethod(element.getMethodName()); + if (method.isAnnotationPresent(Test.class) + || method.isAnnotationPresent(Before.class) + || method.isAnnotationPresent(BeforeClass.class) + || method.isAnnotationPresent(After.class) + || method.isAnnotationPresent(AfterClass.class)) { + dirName = element.getMethodName(); + break; + } + } catch (ClassNotFoundException | NoSuchMethodException ignore) { + } + } + if (dirName == null) { + // stackTrace[0] = "Thread.currentThread" + // stackTrace[1] = "newOutputUri" + // stackTrace[2] = caller method + dirName = stackTrace[2].getMethodName(); + } + + return newOutputUri(dirName, outputUri); } protected static URI newOutputUri(String testName) throws IOException { @@ -434,4 +454,18 @@ public void printActiveThreads() { } System.out.println("========================================="); } + + private static class TestClassNameWatcher extends TestWatcher { + + private String testClass; + + @Override + protected void starting(Description d) { + this.testClass = d.getTestClass().getSimpleName(); + } + + public String getTestClassSimpleName() { + return this.testClass; + } + } } diff --git a/opencga-storage/opencga-storage-core/src/test/resources/giab_chinesse/HG005_GRCh38_1_22_v4.2.1_benchmark.partial.vcf.gz b/opencga-storage/opencga-storage-core/src/test/resources/giab_chinesse/HG005_GRCh38_1_22_v4.2.1_benchmark.partial.vcf.gz new file mode 100644 index 0000000000000000000000000000000000000000..798a4bf531f6ee115c7a4a730c85e75d88e4176f GIT binary patch literal 4248 zcmV;J5NGcniwFp)Pr_sX14u_OFg0ICQbTAnIA1YeGBRIwG%hkOF<)Y3ZewU|VRCCO zaA9(EX<=+Gc4KA$?VS5_+DP)if7bmKD(9EoI+>k^Gq@*X1DIDQst6C zfbIaXNF?jK?En7l9=(OY;$g>kaU4v7G(A1jpXu&-h*z&h{?r=<%b6Rsf9t;athd-- zUda#7-N$lsVPUue*?o|JyUcB$W?p=5K7a!iYF0O9iQtQ*nS?Oc> z>Dv$Qe(PLUFM%+S^%Z2D{i%9WPzNjep>hk{L$E&e>(^>&sS4Y4iES%IumN$)DvfAO zz4m7a7=>rL|^s_%t z0J`g6-=6{(o;4cX*#L+FfYZWwyAyXk#mTH;mk0)?~6=CZjetn0>fRp30=Q#cabcjv!OdWfDep5PG;wBa>-SgInwvdWuY@ zNi1U6<`HC?nM}jxI>_XQ%d|3?xJK5H^E59&@&rOh9#&e=n+OJ%SMyX;SUu@7@;g1Ou8_MZCgk1 zPAnTsFg&THiz5K~_uPvLq7#Uqhs*p&rl!f5sna8fe3z*y3~_`Z^!jhVVd0Q|;O*9n>4?LhQ^5(KDxybzVa&h_U*Z`we^ zFqnB23%a>FQi?itmoPhwd8XuU5jOz(3?!t(0E!}Usy|yyeJBYH2>yLP4pt$U878bA zHUsOaDm@qn^XYv9P4PCh8-RQ-^3)#KY~~M8%93hQPmhN21D- z=FQw_Fp>IQynpjSYIlAGZm_}n!AU=e+$k6z>@)NhFb>1jYzB(EgJl5T5fw^%L{q&# z2Gi9LHGTJy$U`(D#l^g zpQF{>%x}6;tlcyixF|_W-Me&nr%+}Dfgtq;iLYC86&ku8A0>crS#Kmq8r%*(H2`lI z`9K%8rB!Zb#?+piWTW))ERj^PGbK-_T9|lD>3{aoF!M{P>vdyuL!EJqfk-ijP`dO6 zQR2DRxJmMtjof6+m79=ywS567d&L9#G7+@1nUAIbbPv{6>4>_z@d8#|+o4!T1N|?3 z#IUMwGyG(nItGv6edajX7DVsC{yP(|kxDkbYne(eB%c}~t_C7Z9 zl+Zc7RQ=yq?$nR&>#Ky8!yrJAlg|05B9|54mUK%zB0L-*A#PlS&@Y<0k|9GT{KdE? z#d$7-y`;8kQ#$9J%geMi*AKKNN!Dc_hILI@mwvG5y4isAP>Gi>Pk9SA>Nju--MkM| zL)EmZQGFMUD*UkY$Nt)&|4GlTpAFO8DFcPB7%{MGF8S}T^;y1hAW6Hhf+;2n(FE7xCY7s34XAHmGi zZi1;lym@UJcZ;($Mz^~+w`CP>(@SRvH(oD^8!bKW&b{}-TfBT$iLdQsb*?j=_95Z( zX4l@rbEELqpi#gGOlNPyX|OP~P4`VBgQhnry}omP0VUyrY1b`!6Pa{w5`8N=~zPE^?DHg%hE3$|#t$uk^c}Za4qc zlfPbUT(WUe{|(Nty-Ugswck<;*g(c1rHvN_?U|qApUoOAmB3q2x@9P z{SE$N9SB4Ei>@a9#0wDryFk#d41s{&6dE_Pclf&&L`)&QL|wq(wK!-O)9Gpk88VtG zXG7o2hPK7Pr4Gy?GPglgqN3O7|DUeanGkEbyvFNVtr4|a<7xFdK`po$kozL2RW8ZK z>2J2<7(^Q2&de$`_>DxZM1$Aj2@s!Rcu3?Ar5k$c{(Ai;QF^P})Aw?Fo1(OFR3}&;kDsw?Y#e#lL;T(u;zN#$+72Z| zvvtQ5nrSqA|>M0zaBDGzaqr8W0fPt8X}cr!*<4|7J|l(?S+qcWeG4~h=XPb z&9<_43ZLPslSD*UAm(vh=thi4T~zyq9>;tHkMk|(1^Y5q=BU|pV)GneYkV#T&u8%;d&J57zV4^W%VF;4 zInL^zkQH1s)GeIS+X5*`-zkGM`D?PEC=_N}reO#x-Ue1UI;a+k1!;L8L>C9VrS2>( zmO$3;bmO1K#W}GE6O1MEz1@nXX?&-TKbs0mU+j>z!f{sD*E*ffRtdN?0)8E2u!0Q6 zsIDi??rQzbO=dNPIkANxyr@8;!urocatkJm<(m4o&cuGG_J=HHak-|mvA%U1aLO%` zw4%2|ZCFgMTX&Ui7aG3ZaQI#-YUtZ)++56xi^=Zp;cKU!MG-dLy=EAB1n=(175bgp z3Pp8Ubn|fBRE(xRzsyp1WBv7Q22n!njs+C6MB)%SJ2(R<2xE%Usu)Z?Lgs*{{5TcI#76Od-cNlr)WZa4z+4X63ykkIy6llodv52JD0)a+Xx@DKv1 zft*Wc8fChpYmoLp4-1D;E6>6x0hSEIwzxskMd%L982WN;vGCdjF0kWH3yqt@&~8p^ z=hW!=`K|iR_y>+iHa}MMHkbvAV0u6Emf`I<62Ou_TX@TnH;Bd&B@NkPwmjZz;Mqx; z*mDzJFjuh60$NnDZ7OVTrewVwA$nd(`4cDE9O*ErbVt<0oetaK+{zQ}oEUbzZ0Wef z95i9ufsg0snVvYc<_HP67sSPMz|jc&p8+$oLLvmfP$qQ3(v_1=5C0tcG(ja+HGG<2 zBP0zU7}zc4J_ZweJr__q5_{n3i~S!bs6Uju*SxS2Js;SnwRFhMDM=4zQ&MtYDUIn0 z;=_vq6%hA;u$iaY55gUC>q-*$$b9Z|Jm|ZnmLj#7rQu=)o-V*Av{Ptx#Uh5miD}0R z=FjX5%FAx?P9zoqd*pclI73L)91P4BcNm^ZaCq@i;0&!~=cil0O!^R9-QFH-)o;)q zv^r7i(vHZ`mc`ibhbm0%gf1L>A_c)>nEF}p*Wo%ZBz^)9L)jJ~*$Nn>eoYP^JX*Zv zo8#@KQwO`y(Qv`!Ngh*vlqZoHp;15yIqoVLV;t8|O^wm)oe^I6h7zGzFvB3iPQH_- z-;MWlwCrDpuUZ_sV*eQH6pfC+JhyW$M@*m|Vc}jkF~bs;CP?;9ORKE_n=Uw^R(yn_ zCl7G;ic76eyN|fXa>gMzZJQ%}`(4H3eUrjNoG{B_n!)f}5iHHLaNil%HgZmEg>lQY zvMETb`sE%Qm-{5CR0VW$q6FtOeyBwcC}7YME%8c` ziby5(9qxa>ndL*GM9H*8yGd<3rVw#=c6R1B&n3V8_Bsgt>v%Eq((cdwH=o22`{rBy z<*}FgU1m{bIZVKJ{gdve(KXyj{e}55FkhN4W4yflxA)0QMvGvcnlG-G(I^e#$XxiN zcrpIVU(Nr%9axq+I=$%r`r_!<7q9;J0%(omC=Djv@82DFN7Dr*p&w1sX_pDdl}a#1 zyd?2wSK&=}x}15@<>0(O<<4akUwUDB=|x_6lLX0S;-^Q~UXpr0Y|&&ZnvA+!GWT$r zyr4;4hq+S97HEnUO^ZOQGS@r>GNB70Wa%RTY=HSeP zq{bY3sRuL?^K+0+&2$Z6L^T1X%dX_uCH%;SD_E-(FBMjCQ!#4HyHs~2(uPK2K zI3MnRUc}L4le>>gKS5?txIr}b!v-8C@yy@QptoX2Q!zttF@d~XFXY9|x4wL0<28?^7MGW2%87d?~O#k;$xEv#=@6RkfDXA_y z54{vi$)w5B*$~|3IJnl}OU;siR?FvUFq)dM>(GY~V4_fRY3NUXTy^LK6|Duj?$qF3 zJ(Cf*uaeQDjM0m90o&W)6UQN&kICFs;N6oq4HNAmw1P|w!d?)e*1XbhdTGX87>_)p zL<;w=9o|cra}9x@@CLcB+j12IT~B}%fVf^a)s_as!KcRH4buS7g?l-wZnMPHJ#kW6 z>BDIvU*gUvc|6vV++%A0a~}>%zf`zhFH<+HnZ+206cL2dg+EGj&%K44Jb&4Vn-X)? zEfikuz5u9t#RFuS6S}jSTVnvkgR5-_qHb-xflJp46xV3L|4D!_++@ERo(p!5wk3s0 zOG~Rj9Q5+!GRpwN_%k>w2&>*iZ&RmU@6R$fw&_0r2*GF>rWt`duvE@0*1iJ0V7Ig4 zDN8mt*7X)wLAvl#$YmSo>-?wJW^lcpxQ*8{+AMk}abbrUX)O=Pj3VD3*XjUBp}dgA zWfXiwxaA2%12N=DceW%>Ut;Q&ae`)i+PkmkxnU_Yy(A5-Fmi(Hy_U5_l9|D^=Nt3+Ny)IMxGLcGbq^qxb(sx zy{TUkb`C~>K+c78W+E;(d|NJ-%p!a=ki?G?NC5^zVlH*a&?TjvwG5NGt!z_2m~>q=pgmOX<*Oy{nvRAIoI-yk!$MItyK1!F=|vMv zoI=e96(m-qQJ#-z?^dLO*F_24e|!Gny>a^C!gzOVoWFi!^iGDx*-yO_BP)9hv}7Y& z-_U0|-(WM(5Zo3*NoE`weWTy&4SSn^hO`VcIit){yX;jZ4ey?MqkjZ3c^8JuSrB=z z3PHfY^+c@O?_W^)+tnqre!C)XgA4!T>1%3PzrQLl3lr8udS$}#&+AhzFg^9-=v7TR z)mDa=)MPgI`x9Zt0Gi(`xlp01}=+RuMlH+zlNhr z9n9e#tbB4l=nel_ezR-ztBr`*&HHJ+FdRaP=FiUkx$mXPrKD-hEGR%PlQ5o3vTIzJ zN?Hsu2E)$jMd$dmqiq+ioxz!5eMdV-9cs%CSA;qFmAXy^77}35GkRN?fIl*P2F9Ne z81y@az!0)y6GjPFD>o6eG33rYXe==Uqlgk7$27i1x^A{6HlOe00dGon< z6<{&~JKpC^z?TS%aFJgXtDuEvt|WuWGd`XsJ|N0)H@`|z!H3k|q))ULdB(?+!bcW! z03VDXHth0K(shj3O8bzy=)&t050G0;@*(ylA5|T%Ykym_nwZ*~n3RgEzy-e$bx8}U zRUN5USuI`*AU1(s6a13S1vZ`zV!f_EH?2&W@BVcY!SnHL;P(tBlCGf(#u-W_0uZb;fzrs*0xjsyS=?lI^1%VviLd!#ZQG) zGeWl5At$u_jj;~bRYo0U)Br2SQtntegM-`X;#eWG!=65D;TGxZ@lx!dT{qUr#-gAG z_;Mw~3d2-AbGLfcZ)_R2htQRMtNS zDb?{-j<*del*E0jJn|379aEd%M?Z+nFn-ebK4#p;kQ8p&32u~N_>Dso`J{nAt3xTovP|(7Kk7Axq_dT7}26{gr4SC>R<;Kdl#-5FYV_!@V z4#Wh`2vy~$>uz9x?L63fxU6A+>!Q(dU6VYbmDHhyGr2ozc$Y?XHb}8k;dXSF(zP~p zDV~TfzheC{)E%Xn0v-Jv1{DUEN^x19Ff?l{ZX8kV)Zs2Cx-(ASegt(`7Jn}X-N?`G z)6|27;3BKPz_&yFETvzKoMu#TLW5#Y2t55}iU@SsloRTp&F3(2EGfBVyIB+I$(%wo zJFq+;=_^P)MpDL=>?lPf$74ojb(k$H+Ra;!{jd9UVZX{AHids2ZDt0`6qemW;mLs{ z%qE-`59?BC2&$;dsLG%4$KUz}Vq@3No4NLeT5a&G!2_Hb{UL3_RwKhbJ9&Y-{M$bbWG=B|U=5-JBF#Umh9&bCUBOU$H z2_@9+aG@&jbMu#xh9v->-PJSR?(g!TCdIQf8=vH4060V*6IOvap}0lu?4Wpvo#-#h z-TlcQ%xi?h9cLnsBp>mwpn6 z$s7*UPxvH{OOy@yxDBWQ$CC#+*I?YSo#O2|d@?0_p|b9smpc{GO>3=+t`4cSN+Gv? zT)(ThYEM!5TaLPs$)tYuRi9Y89V%!=QKEPX=ZQpx(l+jq8-J;fYwvLYO=`4#y;Kf1 zZV_7-Qx3iWDJtl(ou~Dt$TNBxqNjM=-|7g3Pt~{%aUFn9_QD%Am~uekUE8Wb!{;EVWN O^8W)+e`Po*U;qH5zrqjz literal 0 HcmV?d00001 diff --git a/opencga-storage/opencga-storage-core/src/test/resources/giab_chinesse/HG007_GRCh38_1_22_v4.2.1_benchmark.partial.vcf.gz b/opencga-storage/opencga-storage-core/src/test/resources/giab_chinesse/HG007_GRCh38_1_22_v4.2.1_benchmark.partial.vcf.gz new file mode 100644 index 0000000000000000000000000000000000000000..a2557925cdd773ae6017b35767d29c7e8e1e41cc GIT binary patch literal 3682 zcmV-o4xRBIiwFphPr_sX14u_OFgIUEQbTAnIA1YeGBRIwG%hkOF<)Y3ZewU|VRCCO zaA9(EX<=+Gc4KA$?OSbg+cpyZ%>D{a`sH2_7w-g_sxvw{Q8MSWeo;HUna+4aJ4dG%yASeprNjB|Ku3RBG zrN~dyV0IPV_NL33A72j72UDgl z1z}1uxxY-elF1ZvxkH@&WfHs+${g3}1oVWggbJ*r>_jMC)08@b;SNksR%?lHCOM<3 z1EH(MgdNP8L%I;UT1}X^E+MLm;aAJa#SB2jJ6QFkT26{l;c!kmkXbD!g_#3J>O#+I zISD0+BS{A3Ti-}7IyRPcMJJD(_!SW=E%MJkg^U8}#%rQjJ{bl~E zQq!T-;iLnR?<+N>kUK4*H}6hHug{IV;aL=RJs-jf`nlt#VcOn2*&% z(;%z&`KI2-rz!l$_U$=Ga@`>+gBt&E=BFuo3=78<6>EZDH1zf#9Yu_J#m0bXwKOz_n_9{|i5 zNGO*9JgO0AhqHMU!jmw7G33qquUmm>Sp#J0r^1|*h8?{ zEF5ciyfNU*>`H(!%cp5Lp4u?#D1Z=P>q#kQ!+ZwUb%&0$ zq0NM@J2kl1tYi%Ct5WnRSM(xV!0i@&5-Q!hadcm)Q&i*R_W7OqUhq$D0x2B(!ygJ|FesRm0v1dub-P6`pjbtM2Z+f=^_|sh3CG5 zn}WY=#Z85|`VdO5wkrVYUU84PECfB;%$+F!)1!Oan24sn^$p#1LGe4*)_qUPf6i;1McS zPnLaOfn9X9v*sx)H8=Y87gu4n@H61DE$nsv<7+#-StoAS>x?#!-f2>kFIhH_W>-lChb0ppg| zIV=s;FsfGlonExT#3|%_kU{E7^i9 zLNR2UmuZyD1=`jw$^ z_tzj$zR>{Qi8i2x>7bIU|(ih!_k;gZ|(EfX)C=yW86S>vl!c z2~$UDFu7jN)5{csd~kg^3lr z9C2_#IUiw`<0{UvbO3Necz!VIBXcd^2M^R>yM}w8k68%M1%e5rqWa__w=GdhC@#3n z(+$YE;H_T`Mx`4@tsKgxb!pwY>sD#DG^<;>$t^tOOB(U8fq{q3-ekIM9%93J-1le& zo4SkGDa71oXiB*Usf0pQcoGR%#?m9)un2Au<}fa~$W7g}YBvMNhJo)59NUb%Q{ZR; zfK`~-5>`479D876W%hRArZt{+aYOfo0C4l3aF9d6K_E^%ChOpl!~}r@cn;uc0uS*V ziiGmGL`-^2$r^ZEoae7ivE@;mmF>b=S9sy~vef%IX}h>nk2HlgUntpVTdbnM8U#h$ z@t6Z4#-q}yTbCB~su8e4U7&duR+dF(az`GIQ z@Z-V7F%Ft3jS~lOB87rABnuu6OG3lr5W7EH?A}r`ey(UviRO5D6fZxSaVjo=#dREE zLf6n54#9DjZ>0ZM{pC>o-E|k>N$bJ)>_puM3E+1`A^6eID1YHj0STab5-5$xi^XOq zz+Cg!7qt~7x{No?MWH8+LSNY71ge-O{E+`M4=};?c@@eGw;>pSA%v?KFL>_AlmM#t z!9&zN#NE=}lkHT$O=ihFiEd%xruxdHYrRWD9 z4iJzJdX(zQ0p%JSR1-vkc>xWDg@AOC73m`6icQeq5BmbJ!3rT_r!?^%E4Dbg_&~nc zD0?TmunF;pDCpC&K}K~!2sw^9NFi<$Q63K5nU0I5DNmS^=+Z|u7YpFyM0BFloPZ=JE%M*iu07a;SrAw=NpUL;opxjvcqM6;7 zw5Rk;1^xW+hW_r5@Qk+xwnjKFt;r?BMDgMrw?3saEQ@seP`0-FKkX{DyBz-AKkzm$ z{m;Ec)cuZ+(%XVUAx8s+JNlFlcohQ>*P={0u;j^V-x-x(Ic)lx(V@8i`#a=S`U!nD zfhxqz(G8~QJ7uy4174oWI8^rzM}0SI0aRfCj&UL`@ffK?$5C6qVz8O)H9+USWUnQ9 z9!mC{PGPiL`u77fwf};m=n)|k%7{kR`aw(96(3S5+P;3$E5=m)!L`ny$BIi7O zap_NUeuX$Lq^(8vntxD3c7eiB;R;Gzau*=2xXhpaz*Bp7@LY$Lm@X}vFSR-O*<)R- z$Vm&O7Ux(9Swx=VP>MO6()dSGDy08Skq A5dZ)H literal 0 HcmV?d00001 diff --git a/opencga-storage/opencga-storage-hadoop/opencga-storage-hadoop-core/src/main/java/org/opencb/opencga/storage/hadoop/variant/gaps/FillGapsTask.java b/opencga-storage/opencga-storage-hadoop/opencga-storage-hadoop-core/src/main/java/org/opencb/opencga/storage/hadoop/variant/gaps/FillGapsTask.java index a5a6e56ef14..4d3718a6250 100644 --- a/opencga-storage/opencga-storage-hadoop/opencga-storage-hadoop-core/src/main/java/org/opencb/opencga/storage/hadoop/variant/gaps/FillGapsTask.java +++ b/opencga-storage/opencga-storage-hadoop/opencga-storage-hadoop-core/src/main/java/org/opencb/opencga/storage/hadoop/variant/gaps/FillGapsTask.java @@ -376,7 +376,7 @@ public boolean getOverlappingVariants(Variant variant, int fileId, List> overlappingRecords) { String chromosome = vcfSlice.getChromosome(); int position = vcfSlice.getPosition(); - Integer resetPosition = null; + Integer resetIteratorIndex = null; boolean isAlreadyPresent = false; int firstIndex = iterator.nextIndex(); // Assume sorted VcfRecords @@ -388,8 +388,8 @@ public boolean getOverlappingVariants(Variant variant, int fileId, String alternate = vcfRecord.getAlternate(); // If the VcfRecord starts after the variant, stop looking for variants if (overlapsWith(variant, chromosome, start, end)) { - if (resetPosition == null) { - resetPosition = Math.max(iterator.previousIndex() - 1, firstIndex); + if (resetIteratorIndex == null) { + resetIteratorIndex = Math.max(iterator.previousIndex() - 1, firstIndex); } // if (skipReferenceVariants && hasAllReferenceGenotype(vcfSlice, vcfRecord)) { @@ -406,8 +406,8 @@ public boolean getOverlappingVariants(Variant variant, int fileId, overlappingRecords.add(ImmutablePair.of(vcfSlice, vcfRecord)); } else if (isRegionAfterVariantStart(start, end, variant)) { - if (resetPosition == null) { - resetPosition = Math.max(iterator.previousIndex() - 1, firstIndex); + if (resetIteratorIndex == null) { + resetIteratorIndex = Math.max(iterator.previousIndex() - 1, firstIndex); } // Shouldn't happen that the first VcfRecord from the iterator is beyond the variant to process, // and is not the first VcfRecord from the slice. @@ -429,14 +429,15 @@ public boolean getOverlappingVariants(Variant variant, int fileId, } } } - if (resetPosition == null && !iterator.hasNext()) { + if (resetIteratorIndex == null && !iterator.hasNext()) { // If the iterator reaches the end without finding any point, reset the iterator - resetPosition = firstIndex; + resetIteratorIndex = firstIndex; } // Send back the iterator - if (resetPosition != null) { -// logger.info("Reset from " + iterator.nextIndex() + " to " + resetPosition + ". fileId : " + fileId + " variant " + variant); - while (iterator.nextIndex() > resetPosition) { + if (resetIteratorIndex != null) { +// logger.info("Reset from " + iterator.nextIndex() + " to " + resetIteratorIndex +// + ". fileId : " + fileId + " variant " + variant); + while (iterator.nextIndex() > resetIteratorIndex) { iterator.previous(); } } @@ -506,10 +507,19 @@ protected LinkedHashMap getSamplePosition(Integer fileId) { }); } + /** + * Checks if the given region is entirely or partially (overlapping) after the variant start. + * + * @param start Start of a region + * @param end End of a region (might be before the start if the region represented an insertion) + * @param variant Variant to check + * @return if the region is after the variant + */ public static boolean isRegionAfterVariantStart(int start, int end, Variant variant) { - int pos = Math.min(start, end); - int variantPos = Math.min(variant.getStart(), variant.getEnd()); - return pos > variantPos; + // Get region max position. In the region represents an insertion, the start might be after the end + int regionMaxPos = Math.max(start, end); + int variantMinPos = Math.min(variant.getStart(), variant.getEnd()); + return regionMaxPos > variantMinPos; } public static boolean overlapsWith(Variant variant, String chromosome, int start, int end) { diff --git a/opencga-storage/opencga-storage-hadoop/opencga-storage-hadoop-core/src/test/java/org/opencb/opencga/storage/hadoop/variant/HadoopVariantStorageEngineBNDTest.java b/opencga-storage/opencga-storage-hadoop/opencga-storage-hadoop-core/src/test/java/org/opencb/opencga/storage/hadoop/variant/HadoopVariantStorageEngineBNDTest.java index 8285823ef2e..aea720d356a 100644 --- a/opencga-storage/opencga-storage-hadoop/opencga-storage-hadoop-core/src/test/java/org/opencb/opencga/storage/hadoop/variant/HadoopVariantStorageEngineBNDTest.java +++ b/opencga-storage/opencga-storage-hadoop/opencga-storage-hadoop-core/src/test/java/org/opencb/opencga/storage/hadoop/variant/HadoopVariantStorageEngineBNDTest.java @@ -19,7 +19,7 @@ public class HadoopVariantStorageEngineBNDTest extends VariantStorageEngineBNDTe @Override protected void loadFiles() throws Exception { super.loadFiles(); - VariantHbaseTestUtils.printVariants(getVariantStorageEngine().getDBAdaptor(), newOutputUri(getTestName().getMethodName())); + VariantHbaseTestUtils.printVariants(getVariantStorageEngine().getDBAdaptor(), newOutputUri()); } } diff --git a/opencga-storage/opencga-storage-hadoop/opencga-storage-hadoop-core/src/test/java/org/opencb/opencga/storage/hadoop/variant/HadoopVariantStorageEngineDuplicatedTest.java b/opencga-storage/opencga-storage-hadoop/opencga-storage-hadoop-core/src/test/java/org/opencb/opencga/storage/hadoop/variant/HadoopVariantStorageEngineDuplicatedTest.java index f17dedc0b8f..0082e869319 100644 --- a/opencga-storage/opencga-storage-hadoop/opencga-storage-hadoop-core/src/test/java/org/opencb/opencga/storage/hadoop/variant/HadoopVariantStorageEngineDuplicatedTest.java +++ b/opencga-storage/opencga-storage-hadoop/opencga-storage-hadoop-core/src/test/java/org/opencb/opencga/storage/hadoop/variant/HadoopVariantStorageEngineDuplicatedTest.java @@ -15,6 +15,6 @@ public class HadoopVariantStorageEngineDuplicatedTest extends VariantStorageEngi public void testDuplicatedVariant() throws Exception { super.testDuplicatedVariant(); - VariantHbaseTestUtils.printVariants(getVariantStorageEngine().getDBAdaptor(), newOutputUri(getTestName().getMethodName())); + VariantHbaseTestUtils.printVariants(getVariantStorageEngine().getDBAdaptor(), newOutputUri()); } } diff --git a/opencga-storage/opencga-storage-hadoop/opencga-storage-hadoop-core/src/test/java/org/opencb/opencga/storage/hadoop/variant/VariantHadoopMultiSampleTest.java b/opencga-storage/opencga-storage-hadoop/opencga-storage-hadoop-core/src/test/java/org/opencb/opencga/storage/hadoop/variant/VariantHadoopMultiSampleTest.java index 673fe944ba7..e9e99cdb884 100644 --- a/opencga-storage/opencga-storage-hadoop/opencga-storage-hadoop-core/src/test/java/org/opencb/opencga/storage/hadoop/variant/VariantHadoopMultiSampleTest.java +++ b/opencga-storage/opencga-storage-hadoop/opencga-storage-hadoop-core/src/test/java/org/opencb/opencga/storage/hadoop/variant/VariantHadoopMultiSampleTest.java @@ -384,7 +384,7 @@ public void testMultipleFilesConcurrent(ObjectMap extraParams) throws Exception } studyMetadata = dbAdaptor.getMetadataManager().getStudyMetadata(studyMetadata.getId()); - printVariants(studyMetadata, dbAdaptor, newOutputUri(1)); + printVariants(studyMetadata, dbAdaptor, newOutputUri()); // checkLoadedVariants(expectedVariants, dbAdaptor, PLATINUM_SKIP_VARIANTS); @@ -406,7 +406,7 @@ public void testMultipleFilesConcurrent(ObjectMap extraParams) throws Exception assertNotNull(variantFileMetadata); } - printVariants(studyMetadata, dbAdaptor, newOutputUri(1)); + printVariants(studyMetadata, dbAdaptor, newOutputUri()); } @Test @@ -708,7 +708,7 @@ public StudyMetadata testPlatinumFilesOneByOne(ObjectMap otherParams, int maxFil } } - printVariants(studyMetadata, dbAdaptor, newOutputUri(1)); + printVariants(studyMetadata, dbAdaptor, newOutputUri()); for (Variant variant : dbAdaptor) { System.out.println("variant = " + variant); diff --git a/opencga-storage/opencga-storage-hadoop/opencga-storage-hadoop-core/src/test/java/org/opencb/opencga/storage/hadoop/variant/adaptors/HadoopVariantDBAdaptorMultiFileTest.java b/opencga-storage/opencga-storage-hadoop/opencga-storage-hadoop-core/src/test/java/org/opencb/opencga/storage/hadoop/variant/adaptors/HadoopVariantDBAdaptorMultiFileTest.java index 884f45f39ff..be47dd08890 100644 --- a/opencga-storage/opencga-storage-hadoop/opencga-storage-hadoop-core/src/test/java/org/opencb/opencga/storage/hadoop/variant/adaptors/HadoopVariantDBAdaptorMultiFileTest.java +++ b/opencga-storage/opencga-storage-hadoop/opencga-storage-hadoop-core/src/test/java/org/opencb/opencga/storage/hadoop/variant/adaptors/HadoopVariantDBAdaptorMultiFileTest.java @@ -43,11 +43,11 @@ public void before() throws Exception { boolean wasLoaded = loaded; super.before(); if (loaded && !wasLoaded) { - VariantHbaseTestUtils.printVariants(((VariantHadoopDBAdaptor) variantStorageEngine.getDBAdaptor()), newOutputUri(getClass().getSimpleName())); + VariantHbaseTestUtils.printVariants(((VariantHadoopDBAdaptor) variantStorageEngine.getDBAdaptor()), newOutputUri()); // for (String study : variantStorageEngine.getDBAdaptor().getStudyConfigurationManager().getStudies(null).keySet()) { // variantStorageEngine.fillMissing(study, new ObjectMap(), false); // } -// VariantHbaseTestUtils.printVariants(((VariantHadoopDBAdaptor) variantStorageEngine.getDBAdaptor()), newOutputUri(getClass().getSimpleName())); +// VariantHbaseTestUtils.printVariants(((VariantHadoopDBAdaptor) variantStorageEngine.getDBAdaptor()), newOutputUri()); } } diff --git a/opencga-storage/opencga-storage-hadoop/opencga-storage-hadoop-core/src/test/java/org/opencb/opencga/storage/hadoop/variant/analysis/gwas/FisherTestDriverTest.java b/opencga-storage/opencga-storage-hadoop/opencga-storage-hadoop-core/src/test/java/org/opencb/opencga/storage/hadoop/variant/analysis/gwas/FisherTestDriverTest.java index b083abf3488..0052e805798 100644 --- a/opencga-storage/opencga-storage-hadoop/opencga-storage-hadoop-core/src/test/java/org/opencb/opencga/storage/hadoop/variant/analysis/gwas/FisherTestDriverTest.java +++ b/opencga-storage/opencga-storage-hadoop/opencga-storage-hadoop-core/src/test/java/org/opencb/opencga/storage/hadoop/variant/analysis/gwas/FisherTestDriverTest.java @@ -39,7 +39,7 @@ public class FisherTestDriverTest extends VariantStorageBaseTest implements Hado @Before public void setUp() throws Exception { - localOut = newOutputUri(getClass().getSimpleName()); + localOut = newOutputUri(); } @After diff --git a/opencga-storage/opencga-storage-hadoop/opencga-storage-hadoop-core/src/test/java/org/opencb/opencga/storage/hadoop/variant/gaps/FillGapsTaskTest.java b/opencga-storage/opencga-storage-hadoop/opencga-storage-hadoop-core/src/test/java/org/opencb/opencga/storage/hadoop/variant/gaps/FillGapsTaskTest.java index 18692c8f77a..3d9db73719e 100644 --- a/opencga-storage/opencga-storage-hadoop/opencga-storage-hadoop-core/src/test/java/org/opencb/opencga/storage/hadoop/variant/gaps/FillGapsTaskTest.java +++ b/opencga-storage/opencga-storage-hadoop/opencga-storage-hadoop-core/src/test/java/org/opencb/opencga/storage/hadoop/variant/gaps/FillGapsTaskTest.java @@ -159,18 +159,31 @@ public void testOverlapsWith() { @Test public void testIsRegionAfterVariantStart() { - assertTrue(FillGapsTask.isRegionAfterVariantStart(100, 100, new Variant("1:100:-:T"))); - assertFalse(FillGapsTask.isRegionAfterVariantStart(100, 100, new Variant("1:100:A:T"))); - assertTrue(FillGapsTask.isRegionAfterVariantStart(101, 101, new Variant("1:100:A:T"))); - - assertFalse(FillGapsTask.isRegionAfterVariantStart(99, 99, new Variant("1:100:AAA:GGG"))); - assertFalse(FillGapsTask.isRegionAfterVariantStart(100, 100, new Variant("1:100:AAA:GGG"))); - assertFalse(FillGapsTask.isRegionAfterVariantStart(101, 100, new Variant("1:100:AAA:GGG"))); - assertTrue(FillGapsTask.isRegionAfterVariantStart(101, 101, new Variant("1:100:AAA:GGG"))); - assertTrue(FillGapsTask.isRegionAfterVariantStart(102, 102, new Variant("1:100:AAA:GGG"))); - assertTrue(FillGapsTask.isRegionAfterVariantStart(103, 103, new Variant("1:100:AAA:GGG"))); + isRegionAfterVariantStart(100, 100, "1:100:-:T", true, false); + isRegionAfterVariantStart(101, 101, "1:100:A:T", true, false); + + isRegionAfterVariantStart(99, 99, "1:100:AAA:GGG", false, false); + isRegionAfterVariantStart(100, 100, "1:100:AAA:GGG", false, true); + isRegionAfterVariantStart(101, 100, "1:100:AAA:GGG", true, true); + isRegionAfterVariantStart(101, 101, "1:100:AAA:GGG", true, true); + isRegionAfterVariantStart(102, 102, "1:100:AAA:GGG", true, true); + isRegionAfterVariantStart(103, 103, "1:100:AAA:GGG", true, false); + + isRegionAfterVariantStart(100, 100, "1:101:-:TTT", false, false); + isRegionAfterVariantStart(101, 100, "1:100:A:T", true, false); + + // Overlapping positions + isRegionAfterVariantStart(100, 110, "1:105:A:T", true, true); + isRegionAfterVariantStart(100, 100, "1:100:A:T", false, true); } + private void isRegionAfterVariantStart(int start, int end, String variantString, boolean afterVariant, boolean overlaps) { + Variant variant = new Variant(variantString); + assertEquals("isRegionAfterVariantStart", afterVariant, FillGapsTask.isRegionAfterVariantStart(start, end, variant)); + assertEquals("overlapsWith", overlaps, FillGapsTask.overlapsWith(variant, variant.getChromosome(), start, end)); + } + + @Test public void fillGapsAlreadyPresent() { FillGapsTask task = new FillGapsTask(metadataManager, this.studyMetadata, true, false, GenotypeClass.UNKNOWN_GENOTYPE); diff --git a/opencga-storage/opencga-storage-hadoop/opencga-storage-hadoop-core/src/test/java/org/opencb/opencga/storage/hadoop/variant/gaps/FillGapsTest.java b/opencga-storage/opencga-storage-hadoop/opencga-storage-hadoop-core/src/test/java/org/opencb/opencga/storage/hadoop/variant/gaps/FillGapsTest.java index b23ca96b304..3ae2a36bfbc 100644 --- a/opencga-storage/opencga-storage-hadoop/opencga-storage-hadoop-core/src/test/java/org/opencb/opencga/storage/hadoop/variant/gaps/FillGapsTest.java +++ b/opencga-storage/opencga-storage-hadoop/opencga-storage-hadoop-core/src/test/java/org/opencb/opencga/storage/hadoop/variant/gaps/FillGapsTest.java @@ -1,6 +1,8 @@ package org.opencb.opencga.storage.hadoop.variant.gaps; import com.google.common.collect.BiMap; +import org.apache.hadoop.hbase.client.Scan; +import org.apache.hadoop.hbase.util.Bytes; import org.junit.Assert; import org.junit.Rule; import org.junit.Test; @@ -26,10 +28,13 @@ import org.opencb.opencga.storage.core.variant.adaptors.GenotypeClass; import org.opencb.opencga.storage.core.variant.adaptors.VariantDBAdaptor; import org.opencb.opencga.storage.core.variant.adaptors.VariantQuery; +import org.opencb.opencga.storage.hadoop.variant.GenomeHelper; import org.opencb.opencga.storage.hadoop.variant.HadoopVariantStorageEngine; import org.opencb.opencga.storage.hadoop.variant.HadoopVariantStorageOptions; import org.opencb.opencga.storage.hadoop.variant.HadoopVariantStorageTest; import org.opencb.opencga.storage.hadoop.variant.adaptors.VariantHadoopDBAdaptor; +import org.opencb.opencga.storage.hadoop.variant.adaptors.phoenix.VariantPhoenixKeyFactory; +import org.opencb.opencga.storage.hadoop.variant.adaptors.phoenix.VariantPhoenixSchema; import org.opencb.opencga.storage.hadoop.variant.index.sample.SampleIndexDBAdaptor; import org.opencb.opencga.storage.hadoop.variant.index.sample.SampleIndexSchema; @@ -79,7 +84,7 @@ public void testFillGapsVcfFiles() throws Exception { inputFiles.add(getResourceUri(fileName)); } - StudyMetadata studyMetadata = load(new ObjectMap(VariantStorageOptions.GVCF.key(), false), inputFiles, newOutputUri(1)); + StudyMetadata studyMetadata = load(new ObjectMap(VariantStorageOptions.GVCF.key(), false), inputFiles, newOutputUri()); // Do not check new missing genotypes, as the input files does not have missing genotype regions testFillGapsPlatinumFiles(studyMetadata, false); @@ -217,8 +222,10 @@ public void checkConflictingFiles(StudyMetadata studyMetadata) throws Exception sampleIds.sort(Integer::compareTo); List samples = sampleIds.stream().map(samplesMap::get).collect(Collectors.toList()); + printVariants(studyMetadata, dbAdaptor, newOutputUri()); + fillGaps(variantStorageEngine, studyMetadata, samples); - printVariants(studyMetadata, dbAdaptor, newOutputUri(1)); + printVariants(studyMetadata, dbAdaptor, newOutputUri()); checkFillGaps(studyMetadata, dbAdaptor, samples, Collections.singleton("1:10020:A:T")); checkSampleIndexTable(dbAdaptor); @@ -317,6 +324,62 @@ public void testFillGapsCorpasome() throws Exception { .setSamples(Arrays.asList("ISDBM322015", "ISDBM322016", "ISDBM322017", "ISDBM322018")), new ObjectMap()); printVariants((VariantHadoopDBAdaptor) variantStorageEngine.getDBAdaptor(), newOutputUri()); + load(new ObjectMap(VariantStorageOptions.STUDY.key(), STUDY_NAME_2), + Collections.singletonList(getResourceUri("quartet.variants.annotated.partial.vcf.gz"))); + + checkInputValuesAreUnmodified(STUDY_NAME, STUDY_NAME_2); + } + + @Test + public void testFillGapsGiabChinesse() throws Exception { + ObjectMap options = new ObjectMap(VariantStorageOptions.GVCF.key(), true) + .append(HadoopVariantStorageOptions.ARCHIVE_CHUNK_SIZE.key(), 1000000) + .append(VariantStorageOptions.STUDY.key(), STUDY_NAME); + loadGIAB(options); + printVariants((VariantHadoopDBAdaptor) variantStorageEngine.getDBAdaptor(), newOutputUri()); + + variantStorageEngine.aggregateFamily(STUDY_NAME, new VariantAggregateFamilyParams() + .setSamples(Arrays.asList("HG005", "HG006", "HG007")), new ObjectMap()); + printVariants((VariantHadoopDBAdaptor) variantStorageEngine.getDBAdaptor(), newOutputUri()); + + options.put(VariantStorageOptions.STUDY.key(), STUDY_NAME_2); + loadGIAB(options); + + checkInputValuesAreUnmodified(STUDY_NAME, STUDY_NAME_2); + } + + private void checkInputValuesAreUnmodified(String aggregatedStudy, String referenceStudy) throws Exception { + VariantHadoopDBAdaptor dbAdaptor = getVariantStorageEngine().getDBAdaptor(); + + int studyId1 = dbAdaptor.getMetadataManager().getStudyId(aggregatedStudy); + int studyId2 = dbAdaptor.getMetadataManager().getStudyId(referenceStudy); + + dbAdaptor.getHBaseManager().act(dbAdaptor.getVariantTable(), table -> { + table.getScanner(new Scan()).iterator().forEachRemaining(r -> { + byte[] row = r.getRow(); + Variant variant = VariantPhoenixKeyFactory.extractVariantFromVariantRowKey(row); + + NavigableMap cells = r.getFamilyMap(GenomeHelper.COLUMN_FAMILY_BYTES); + for (Map.Entry entry : cells.entrySet()) { + String columnKey = Bytes.toString(entry.getKey()); + Integer studyId = VariantPhoenixSchema.extractStudyId(columnKey, false); + if (studyId != null && studyId == studyId2) { + String otherColumnKey = columnKey.replaceFirst(VariantPhoenixSchema.buildStudyColumnsPrefix(studyId2), + VariantPhoenixSchema.buildStudyColumnsPrefix(studyId1)); + byte[] thisCell = entry.getValue(); + byte[] otherCell = cells.get(Bytes.toBytes(otherColumnKey)); + assertArrayEquals(variant.toString() + " study1ColumnKey " + otherColumnKey + ", study2ColumnKey " + columnKey, + thisCell, otherCell); + } + } + }); + }); + } + + private void loadGIAB(ObjectMap options) throws Exception { + load(options, Collections.singletonList(getResourceUri("giab_chinesse/HG005_GRCh38_1_22_v4.2.1_benchmark.partial.vcf.gz")), newOutputUri(), false); + load(options, Collections.singletonList(getResourceUri("giab_chinesse/HG006_GRCh38_1_22_v4.2.1_benchmark.partial.vcf.gz")), newOutputUri(), false); + load(options, Collections.singletonList(getResourceUri("giab_chinesse/HG007_GRCh38_1_22_v4.2.1_benchmark.partial.vcf.gz")), newOutputUri(), false); } @Test @@ -325,12 +388,12 @@ public void testFillGapsImpact() throws Exception { ObjectMap extraParams = new ObjectMap(VariantStorageOptions.LOAD_HOM_REF.key(), true); // extraParams.append(VariantStorageOptions.TRANSFORM_FORMAT.key(), "proto"); // extraParams.append(VariantStorageOptions.GVCF.key(), true); - StudyMetadata study = load(extraParams, Collections.singletonList(getResourceUri("impact/HG005_GRCh38_1_22_v4.2.1_benchmark.tuned.chr6-31.vcf.gz")), uri, false); + load(extraParams, Collections.singletonList(getResourceUri("impact/HG005_GRCh38_1_22_v4.2.1_benchmark.tuned.chr6-31.vcf.gz")), uri, false); load(extraParams, Collections.singletonList(getResourceUri("impact/HG006_GRCh38_1_22_v4.2.1_benchmark.tuned.chr6-31.vcf.gz")), uri, false); load(extraParams, Collections.singletonList(getResourceUri("impact/HG007_GRCh38_1_22_v4.2.1_benchmark.tuned.chr6-31.vcf.gz")), uri, false); printVariants((VariantHadoopDBAdaptor) variantStorageEngine.getDBAdaptor(), newOutputUri()); - variantStorageEngine.aggregateFamily(study.getName(), new VariantAggregateFamilyParams() + variantStorageEngine.aggregateFamily(STUDY_NAME, new VariantAggregateFamilyParams() .setSamples(Arrays.asList("HG005", "HG006", "HG007")), new ObjectMap()); printVariants((VariantHadoopDBAdaptor) variantStorageEngine.getDBAdaptor(), newOutputUri()); @@ -373,11 +436,11 @@ private StudyMetadata loadPlatinum(ObjectMap extraParams, int from, int to) thro inputFiles.add(getResourceUri(fileName)); } - return load(extraParams, inputFiles, newOutputUri(1)); + return load(extraParams, inputFiles, newOutputUri()); } private StudyMetadata load(ObjectMap extraParams, List inputFiles) throws Exception { - return load(extraParams, inputFiles, newOutputUri(1)); + return load(extraParams, inputFiles, newOutputUri()); } private StudyMetadata load(ObjectMap extraParams, List inputFiles, URI outputUri) throws Exception { diff --git a/opencga-storage/opencga-storage-hadoop/opencga-storage-hadoop-core/src/test/java/org/opencb/opencga/storage/hadoop/variant/io/HadoopVariantExporterTest.java b/opencga-storage/opencga-storage-hadoop/opencga-storage-hadoop-core/src/test/java/org/opencb/opencga/storage/hadoop/variant/io/HadoopVariantExporterTest.java index d0c7fcfc95c..ddb7e993549 100644 --- a/opencga-storage/opencga-storage-hadoop/opencga-storage-hadoop-core/src/test/java/org/opencb/opencga/storage/hadoop/variant/io/HadoopVariantExporterTest.java +++ b/opencga-storage/opencga-storage-hadoop/opencga-storage-hadoop-core/src/test/java/org/opencb/opencga/storage/hadoop/variant/io/HadoopVariantExporterTest.java @@ -235,7 +235,7 @@ public void exportFromSearchIndex() throws Exception { public URI getOutputUri(String fileName) throws IOException { if (exportToLocal) { - return newOutputUri(1).resolve(fileName); + return newOutputUri().resolve(fileName); } else { return URI.create("hdfs:///" + fileName); } diff --git a/opencga-storage/opencga-storage-hadoop/opencga-storage-hadoop-core/src/test/java/org/opencb/opencga/storage/hadoop/variant/stats/HadoopVariantStatisticsManagerMultiFilesTest.java b/opencga-storage/opencga-storage-hadoop/opencga-storage-hadoop-core/src/test/java/org/opencb/opencga/storage/hadoop/variant/stats/HadoopVariantStatisticsManagerMultiFilesTest.java index d63e4c9b6cc..3cce6445d52 100644 --- a/opencga-storage/opencga-storage-hadoop/opencga-storage-hadoop-core/src/test/java/org/opencb/opencga/storage/hadoop/variant/stats/HadoopVariantStatisticsManagerMultiFilesTest.java +++ b/opencga-storage/opencga-storage-hadoop/opencga-storage-hadoop-core/src/test/java/org/opencb/opencga/storage/hadoop/variant/stats/HadoopVariantStatisticsManagerMultiFilesTest.java @@ -51,7 +51,7 @@ public void tearDown() throws Exception { public void calculateStatsMultiCohortsAfterFillMissingTest() throws Exception { VariantStorageEngine storageEngine = getVariantStorageEngine(); storageEngine.aggregate(studyMetadata.getName(), new VariantAggregateParams(false, false), new ObjectMap()); - VariantHbaseTestUtils.printVariants(getVariantStorageEngine().getDBAdaptor(), newOutputUri(getTestName().getMethodName())); + VariantHbaseTestUtils.printVariants(getVariantStorageEngine().getDBAdaptor(), newOutputUri()); calculateStatsMultiCohortsTest(); } diff --git a/opencga-storage/opencga-storage-hadoop/opencga-storage-hadoop-core/src/test/java/org/opencb/opencga/storage/hadoop/variant/stats/HadoopVariantStatisticsManagerTest.java b/opencga-storage/opencga-storage-hadoop/opencga-storage-hadoop-core/src/test/java/org/opencb/opencga/storage/hadoop/variant/stats/HadoopVariantStatisticsManagerTest.java index abebe1e78ab..c98505eeafa 100644 --- a/opencga-storage/opencga-storage-hadoop/opencga-storage-hadoop-core/src/test/java/org/opencb/opencga/storage/hadoop/variant/stats/HadoopVariantStatisticsManagerTest.java +++ b/opencga-storage/opencga-storage-hadoop/opencga-storage-hadoop-core/src/test/java/org/opencb/opencga/storage/hadoop/variant/stats/HadoopVariantStatisticsManagerTest.java @@ -82,14 +82,14 @@ public void tearDown() throws Exception { public void calculateStatsMultiCohortsTest() throws Exception { super.calculateStatsMultiCohortsTest(); - VariantHbaseTestUtils.printVariants(getVariantStorageEngine().getDBAdaptor(), newOutputUri(getTestName().getMethodName())); + VariantHbaseTestUtils.printVariants(getVariantStorageEngine().getDBAdaptor(), newOutputUri()); //delete all stats List cohorts = new ArrayList<>(); metadataManager.getCalculatedCohorts(studyMetadata.getId()).forEach(c -> cohorts.add(c.getName())); variantStorageEngine.deleteStats(studyMetadata.getName(), cohorts, new ObjectMap()); checkCohorts(dbAdaptor, studyMetadata); - VariantHbaseTestUtils.printVariants(getVariantStorageEngine().getDBAdaptor(), newOutputUri(getTestName().getMethodName())); + VariantHbaseTestUtils.printVariants(getVariantStorageEngine().getDBAdaptor(), newOutputUri()); super.calculateStatsMultiCohortsTest(); } @@ -98,14 +98,14 @@ public void calculateStatsMultiCohortsTest() throws Exception { public void calculateStatsSeparatedCohortsTest() throws Exception { super.calculateStatsSeparatedCohortsTest(); - VariantHbaseTestUtils.printVariants(getVariantStorageEngine().getDBAdaptor(), newOutputUri(getTestName().getMethodName())); + VariantHbaseTestUtils.printVariants(getVariantStorageEngine().getDBAdaptor(), newOutputUri()); //delete all stats List cohorts = new ArrayList<>(); metadataManager.getCalculatedCohorts(studyMetadata.getId()).forEach(c -> cohorts.add(c.getName())); variantStorageEngine.deleteStats(studyMetadata.getName(), cohorts, new ObjectMap()); checkCohorts(dbAdaptor, studyMetadata); - VariantHbaseTestUtils.printVariants(getVariantStorageEngine().getDBAdaptor(), newOutputUri(getTestName().getMethodName())); + VariantHbaseTestUtils.printVariants(getVariantStorageEngine().getDBAdaptor(), newOutputUri()); super.calculateStatsSeparatedCohortsTest(); } diff --git a/opencga-storage/opencga-storage-hadoop/opencga-storage-hadoop-core/src/test/java/org/opencb/opencga/storage/hadoop/variant/stats/SampleVariantStatsTest.java b/opencga-storage/opencga-storage-hadoop/opencga-storage-hadoop-core/src/test/java/org/opencb/opencga/storage/hadoop/variant/stats/SampleVariantStatsTest.java index 1fa042eed74..5a3a0a1ea54 100644 --- a/opencga-storage/opencga-storage-hadoop/opencga-storage-hadoop-core/src/test/java/org/opencb/opencga/storage/hadoop/variant/stats/SampleVariantStatsTest.java +++ b/opencga-storage/opencga-storage-hadoop/opencga-storage-hadoop-core/src/test/java/org/opencb/opencga/storage/hadoop/variant/stats/SampleVariantStatsTest.java @@ -69,7 +69,7 @@ public void before() throws Exception { engine.annotate(outputUri, new ObjectMap()); engine.aggregateFamily(study, new VariantAggregateFamilyParams(family, false), new ObjectMap()); - VariantHbaseTestUtils.printVariants(engine.getDBAdaptor(), newOutputUri(getTestName().getMethodName())); + VariantHbaseTestUtils.printVariants(engine.getDBAdaptor(), newOutputUri()); stats = computeSampleVariantStatsDirectly(); } From e360776f15362006d134d49652a0a5f2ecc00a02 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jacobo=20Coll=20Morag=C3=B3n?= Date: Fri, 28 Jul 2023 18:10:41 +0100 Subject: [PATCH 03/50] storage: Allow reloading an indexed variant file. #TASK-4684 --- .../VariantFileIndexerOperationManager.java | 14 +- .../operations/VariantIndexOperationTool.java | 1 + .../alignment/AlignmentAnalysisTest.java | 2 + .../analysis/rga/RgaSolrExtenalResource.java | 38 ++++-- .../manager/VariantOperationsTest.java | 26 ++++ .../VariantInternalCommandExecutor.java | 1 + .../app/cli/main/OpenCgaCompleter.java | 2 +- .../app/cli/main/OpencgaCliOptionsParser.java | 2 +- .../AnalysisVariantCommandExecutor.java | 1 + ...erationsVariantStorageCommandExecutor.java | 2 + .../AnalysisVariantCommandOptions.java | 65 +++++----- ...perationsVariantStorageCommandOptions.java | 122 +++++++++--------- opencga-client/src/main/R/R/Admin-methods.R | 2 +- .../src/main/R/R/Alignment-methods.R | 2 +- opencga-client/src/main/R/R/AllGenerics.R | 18 +-- .../src/main/R/R/Clinical-methods.R | 4 +- opencga-client/src/main/R/R/Cohort-methods.R | 4 +- opencga-client/src/main/R/R/Family-methods.R | 4 +- opencga-client/src/main/R/R/File-methods.R | 4 +- opencga-client/src/main/R/R/GA4GH-methods.R | 2 +- .../src/main/R/R/Individual-methods.R | 4 +- opencga-client/src/main/R/R/Job-methods.R | 4 +- opencga-client/src/main/R/R/Meta-methods.R | 2 +- .../src/main/R/R/Operation-methods.R | 2 +- opencga-client/src/main/R/R/Panel-methods.R | 4 +- opencga-client/src/main/R/R/Project-methods.R | 2 +- opencga-client/src/main/R/R/Sample-methods.R | 4 +- opencga-client/src/main/R/R/Study-methods.R | 4 +- opencga-client/src/main/R/R/User-methods.R | 2 +- opencga-client/src/main/R/R/Variant-methods.R | 2 +- .../client/rest/clients/AdminClient.java | 4 +- .../client/rest/clients/AlignmentClient.java | 4 +- .../rest/clients/ClinicalAnalysisClient.java | 4 +- .../client/rest/clients/CohortClient.java | 4 +- .../rest/clients/DiseasePanelClient.java | 4 +- .../client/rest/clients/FamilyClient.java | 4 +- .../client/rest/clients/FileClient.java | 4 +- .../client/rest/clients/GA4GHClient.java | 4 +- .../client/rest/clients/IndividualClient.java | 4 +- .../client/rest/clients/JobClient.java | 4 +- .../client/rest/clients/MetaClient.java | 4 +- .../client/rest/clients/ProjectClient.java | 4 +- .../client/rest/clients/SampleClient.java | 4 +- .../client/rest/clients/StudyClient.java | 4 +- .../client/rest/clients/UserClient.java | 4 +- .../client/rest/clients/VariantClient.java | 4 +- .../rest/clients/VariantOperationClient.java | 4 +- opencga-client/src/main/javascript/Admin.js | 2 +- .../src/main/javascript/Alignment.js | 2 +- .../src/main/javascript/ClinicalAnalysis.js | 2 +- opencga-client/src/main/javascript/Cohort.js | 2 +- .../src/main/javascript/DiseasePanel.js | 2 +- opencga-client/src/main/javascript/Family.js | 2 +- opencga-client/src/main/javascript/File.js | 2 +- opencga-client/src/main/javascript/GA4GH.js | 2 +- .../src/main/javascript/Individual.js | 2 +- opencga-client/src/main/javascript/Job.js | 2 +- opencga-client/src/main/javascript/Meta.js | 2 +- opencga-client/src/main/javascript/Project.js | 2 +- opencga-client/src/main/javascript/Sample.js | 2 +- opencga-client/src/main/javascript/Study.js | 2 +- opencga-client/src/main/javascript/User.js | 2 +- opencga-client/src/main/javascript/Variant.js | 2 +- .../src/main/javascript/VariantOperation.js | 2 +- .../pyopencga/rest_clients/admin_client.py | 4 +- .../rest_clients/alignment_client.py | 4 +- .../rest_clients/clinical_analysis_client.py | 4 +- .../pyopencga/rest_clients/cohort_client.py | 4 +- .../rest_clients/disease_panel_client.py | 4 +- .../pyopencga/rest_clients/family_client.py | 4 +- .../pyopencga/rest_clients/file_client.py | 4 +- .../pyopencga/rest_clients/ga4gh_client.py | 4 +- .../rest_clients/individual_client.py | 4 +- .../pyopencga/rest_clients/job_client.py | 4 +- .../pyopencga/rest_clients/meta_client.py | 4 +- .../pyopencga/rest_clients/project_client.py | 4 +- .../pyopencga/rest_clients/sample_client.py | 4 +- .../pyopencga/rest_clients/study_client.py | 4 +- .../pyopencga/rest_clients/user_client.py | 4 +- .../pyopencga/rest_clients/variant_client.py | 4 +- .../rest_clients/variant_operation_client.py | 4 +- .../models/variant/VariantIndexParams.java | 58 ++++++++- .../options/StorageVariantCommandOptions.java | 3 + .../core/variant/VariantStoragePipeline.java | 12 +- .../solr/VariantSolrExternalResource.java | 23 ++-- 85 files changed, 370 insertions(+), 242 deletions(-) diff --git a/opencga-analysis/src/main/java/org/opencb/opencga/analysis/variant/manager/operations/VariantFileIndexerOperationManager.java b/opencga-analysis/src/main/java/org/opencb/opencga/analysis/variant/manager/operations/VariantFileIndexerOperationManager.java index 48ff94151d7..94bfada60d5 100644 --- a/opencga-analysis/src/main/java/org/opencb/opencga/analysis/variant/manager/operations/VariantFileIndexerOperationManager.java +++ b/opencga-analysis/src/main/java/org/opencb/opencga/analysis/variant/manager/operations/VariantFileIndexerOperationManager.java @@ -100,6 +100,7 @@ public class VariantFileIndexerOperationManager extends OperationManager { private List filesToIndex; private CatalogStorageMetadataSynchronizer synchronizer; private boolean fullSynchronize = false; + private boolean force; public VariantFileIndexerOperationManager(VariantStorageManager variantStorageManager, VariantStorageEngine engine) { super(variantStorageManager, engine); @@ -138,6 +139,7 @@ private void check(String study, ObjectMap params, String token) throws Exceptio } resume = params.getBoolean(VariantStorageOptions.RESUME.key()); skipIndexedFiles = params.getBoolean(SKIP_INDEXED_FILES); + force = params.getBoolean(VariantStorageOptions.FORCE.key()); // Obtain the type of analysis (transform, load or index) step = getType(load, transform); @@ -589,6 +591,7 @@ private List filterTransformFiles(List fileList, boolean resume) thr break; case VariantIndexStatus.INDEXING: case VariantIndexStatus.TRANSFORMING: + case VariantIndexStatus.LOADING: if (resume) { filteredFiles.add(file); } else { @@ -603,14 +606,17 @@ private List filterTransformFiles(List fileList, boolean resume) thr } break; case VariantIndexStatus.TRANSFORMED: - case VariantIndexStatus.LOADING: case VariantIndexStatus.READY: default: String msg = "We can only " + step + " VCF files not transformed, the status is " + indexStatus; - if (skipIndexedFiles) { - logger.warn(msg); + if (force) { + filteredFiles.add(file); } else { - throw new StorageEngineException(msg); + if (skipIndexedFiles) { + logger.warn(msg); + } else { + throw new StorageEngineException(msg); + } } break; } diff --git a/opencga-analysis/src/main/java/org/opencb/opencga/analysis/variant/operations/VariantIndexOperationTool.java b/opencga-analysis/src/main/java/org/opencb/opencga/analysis/variant/operations/VariantIndexOperationTool.java index c4ba731b647..cce9fc91e8a 100644 --- a/opencga-analysis/src/main/java/org/opencb/opencga/analysis/variant/operations/VariantIndexOperationTool.java +++ b/opencga-analysis/src/main/java/org/opencb/opencga/analysis/variant/operations/VariantIndexOperationTool.java @@ -90,6 +90,7 @@ protected void check() throws Exception { params.put(VariantStorageOptions.ANNOTATE.key(), indexParams.isAnnotate()); params.putIfNotEmpty(VariantStorageOptions.ANNOTATOR.key(), indexParams.getAnnotator()); params.put(VariantStorageOptions.ANNOTATION_OVERWEITE.key(), indexParams.isOverwriteAnnotations()); + params.put(VariantStorageOptions.FORCE.key(), indexParams.isForceReload()); params.put(VariantStorageOptions.RESUME.key(), indexParams.isResume()); params.put(VariantStorageOptions.NORMALIZATION_SKIP.key(), indexParams.getNormalizationSkip()); params.putIfNotEmpty(VariantStorageOptions.NORMALIZATION_REFERENCE_GENOME.key(), indexParams.getReferenceGenome()); diff --git a/opencga-analysis/src/test/java/org/opencb/opencga/analysis/alignment/AlignmentAnalysisTest.java b/opencga-analysis/src/test/java/org/opencb/opencga/analysis/alignment/AlignmentAnalysisTest.java index b855a379b08..71af17f701e 100644 --- a/opencga-analysis/src/test/java/org/opencb/opencga/analysis/alignment/AlignmentAnalysisTest.java +++ b/opencga-analysis/src/test/java/org/opencb/opencga/analysis/alignment/AlignmentAnalysisTest.java @@ -18,6 +18,7 @@ import org.junit.AfterClass; import org.junit.Before; +import org.junit.ClassRule; import org.junit.Test; import org.junit.experimental.categories.Category; import org.junit.runner.RunWith; @@ -95,6 +96,7 @@ public AlignmentAnalysisTest(String storageEngine) { private CatalogManager catalogManager; private VariantStorageManager variantStorageManager; + @ClassRule public static OpenCGATestExternalResource opencga = new OpenCGATestExternalResource(); public static HadoopVariantStorageTest.HadoopExternalResource hadoopExternalResource = new HadoopVariantStorageTest.HadoopExternalResource(); diff --git a/opencga-analysis/src/test/java/org/opencb/opencga/analysis/rga/RgaSolrExtenalResource.java b/opencga-analysis/src/test/java/org/opencb/opencga/analysis/rga/RgaSolrExtenalResource.java index 0884482ef80..3e1378a801d 100644 --- a/opencga-analysis/src/test/java/org/opencb/opencga/analysis/rga/RgaSolrExtenalResource.java +++ b/opencga-analysis/src/test/java/org/opencb/opencga/analysis/rga/RgaSolrExtenalResource.java @@ -5,19 +5,21 @@ import org.apache.solr.client.solrj.SolrServerException; import org.apache.solr.client.solrj.embedded.EmbeddedSolrServer; import org.apache.solr.core.NodeConfig; -import org.apache.solr.core.SolrResourceLoader; import org.junit.rules.ExternalResource; +import org.junit.runner.Description; +import org.junit.runners.model.Statement; import org.opencb.commons.datastore.solr.SolrManager; -import org.opencb.opencga.analysis.variant.manager.VariantStorageManager; import org.opencb.opencga.core.common.GitRepositoryState; +import org.opencb.opencga.core.common.TimeUtils; import org.opencb.opencga.core.config.storage.StorageConfiguration; import java.io.File; import java.io.IOException; +import java.nio.file.Files; import java.nio.file.Path; import java.nio.file.Paths; -import static org.opencb.opencga.storage.core.variant.VariantStorageBaseTest.*; +import static org.opencb.opencga.storage.core.variant.VariantStorageBaseTest.getResourceUri; public class RgaSolrExtenalResource extends ExternalResource { @@ -25,6 +27,7 @@ public class RgaSolrExtenalResource extends ExternalResource { private SolrClient solrClient; protected boolean embeded = true; + private Class testClass; public RgaSolrExtenalResource() { this(true); @@ -34,16 +37,23 @@ public RgaSolrExtenalResource(boolean embeded) { this.embeded = embeded; } + @Override + public Statement apply(Statement base, Description description) { + testClass = description.getTestClass(); + return super.apply(base, description); + } + @Override protected void before() throws Throwable { super.before(); - Path rootDir = getTmpRootDir(); + Path rootDir = Paths.get("target/test-data", "junit-rga-solr-" + TimeUtils.getTimeMillis()); + Files.createDirectories(rootDir); String mainConfigSet = "opencga-rga-configset-" + GitRepositoryState.get().getBuildVersion(); String auxConfigSet = "opencga-rga-aux-configset-" + GitRepositoryState.get().getBuildVersion(); - copyConfigSetConfiguration(mainConfigSet, "managed-schema"); - copyConfigSetConfiguration(auxConfigSet, "aux-managed-schema"); + copyConfigSetConfiguration(mainConfigSet, "managed-schema", rootDir); + copyConfigSetConfiguration(auxConfigSet, "aux-managed-schema", rootDir); String solrHome = rootDir.resolve("solr").toString(); @@ -80,15 +90,15 @@ protected void after() { } } - private void copyConfigSetConfiguration(String configSet, String managedSchemaFile) throws IOException { + private void copyConfigSetConfiguration(String configSet, String managedSchemaFile, Path rootDir) throws IOException { // Copy configuration - getResourceUri("configsets/variantsCollection/solrconfig.xml", "configsets/" + configSet + "/solrconfig.xml"); - getResourceUri("rga/" + managedSchemaFile, "configsets/" + configSet + "/managed-schema"); - getResourceUri("configsets/variantsCollection/params.json", "configsets/" + configSet + "/params.json"); - getResourceUri("configsets/variantsCollection/protwords.txt", "configsets/" + configSet + "/protwords.txt"); - getResourceUri("configsets/variantsCollection/stopwords.txt", "configsets/" + configSet + "/stopwords.txt"); - getResourceUri("configsets/variantsCollection/synonyms.txt", "configsets/" + configSet + "/synonyms.txt"); - getResourceUri("configsets/variantsCollection/lang/stopwords_en.txt", "configsets/" + configSet + "/lang/stopwords_en.txt"); + getResourceUri("configsets/variantsCollection/solrconfig.xml", "configsets/" + configSet + "/solrconfig.xml", rootDir); + getResourceUri("rga/" + managedSchemaFile, "configsets/" + configSet + "/managed-schema", rootDir); + getResourceUri("configsets/variantsCollection/params.json", "configsets/" + configSet + "/params.json", rootDir); + getResourceUri("configsets/variantsCollection/protwords.txt", "configsets/" + configSet + "/protwords.txt", rootDir); + getResourceUri("configsets/variantsCollection/stopwords.txt", "configsets/" + configSet + "/stopwords.txt", rootDir); + getResourceUri("configsets/variantsCollection/synonyms.txt", "configsets/" + configSet + "/synonyms.txt", rootDir); + getResourceUri("configsets/variantsCollection/lang/stopwords_en.txt", "configsets/" + configSet + "/lang/stopwords_en.txt", rootDir); } public RgaEngine configure(StorageConfiguration storageConfiguration) { diff --git a/opencga-analysis/src/test/java/org/opencb/opencga/analysis/variant/manager/VariantOperationsTest.java b/opencga-analysis/src/test/java/org/opencb/opencga/analysis/variant/manager/VariantOperationsTest.java index 38ef6f98a21..13f07647b84 100644 --- a/opencga-analysis/src/test/java/org/opencb/opencga/analysis/variant/manager/VariantOperationsTest.java +++ b/opencga-analysis/src/test/java/org/opencb/opencga/analysis/variant/manager/VariantOperationsTest.java @@ -38,6 +38,7 @@ import org.opencb.opencga.core.common.YesNoAuto; import org.opencb.opencga.core.config.storage.SampleIndexConfiguration; import org.opencb.opencga.core.config.storage.StorageConfiguration; +import org.opencb.opencga.core.exceptions.ToolException; import org.opencb.opencga.core.models.cohort.Cohort; import org.opencb.opencga.core.models.cohort.CohortCreateParams; import org.opencb.opencga.core.models.common.IndexStatus; @@ -57,6 +58,7 @@ import org.opencb.opencga.core.response.OpenCGAResult; import org.opencb.opencga.core.testclassification.duration.LongTests; import org.opencb.opencga.core.tools.result.ExecutionResult; +import org.opencb.opencga.storage.core.exceptions.StorageEngineException; import org.opencb.opencga.storage.core.metadata.models.VariantScoreMetadata; import org.opencb.opencga.storage.core.variant.VariantStorageEngine; import org.opencb.opencga.storage.core.variant.adaptors.VariantQueryParam; @@ -75,6 +77,7 @@ import static org.hamcrest.CoreMatchers.anyOf; import static org.hamcrest.CoreMatchers.is; import static org.junit.Assert.assertEquals; +import static org.junit.Assert.fail; @RunWith(Parameterized.class) @Category(LongTests.class) @@ -277,6 +280,29 @@ public void setUpCatalogManager() throws Exception { } + @Test + public void testVariantFileReload() throws Exception { + + try { + toolRunner.execute(VariantIndexOperationTool.class, STUDY, + new VariantIndexParams() + .setForceReload(false) + .setFile(file.getId()), + Paths.get(opencga.createTmpOutdir()), "index_reload", token); + fail("Should have thrown an exception"); + } catch (ToolException e) { + assertEquals(StorageEngineException.class, e.getCause().getClass()); + assertEquals("We can only INDEX VCF files not transformed, the status is READY", e.getCause().getMessage()); + } + + toolRunner.execute(VariantIndexOperationTool.class, STUDY, + new VariantIndexParams() + .setForceReload(true) + .setFile(file.getId()), + Paths.get(opencga.createTmpOutdir()), "index_reload", token); + + } + @Test public void testVariantSecondaryAnnotationIndex() throws Exception { diff --git a/opencga-app/src/main/java/org/opencb/opencga/app/cli/internal/executors/VariantInternalCommandExecutor.java b/opencga-app/src/main/java/org/opencb/opencga/app/cli/internal/executors/VariantInternalCommandExecutor.java index 4bb045cb874..7d3f514a745 100644 --- a/opencga-app/src/main/java/org/opencb/opencga/app/cli/internal/executors/VariantInternalCommandExecutor.java +++ b/opencga-app/src/main/java/org/opencb/opencga/app/cli/internal/executors/VariantInternalCommandExecutor.java @@ -380,6 +380,7 @@ private void index() throws ToolException { cliOptions.genericVariantIndexOptions.family, cliOptions.genericVariantIndexOptions.somatic, cliOptions.genericVariantIndexOptions.load, + cliOptions.genericVariantIndexOptions.forceReload, cliOptions.genericVariantIndexOptions.loadSplitData, cliOptions.genericVariantIndexOptions.loadMultiFileData, cliOptions.genericVariantIndexOptions.loadSampleIndex, diff --git a/opencga-app/src/main/java/org/opencb/opencga/app/cli/main/OpenCgaCompleter.java b/opencga-app/src/main/java/org/opencb/opencga/app/cli/main/OpenCgaCompleter.java index fa69afab38d..85ed58cd595 100644 --- a/opencga-app/src/main/java/org/opencb/opencga/app/cli/main/OpenCgaCompleter.java +++ b/opencga-app/src/main/java/org/opencb/opencga/app/cli/main/OpenCgaCompleter.java @@ -1,5 +1,5 @@ /* -* Copyright 2015-2023-04-18 OpenCB +* Copyright 2015-2023-07-28 OpenCB * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/opencga-app/src/main/java/org/opencb/opencga/app/cli/main/OpencgaCliOptionsParser.java b/opencga-app/src/main/java/org/opencb/opencga/app/cli/main/OpencgaCliOptionsParser.java index c18998aabcc..67c39990330 100644 --- a/opencga-app/src/main/java/org/opencb/opencga/app/cli/main/OpencgaCliOptionsParser.java +++ b/opencga-app/src/main/java/org/opencb/opencga/app/cli/main/OpencgaCliOptionsParser.java @@ -1,5 +1,5 @@ /* -* Copyright 2015-2023-04-18 OpenCB +* Copyright 2015-2023-07-28 OpenCB * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/opencga-app/src/main/java/org/opencb/opencga/app/cli/main/executors/AnalysisVariantCommandExecutor.java b/opencga-app/src/main/java/org/opencb/opencga/app/cli/main/executors/AnalysisVariantCommandExecutor.java index 601ea3739bf..0bee10fa238 100644 --- a/opencga-app/src/main/java/org/opencb/opencga/app/cli/main/executors/AnalysisVariantCommandExecutor.java +++ b/opencga-app/src/main/java/org/opencb/opencga/app/cli/main/executors/AnalysisVariantCommandExecutor.java @@ -862,6 +862,7 @@ private RestResponse runIndex() throws Exception { putNestedIfNotNull(beanParams, "family",commandOptions.family, true); putNestedIfNotNull(beanParams, "somatic",commandOptions.somatic, true); putNestedIfNotNull(beanParams, "load",commandOptions.load, true); + putNestedIfNotNull(beanParams, "forceReload",commandOptions.forceReload, true); putNestedIfNotEmpty(beanParams, "loadSplitData",commandOptions.loadSplitData, true); putNestedIfNotNull(beanParams, "loadMultiFileData",commandOptions.loadMultiFileData, true); putNestedIfNotEmpty(beanParams, "loadSampleIndex",commandOptions.loadSampleIndex, true); diff --git a/opencga-app/src/main/java/org/opencb/opencga/app/cli/main/executors/OperationsVariantStorageCommandExecutor.java b/opencga-app/src/main/java/org/opencb/opencga/app/cli/main/executors/OperationsVariantStorageCommandExecutor.java index 408f28841f3..1c0b3cb7d13 100644 --- a/opencga-app/src/main/java/org/opencb/opencga/app/cli/main/executors/OperationsVariantStorageCommandExecutor.java +++ b/opencga-app/src/main/java/org/opencb/opencga/app/cli/main/executors/OperationsVariantStorageCommandExecutor.java @@ -530,6 +530,7 @@ private RestResponse indexVariant() throws Exception { putNestedIfNotNull(beanParams, "family",commandOptions.family, true); putNestedIfNotNull(beanParams, "somatic",commandOptions.somatic, true); putNestedIfNotNull(beanParams, "load",commandOptions.load, true); + putNestedIfNotNull(beanParams, "forceReload",commandOptions.forceReload, true); putNestedIfNotEmpty(beanParams, "loadSplitData",commandOptions.loadSplitData, true); putNestedIfNotNull(beanParams, "loadMultiFileData",commandOptions.loadMultiFileData, true); putNestedIfNotEmpty(beanParams, "loadSampleIndex",commandOptions.loadSampleIndex, true); @@ -600,6 +601,7 @@ private RestResponse launcherVariantIndex() throws Exception { putNestedIfNotNull(beanParams, "indexParams.family",commandOptions.indexParamsFamily, true); putNestedIfNotNull(beanParams, "indexParams.somatic",commandOptions.indexParamsSomatic, true); putNestedIfNotNull(beanParams, "indexParams.load",commandOptions.indexParamsLoad, true); + putNestedIfNotNull(beanParams, "indexParams.forceReload",commandOptions.indexParamsForceReload, true); putNestedIfNotEmpty(beanParams, "indexParams.loadSplitData",commandOptions.indexParamsLoadSplitData, true); putNestedIfNotNull(beanParams, "indexParams.loadMultiFileData",commandOptions.indexParamsLoadMultiFileData, true); putNestedIfNotEmpty(beanParams, "indexParams.loadSampleIndex",commandOptions.indexParamsLoadSampleIndex, true); diff --git a/opencga-app/src/main/java/org/opencb/opencga/app/cli/main/options/AnalysisVariantCommandOptions.java b/opencga-app/src/main/java/org/opencb/opencga/app/cli/main/options/AnalysisVariantCommandOptions.java index fc752daaf98..e8a55bf7981 100644 --- a/opencga-app/src/main/java/org/opencb/opencga/app/cli/main/options/AnalysisVariantCommandOptions.java +++ b/opencga-app/src/main/java/org/opencb/opencga/app/cli/main/options/AnalysisVariantCommandOptions.java @@ -925,8 +925,8 @@ public class RunGwasCommandOptions { @Parameter(names = {"--phenotype"}, description = "The body web service phenotype parameter", required = false, arity = 1) public String phenotype; - @Parameter(names = {"--index"}, description = "The body web service index parameter", required = false, arity = 1) - public Boolean index; + @Parameter(names = {"--index"}, description = "The body web service index parameter", required = false, help = true, arity = 0) + public boolean index = false; @Parameter(names = {"--index-score-id"}, description = "The body web service indexScoreId parameter", required = false, arity = 1) public String indexScoreId; @@ -1055,91 +1055,94 @@ public class RunIndexCommandOptions { @Parameter(names = {"--job-tags"}, description = "Job tags", required = false, arity = 1) public String jobTags; - @Parameter(names = {"--file"}, description = "The body web service file parameter", required = false, arity = 1) + @Parameter(names = {"--file"}, description = "List of files to be indexed.", required = false, arity = 1) public String file; - @Parameter(names = {"--resume"}, description = "The body web service resume parameter", required = false, help = true, arity = 0) + @Parameter(names = {"--resume"}, description = "Resume a previously failed indexation", required = false, help = true, arity = 0) public boolean resume = false; - @Parameter(names = {"--outdir"}, description = "The body web service outdir parameter", required = false, arity = 1) + @Parameter(names = {"--outdir"}, description = "Output directory", required = false, arity = 1) public String outdir; - @Parameter(names = {"--transform"}, description = "The body web service transform parameter", required = false, help = true, arity = 0) + @Parameter(names = {"--transform"}, description = "If present it only runs the transform stage, no load is executed", required = false, help = true, arity = 0) public boolean transform = false; - @Parameter(names = {"--gvcf"}, description = "The body web service gvcf parameter", required = false, help = true, arity = 0) + @Parameter(names = {"--gvcf"}, description = "Hint to indicate that the input file is in gVCF format.", required = false, help = true, arity = 0) public boolean gvcf = false; - @Parameter(names = {"--normalization-skip"}, description = "The body web service normalizationSkip parameter", required = false, help = true, arity = 0) + @Parameter(names = {"--normalization-skip"}, description = "Do not execute the normalization process. WARN: INDELs will be stored with the context base", required = false, help = true, arity = 0) public boolean normalizationSkip = false; - @Parameter(names = {"--reference-genome"}, description = "The body web service referenceGenome parameter", required = false, arity = 1) + @Parameter(names = {"--reference-genome"}, description = "Reference genome in FASTA format used during the normalization step for a complete left alignment", required = false, arity = 1) public String referenceGenome; - @Parameter(names = {"--fail-on-malformed-lines"}, description = "The body web service failOnMalformedLines parameter", required = false, arity = 1) + @Parameter(names = {"--fail-on-malformed-lines"}, description = "Fail when encountering malformed lines. (yes, no, auto) [auto]", required = false, arity = 1) public String failOnMalformedLines; - @Parameter(names = {"--family"}, description = "The body web service family parameter", required = false, help = true, arity = 0) + @Parameter(names = {"--family"}, description = "Indicate that the files to be loaded are part of a family. This will set 'load-hom-ref' to YES if it was in AUTO and execute 'family-index' afterwards", required = false, help = true, arity = 0) public boolean family = false; - @Parameter(names = {"--somatic"}, description = "The body web service somatic parameter", required = false, help = true, arity = 0) + @Parameter(names = {"--somatic"}, description = "Indicate that the files to be loaded contain somatic samples. This will set 'load-hom-ref' to YES if it was in AUTO.", required = false, help = true, arity = 0) public boolean somatic = false; - @Parameter(names = {"--load"}, description = "The body web service load parameter", required = false, help = true, arity = 0) + @Parameter(names = {"--load"}, description = "If present only the load stage is executed, transformation is skipped", required = false, help = true, arity = 0) public boolean load = false; - @Parameter(names = {"--load-split-data"}, description = "The body web service loadSplitData parameter", required = false, arity = 1) + @Parameter(names = {"--force-reload"}, description = "If the file is already loaded, force a file reload", required = false, help = true, arity = 0) + public boolean forceReload = false; + + @Parameter(names = {"--load-split-data"}, description = "Indicate that the variants from a group of samples is split in multiple files, either by CHROMOSOME or by REGION. In either case, variants from different files must not overlap.", required = false, arity = 1) public String loadSplitData; - @Parameter(names = {"--load-multi-file-data"}, description = "The body web service loadMultiFileData parameter", required = false, help = true, arity = 0) + @Parameter(names = {"--load-multi-file-data"}, description = "Indicate the presence of multiple files for the same sample. Each file could be the result of a different vcf-caller or experiment over the same sample.", required = false, help = true, arity = 0) public boolean loadMultiFileData = false; - @Parameter(names = {"--load-sample-index"}, description = "The body web service loadSampleIndex parameter", required = false, arity = 1) + @Parameter(names = {"--load-sample-index"}, description = "Build sample index while loading. (yes, no, auto) [auto]", required = false, arity = 1) public String loadSampleIndex; - @Parameter(names = {"--load-archive"}, description = "The body web service loadArchive parameter", required = false, arity = 1) + @Parameter(names = {"--load-archive"}, description = "Load archive data. (yes, no, auto) [auto]", required = false, arity = 1) public String loadArchive; - @Parameter(names = {"--load-hom-ref"}, description = "The body web service loadHomRef parameter", required = false, arity = 1) + @Parameter(names = {"--load-hom-ref"}, description = "Load HOM_REF genotypes. (yes, no, auto) [auto]", required = false, arity = 1) public String loadHomRef; - @Parameter(names = {"--post-load-check"}, description = "The body web service postLoadCheck parameter", required = false, arity = 1) + @Parameter(names = {"--post-load-check"}, description = "Execute post load checks over the database. (yes, no, auto) [auto]", required = false, arity = 1) public String postLoadCheck; - @Parameter(names = {"--include-genotypes"}, description = "The body web service includeGenotypes parameter", required = false, arity = 1) + @Parameter(names = {"--include-genotypes"}, description = "Load the genotype data for the current file. This only applies to the GT field from the FORMAT. All the rest of fields from the INFO and FORMAT will be loaded. Use this parameter skip load data when the GT field is not reliable, or its only value across the file is './.'. If 'auto', genotypes will be automatically excluded if all genotypes are either missing, ./. or 0/0. (yes, no, auto) [auto]", required = false, arity = 1) public String includeGenotypes; - @Parameter(names = {"--include-sample-data"}, description = "The body web service includeSampleData parameter", required = false, arity = 1) + @Parameter(names = {"--include-sample-data"}, description = "Index including other sample data fields (i.e. FORMAT fields). Use 'all', 'none', or CSV with the fields to load.", required = false, arity = 1) public String includeSampleData; - @Parameter(names = {"--merge"}, description = "The body web service merge parameter", required = false, arity = 1) + @Parameter(names = {"--merge"}, description = "Currently two levels of merge are supported: 'basic' mode merge genotypes of the same variants while 'advanced' merge multiallelic and overlapping variants.", required = false, arity = 1) public String merge; - @Parameter(names = {"--deduplication-policy"}, description = "The body web service deduplicationPolicy parameter", required = false, arity = 1) + @Parameter(names = {"--deduplication-policy"}, description = "Specify how duplicated variants should be handled. Available policies: 'discard', 'maxQual'", required = false, arity = 1) public String deduplicationPolicy; - @Parameter(names = {"--calculate-stats"}, description = "The body web service calculateStats parameter", required = false, help = true, arity = 0) + @Parameter(names = {"--calculate-stats"}, description = "Calculate indexed variants statistics after the load step", required = false, help = true, arity = 0) public boolean calculateStats = false; - @Parameter(names = {"--aggregated"}, description = "The body web service aggregated parameter", required = false, arity = 1) + @Parameter(names = {"--aggregated"}, description = "Select the type of aggregated VCF file: none, basic, EVS or ExAC", required = false, arity = 1) public String aggregated; - @Parameter(names = {"--aggregation-mapping-file"}, description = "The body web service aggregationMappingFile parameter", required = false, arity = 1) + @Parameter(names = {"--aggregation-mapping-file"}, description = "File containing population names mapping in an aggregated VCF file", required = false, arity = 1) public String aggregationMappingFile; - @Parameter(names = {"--annotate"}, description = "The body web service annotate parameter", required = false, help = true, arity = 0) + @Parameter(names = {"--annotate"}, description = "Annotate indexed variants after the load step", required = false, help = true, arity = 0) public boolean annotate = false; - @Parameter(names = {"--annotator"}, description = "The body web service annotator parameter", required = false, arity = 1) + @Parameter(names = {"--annotator"}, description = "Annotation source {cellbase_rest, cellbase_db_adaptor}", required = false, arity = 1) public String annotator; - @Parameter(names = {"--overwrite-annotations"}, description = "The body web service overwriteAnnotations parameter", required = false, help = true, arity = 0) + @Parameter(names = {"--overwrite-annotations"}, description = "Overwrite annotations in variants already present", required = false, help = true, arity = 0) public boolean overwriteAnnotations = false; - @Parameter(names = {"--index-search"}, description = "The body web service indexSearch parameter", required = false, help = true, arity = 0) + @Parameter(names = {"--index-search"}, description = "Add files to the secondary search index", required = false, help = true, arity = 0) public boolean indexSearch = false; - @Parameter(names = {"--skip-indexed-files"}, description = "The body web service skipIndexedFiles parameter", required = false, help = true, arity = 0) + @Parameter(names = {"--skip-indexed-files"}, description = "Do not fail if any of the input files was already indexed.", required = false, help = true, arity = 0) public boolean skipIndexedFiles = false; } diff --git a/opencga-app/src/main/java/org/opencb/opencga/app/cli/main/options/OperationsVariantStorageCommandOptions.java b/opencga-app/src/main/java/org/opencb/opencga/app/cli/main/options/OperationsVariantStorageCommandOptions.java index c3c89bf4b1a..8d94148fac3 100644 --- a/opencga-app/src/main/java/org/opencb/opencga/app/cli/main/options/OperationsVariantStorageCommandOptions.java +++ b/opencga-app/src/main/java/org/opencb/opencga/app/cli/main/options/OperationsVariantStorageCommandOptions.java @@ -449,91 +449,94 @@ public class IndexVariantCommandOptions { @Parameter(names = {"--study", "-s"}, description = "Study [[user@]project:]study where study and project can be either the ID or UUID", required = false, arity = 1) public String study; - @Parameter(names = {"--file"}, description = "The body web service file parameter", required = false, arity = 1) + @Parameter(names = {"--file"}, description = "List of files to be indexed.", required = false, arity = 1) public String file; - @Parameter(names = {"--resume"}, description = "The body web service resume parameter", required = false, help = true, arity = 0) + @Parameter(names = {"--resume"}, description = "Resume a previously failed indexation", required = false, help = true, arity = 0) public boolean resume = false; - @Parameter(names = {"--outdir"}, description = "The body web service outdir parameter", required = false, arity = 1) + @Parameter(names = {"--outdir"}, description = "Output directory", required = false, arity = 1) public String outdir; - @Parameter(names = {"--transform"}, description = "The body web service transform parameter", required = false, help = true, arity = 0) + @Parameter(names = {"--transform"}, description = "If present it only runs the transform stage, no load is executed", required = false, help = true, arity = 0) public boolean transform = false; - @Parameter(names = {"--gvcf"}, description = "The body web service gvcf parameter", required = false, help = true, arity = 0) + @Parameter(names = {"--gvcf"}, description = "Hint to indicate that the input file is in gVCF format.", required = false, help = true, arity = 0) public boolean gvcf = false; - @Parameter(names = {"--normalization-skip"}, description = "The body web service normalizationSkip parameter", required = false, help = true, arity = 0) + @Parameter(names = {"--normalization-skip"}, description = "Do not execute the normalization process. WARN: INDELs will be stored with the context base", required = false, help = true, arity = 0) public boolean normalizationSkip = false; - @Parameter(names = {"--reference-genome"}, description = "The body web service referenceGenome parameter", required = false, arity = 1) + @Parameter(names = {"--reference-genome"}, description = "Reference genome in FASTA format used during the normalization step for a complete left alignment", required = false, arity = 1) public String referenceGenome; - @Parameter(names = {"--fail-on-malformed-lines"}, description = "The body web service failOnMalformedLines parameter", required = false, arity = 1) + @Parameter(names = {"--fail-on-malformed-lines"}, description = "Fail when encountering malformed lines. (yes, no, auto) [auto]", required = false, arity = 1) public String failOnMalformedLines; - @Parameter(names = {"--family"}, description = "The body web service family parameter", required = false, help = true, arity = 0) + @Parameter(names = {"--family"}, description = "Indicate that the files to be loaded are part of a family. This will set 'load-hom-ref' to YES if it was in AUTO and execute 'family-index' afterwards", required = false, help = true, arity = 0) public boolean family = false; - @Parameter(names = {"--somatic"}, description = "The body web service somatic parameter", required = false, help = true, arity = 0) + @Parameter(names = {"--somatic"}, description = "Indicate that the files to be loaded contain somatic samples. This will set 'load-hom-ref' to YES if it was in AUTO.", required = false, help = true, arity = 0) public boolean somatic = false; - @Parameter(names = {"--load"}, description = "The body web service load parameter", required = false, help = true, arity = 0) + @Parameter(names = {"--load"}, description = "If present only the load stage is executed, transformation is skipped", required = false, help = true, arity = 0) public boolean load = false; - @Parameter(names = {"--load-split-data"}, description = "The body web service loadSplitData parameter", required = false, arity = 1) + @Parameter(names = {"--force-reload"}, description = "If the file is already loaded, force a file reload", required = false, help = true, arity = 0) + public boolean forceReload = false; + + @Parameter(names = {"--load-split-data"}, description = "Indicate that the variants from a group of samples is split in multiple files, either by CHROMOSOME or by REGION. In either case, variants from different files must not overlap.", required = false, arity = 1) public String loadSplitData; - @Parameter(names = {"--load-multi-file-data"}, description = "The body web service loadMultiFileData parameter", required = false, help = true, arity = 0) + @Parameter(names = {"--load-multi-file-data"}, description = "Indicate the presence of multiple files for the same sample. Each file could be the result of a different vcf-caller or experiment over the same sample.", required = false, help = true, arity = 0) public boolean loadMultiFileData = false; - @Parameter(names = {"--load-sample-index"}, description = "The body web service loadSampleIndex parameter", required = false, arity = 1) + @Parameter(names = {"--load-sample-index"}, description = "Build sample index while loading. (yes, no, auto) [auto]", required = false, arity = 1) public String loadSampleIndex; - @Parameter(names = {"--load-archive"}, description = "The body web service loadArchive parameter", required = false, arity = 1) + @Parameter(names = {"--load-archive"}, description = "Load archive data. (yes, no, auto) [auto]", required = false, arity = 1) public String loadArchive; - @Parameter(names = {"--load-hom-ref"}, description = "The body web service loadHomRef parameter", required = false, arity = 1) + @Parameter(names = {"--load-hom-ref"}, description = "Load HOM_REF genotypes. (yes, no, auto) [auto]", required = false, arity = 1) public String loadHomRef; - @Parameter(names = {"--post-load-check"}, description = "The body web service postLoadCheck parameter", required = false, arity = 1) + @Parameter(names = {"--post-load-check"}, description = "Execute post load checks over the database. (yes, no, auto) [auto]", required = false, arity = 1) public String postLoadCheck; - @Parameter(names = {"--include-genotypes"}, description = "The body web service includeGenotypes parameter", required = false, arity = 1) + @Parameter(names = {"--include-genotypes"}, description = "Load the genotype data for the current file. This only applies to the GT field from the FORMAT. All the rest of fields from the INFO and FORMAT will be loaded. Use this parameter skip load data when the GT field is not reliable, or its only value across the file is './.'. If 'auto', genotypes will be automatically excluded if all genotypes are either missing, ./. or 0/0. (yes, no, auto) [auto]", required = false, arity = 1) public String includeGenotypes; - @Parameter(names = {"--include-sample-data"}, description = "The body web service includeSampleData parameter", required = false, arity = 1) + @Parameter(names = {"--include-sample-data"}, description = "Index including other sample data fields (i.e. FORMAT fields). Use 'all', 'none', or CSV with the fields to load.", required = false, arity = 1) public String includeSampleData; - @Parameter(names = {"--merge"}, description = "The body web service merge parameter", required = false, arity = 1) + @Parameter(names = {"--merge"}, description = "Currently two levels of merge are supported: 'basic' mode merge genotypes of the same variants while 'advanced' merge multiallelic and overlapping variants.", required = false, arity = 1) public String merge; - @Parameter(names = {"--deduplication-policy"}, description = "The body web service deduplicationPolicy parameter", required = false, arity = 1) + @Parameter(names = {"--deduplication-policy"}, description = "Specify how duplicated variants should be handled. Available policies: 'discard', 'maxQual'", required = false, arity = 1) public String deduplicationPolicy; - @Parameter(names = {"--calculate-stats"}, description = "The body web service calculateStats parameter", required = false, help = true, arity = 0) + @Parameter(names = {"--calculate-stats"}, description = "Calculate indexed variants statistics after the load step", required = false, help = true, arity = 0) public boolean calculateStats = false; - @Parameter(names = {"--aggregated"}, description = "Enum param allowed values: NONE, BASIC, EVS, EXAC", required = false, arity = 1) + @Parameter(names = {"--aggregated"}, description = "Select the type of aggregated VCF file: none, basic, EVS or ExAC", required = false, arity = 1) public String aggregated; - @Parameter(names = {"--aggregation-mapping-file"}, description = "The body web service aggregationMappingFile parameter", required = false, arity = 1) + @Parameter(names = {"--aggregation-mapping-file"}, description = "File containing population names mapping in an aggregated VCF file", required = false, arity = 1) public String aggregationMappingFile; - @Parameter(names = {"--annotate"}, description = "The body web service annotate parameter", required = false, help = true, arity = 0) + @Parameter(names = {"--annotate"}, description = "Annotate indexed variants after the load step", required = false, help = true, arity = 0) public boolean annotate = false; - @Parameter(names = {"--annotator"}, description = "The body web service annotator parameter", required = false, arity = 1) + @Parameter(names = {"--annotator"}, description = "Annotation source {cellbase_rest, cellbase_db_adaptor}", required = false, arity = 1) public String annotator; - @Parameter(names = {"--overwrite-annotations"}, description = "The body web service overwriteAnnotations parameter", required = false, help = true, arity = 0) + @Parameter(names = {"--overwrite-annotations"}, description = "Overwrite annotations in variants already present", required = false, help = true, arity = 0) public boolean overwriteAnnotations = false; - @Parameter(names = {"--index-search"}, description = "The body web service indexSearch parameter", required = false, help = true, arity = 0) + @Parameter(names = {"--index-search"}, description = "Add files to the secondary search index", required = false, help = true, arity = 0) public boolean indexSearch = false; - @Parameter(names = {"--skip-indexed-files"}, description = "The body web service skipIndexedFiles parameter", required = false, help = true, arity = 0) + @Parameter(names = {"--skip-indexed-files"}, description = "Do not fail if any of the input files was already indexed.", required = false, help = true, arity = 0) public boolean skipIndexedFiles = false; } @@ -580,91 +583,94 @@ public class LauncherVariantIndexCommandOptions { @Parameter(names = {"--max-jobs"}, description = "The body web service maxJobs parameter", required = false, arity = 1) public Integer maxJobs; - @Parameter(names = {"--index-params-file"}, description = "The body web service file parameter", required = false, arity = 1) + @Parameter(names = {"--index-params-file"}, description = "List of files to be indexed.", required = false, arity = 1) public String indexParamsFile; - @Parameter(names = {"--index-params-resume"}, description = "The body web service resume parameter", required = false, help = true, arity = 0) + @Parameter(names = {"--index-params-resume"}, description = "Resume a previously failed indexation", required = false, help = true, arity = 0) public boolean indexParamsResume = false; - @Parameter(names = {"--index-params-outdir"}, description = "The body web service outdir parameter", required = false, arity = 1) + @Parameter(names = {"--index-params-outdir"}, description = "Output directory", required = false, arity = 1) public String indexParamsOutdir; - @Parameter(names = {"--index-params-transform"}, description = "The body web service transform parameter", required = false, help = true, arity = 0) + @Parameter(names = {"--index-params-transform"}, description = "If present it only runs the transform stage, no load is executed", required = false, help = true, arity = 0) public boolean indexParamsTransform = false; - @Parameter(names = {"--index-params-gvcf"}, description = "The body web service gvcf parameter", required = false, help = true, arity = 0) + @Parameter(names = {"--index-params-gvcf"}, description = "Hint to indicate that the input file is in gVCF format.", required = false, help = true, arity = 0) public boolean indexParamsGvcf = false; - @Parameter(names = {"--index-params-normalization-skip"}, description = "The body web service normalizationSkip parameter", required = false, help = true, arity = 0) + @Parameter(names = {"--index-params-normalization-skip"}, description = "Do not execute the normalization process. WARN: INDELs will be stored with the context base", required = false, help = true, arity = 0) public boolean indexParamsNormalizationSkip = false; - @Parameter(names = {"--index-params-reference-genome"}, description = "The body web service referenceGenome parameter", required = false, arity = 1) + @Parameter(names = {"--index-params-reference-genome"}, description = "Reference genome in FASTA format used during the normalization step for a complete left alignment", required = false, arity = 1) public String indexParamsReferenceGenome; - @Parameter(names = {"--index-params-fail-on-malformed-lines"}, description = "The body web service failOnMalformedLines parameter", required = false, arity = 1) + @Parameter(names = {"--index-params-fail-on-malformed-lines"}, description = "Fail when encountering malformed lines. (yes, no, auto) [auto]", required = false, arity = 1) public String indexParamsFailOnMalformedLines; - @Parameter(names = {"--index-params-family"}, description = "The body web service family parameter", required = false, help = true, arity = 0) + @Parameter(names = {"--index-params-family"}, description = "Indicate that the files to be loaded are part of a family. This will set 'load-hom-ref' to YES if it was in AUTO and execute 'family-index' afterwards", required = false, help = true, arity = 0) public boolean indexParamsFamily = false; - @Parameter(names = {"--index-params-somatic"}, description = "The body web service somatic parameter", required = false, help = true, arity = 0) + @Parameter(names = {"--index-params-somatic"}, description = "Indicate that the files to be loaded contain somatic samples. This will set 'load-hom-ref' to YES if it was in AUTO.", required = false, help = true, arity = 0) public boolean indexParamsSomatic = false; - @Parameter(names = {"--index-params-load"}, description = "The body web service load parameter", required = false, help = true, arity = 0) + @Parameter(names = {"--index-params-load"}, description = "If present only the load stage is executed, transformation is skipped", required = false, help = true, arity = 0) public boolean indexParamsLoad = false; - @Parameter(names = {"--index-params-load-split-data"}, description = "The body web service loadSplitData parameter", required = false, arity = 1) + @Parameter(names = {"--index-params-force-reload"}, description = "If the file is already loaded, force a file reload", required = false, help = true, arity = 0) + public boolean indexParamsForceReload = false; + + @Parameter(names = {"--index-params-load-split-data"}, description = "Indicate that the variants from a group of samples is split in multiple files, either by CHROMOSOME or by REGION. In either case, variants from different files must not overlap.", required = false, arity = 1) public String indexParamsLoadSplitData; - @Parameter(names = {"--index-params-load-multi-file-data"}, description = "The body web service loadMultiFileData parameter", required = false, help = true, arity = 0) + @Parameter(names = {"--index-params-load-multi-file-data"}, description = "Indicate the presence of multiple files for the same sample. Each file could be the result of a different vcf-caller or experiment over the same sample.", required = false, help = true, arity = 0) public boolean indexParamsLoadMultiFileData = false; - @Parameter(names = {"--index-params-load-sample-index"}, description = "The body web service loadSampleIndex parameter", required = false, arity = 1) + @Parameter(names = {"--index-params-load-sample-index"}, description = "Build sample index while loading. (yes, no, auto) [auto]", required = false, arity = 1) public String indexParamsLoadSampleIndex; - @Parameter(names = {"--index-params-load-archive"}, description = "The body web service loadArchive parameter", required = false, arity = 1) + @Parameter(names = {"--index-params-load-archive"}, description = "Load archive data. (yes, no, auto) [auto]", required = false, arity = 1) public String indexParamsLoadArchive; - @Parameter(names = {"--index-params-load-hom-ref"}, description = "The body web service loadHomRef parameter", required = false, arity = 1) + @Parameter(names = {"--index-params-load-hom-ref"}, description = "Load HOM_REF genotypes. (yes, no, auto) [auto]", required = false, arity = 1) public String indexParamsLoadHomRef; - @Parameter(names = {"--index-params-post-load-check"}, description = "The body web service postLoadCheck parameter", required = false, arity = 1) + @Parameter(names = {"--index-params-post-load-check"}, description = "Execute post load checks over the database. (yes, no, auto) [auto]", required = false, arity = 1) public String indexParamsPostLoadCheck; - @Parameter(names = {"--index-params-include-genotypes"}, description = "The body web service includeGenotypes parameter", required = false, arity = 1) + @Parameter(names = {"--index-params-include-genotypes"}, description = "Load the genotype data for the current file. This only applies to the GT field from the FORMAT. All the rest of fields from the INFO and FORMAT will be loaded. Use this parameter skip load data when the GT field is not reliable, or its only value across the file is './.'. If 'auto', genotypes will be automatically excluded if all genotypes are either missing, ./. or 0/0. (yes, no, auto) [auto]", required = false, arity = 1) public String indexParamsIncludeGenotypes; - @Parameter(names = {"--index-params-include-sample-data"}, description = "The body web service includeSampleData parameter", required = false, arity = 1) + @Parameter(names = {"--index-params-include-sample-data"}, description = "Index including other sample data fields (i.e. FORMAT fields). Use 'all', 'none', or CSV with the fields to load.", required = false, arity = 1) public String indexParamsIncludeSampleData; - @Parameter(names = {"--index-params-merge"}, description = "The body web service merge parameter", required = false, arity = 1) + @Parameter(names = {"--index-params-merge"}, description = "Currently two levels of merge are supported: 'basic' mode merge genotypes of the same variants while 'advanced' merge multiallelic and overlapping variants.", required = false, arity = 1) public String indexParamsMerge; - @Parameter(names = {"--index-params-deduplication-policy"}, description = "The body web service deduplicationPolicy parameter", required = false, arity = 1) + @Parameter(names = {"--index-params-deduplication-policy"}, description = "Specify how duplicated variants should be handled. Available policies: 'discard', 'maxQual'", required = false, arity = 1) public String indexParamsDeduplicationPolicy; - @Parameter(names = {"--index-params-calculate-stats"}, description = "The body web service calculateStats parameter", required = false, help = true, arity = 0) + @Parameter(names = {"--index-params-calculate-stats"}, description = "Calculate indexed variants statistics after the load step", required = false, help = true, arity = 0) public boolean indexParamsCalculateStats = false; - @Parameter(names = {"--index-params-aggregated"}, description = "Enum param allowed values: NONE, BASIC, EVS, EXAC", required = false, arity = 1) + @Parameter(names = {"--index-params-aggregated"}, description = "Select the type of aggregated VCF file: none, basic, EVS or ExAC", required = false, arity = 1) public String indexParamsAggregated; - @Parameter(names = {"--index-params-aggregation-mapping-file"}, description = "The body web service aggregationMappingFile parameter", required = false, arity = 1) + @Parameter(names = {"--index-params-aggregation-mapping-file"}, description = "File containing population names mapping in an aggregated VCF file", required = false, arity = 1) public String indexParamsAggregationMappingFile; - @Parameter(names = {"--index-params-annotate"}, description = "The body web service annotate parameter", required = false, help = true, arity = 0) + @Parameter(names = {"--index-params-annotate"}, description = "Annotate indexed variants after the load step", required = false, help = true, arity = 0) public boolean indexParamsAnnotate = false; - @Parameter(names = {"--index-params-annotator"}, description = "The body web service annotator parameter", required = false, arity = 1) + @Parameter(names = {"--index-params-annotator"}, description = "Annotation source {cellbase_rest, cellbase_db_adaptor}", required = false, arity = 1) public String indexParamsAnnotator; - @Parameter(names = {"--index-params-overwrite-annotations"}, description = "The body web service overwriteAnnotations parameter", required = false, help = true, arity = 0) + @Parameter(names = {"--index-params-overwrite-annotations"}, description = "Overwrite annotations in variants already present", required = false, help = true, arity = 0) public boolean indexParamsOverwriteAnnotations = false; - @Parameter(names = {"--index-params-index-search"}, description = "The body web service indexSearch parameter", required = false, help = true, arity = 0) + @Parameter(names = {"--index-params-index-search"}, description = "Add files to the secondary search index", required = false, help = true, arity = 0) public boolean indexParamsIndexSearch = false; - @Parameter(names = {"--index-params-skip-indexed-files"}, description = "The body web service skipIndexedFiles parameter", required = false, help = true, arity = 0) + @Parameter(names = {"--index-params-skip-indexed-files"}, description = "Do not fail if any of the input files was already indexed.", required = false, help = true, arity = 0) public boolean indexParamsSkipIndexedFiles = false; } diff --git a/opencga-client/src/main/R/R/Admin-methods.R b/opencga-client/src/main/R/R/Admin-methods.R index 11b7d569372..d3e67c50d4a 100644 --- a/opencga-client/src/main/R/R/Admin-methods.R +++ b/opencga-client/src/main/R/R/Admin-methods.R @@ -2,7 +2,7 @@ # WARNING: AUTOGENERATED CODE # # This code was generated by a tool. -# Autogenerated on: 2023-04-18 +# Autogenerated on: 2023-07-28 # # Manual changes to this file may cause unexpected behavior in your application. # Manual changes to this file will be overwritten if the code is regenerated. diff --git a/opencga-client/src/main/R/R/Alignment-methods.R b/opencga-client/src/main/R/R/Alignment-methods.R index 00be80c77b7..ea404509c2e 100644 --- a/opencga-client/src/main/R/R/Alignment-methods.R +++ b/opencga-client/src/main/R/R/Alignment-methods.R @@ -2,7 +2,7 @@ # WARNING: AUTOGENERATED CODE # # This code was generated by a tool. -# Autogenerated on: 2023-04-18 +# Autogenerated on: 2023-07-28 # # Manual changes to this file may cause unexpected behavior in your application. # Manual changes to this file will be overwritten if the code is regenerated. diff --git a/opencga-client/src/main/R/R/AllGenerics.R b/opencga-client/src/main/R/R/AllGenerics.R index 7c9d2230cf6..a40c6414d76 100644 --- a/opencga-client/src/main/R/R/AllGenerics.R +++ b/opencga-client/src/main/R/R/AllGenerics.R @@ -10,42 +10,42 @@ setGeneric("projectClient", function(OpencgaR, projects, project, endpointName, # ############################################################################## ## StudyClient -setGeneric("studyClient", function(OpencgaR, members, templateId, studies, variableSet, group, study, endpointName, params=NULL, ...) +setGeneric("studyClient", function(OpencgaR, group, study, members, templateId, variableSet, studies, endpointName, params=NULL, ...) standardGeneric("studyClient")) # ############################################################################## ## FileClient -setGeneric("fileClient", function(OpencgaR, folder, file, members, files, annotationSet, endpointName, params=NULL, ...) +setGeneric("fileClient", function(OpencgaR, folder, file, files, annotationSet, members, endpointName, params=NULL, ...) standardGeneric("fileClient")) # ############################################################################## ## JobClient -setGeneric("jobClient", function(OpencgaR, members, jobs, job, endpointName, params=NULL, ...) +setGeneric("jobClient", function(OpencgaR, job, jobs, members, endpointName, params=NULL, ...) standardGeneric("jobClient")) # ############################################################################## ## SampleClient -setGeneric("sampleClient", function(OpencgaR, members, sample, samples, annotationSet, endpointName, params=NULL, ...) +setGeneric("sampleClient", function(OpencgaR, sample, annotationSet, samples, members, endpointName, params=NULL, ...) standardGeneric("sampleClient")) # ############################################################################## ## IndividualClient -setGeneric("individualClient", function(OpencgaR, members, individual, annotationSet, individuals, endpointName, params=NULL, ...) +setGeneric("individualClient", function(OpencgaR, annotationSet, individuals, individual, members, endpointName, params=NULL, ...) standardGeneric("individualClient")) # ############################################################################## ## FamilyClient -setGeneric("familyClient", function(OpencgaR, members, families, family, annotationSet, endpointName, params=NULL, ...) +setGeneric("familyClient", function(OpencgaR, annotationSet, families, family, members, endpointName, params=NULL, ...) standardGeneric("familyClient")) # ############################################################################## ## CohortClient -setGeneric("cohortClient", function(OpencgaR, members, cohort, annotationSet, cohorts, endpointName, params=NULL, ...) +setGeneric("cohortClient", function(OpencgaR, cohorts, cohort, annotationSet, members, endpointName, params=NULL, ...) standardGeneric("cohortClient")) # ############################################################################## ## PanelClient -setGeneric("panelClient", function(OpencgaR, members, panels, endpointName, params=NULL, ...) +setGeneric("panelClient", function(OpencgaR, panels, members, endpointName, params=NULL, ...) standardGeneric("panelClient")) # ############################################################################## @@ -60,7 +60,7 @@ setGeneric("variantClient", function(OpencgaR, endpointName, params=NULL, ...) # ############################################################################## ## ClinicalClient -setGeneric("clinicalClient", function(OpencgaR, clinicalAnalysis, members, interpretation, clinicalAnalyses, interpretations, endpointName, params=NULL, ...) +setGeneric("clinicalClient", function(OpencgaR, clinicalAnalyses, clinicalAnalysis, interpretation, members, interpretations, endpointName, params=NULL, ...) standardGeneric("clinicalClient")) # ############################################################################## diff --git a/opencga-client/src/main/R/R/Clinical-methods.R b/opencga-client/src/main/R/R/Clinical-methods.R index c590dab0b25..7866e702032 100644 --- a/opencga-client/src/main/R/R/Clinical-methods.R +++ b/opencga-client/src/main/R/R/Clinical-methods.R @@ -2,7 +2,7 @@ # WARNING: AUTOGENERATED CODE # # This code was generated by a tool. -# Autogenerated on: 2023-04-18 +# Autogenerated on: 2023-07-28 # # Manual changes to this file may cause unexpected behavior in your application. # Manual changes to this file will be overwritten if the code is regenerated. @@ -58,7 +58,7 @@ #' [*]: Required parameter #' @export -setMethod("clinicalClient", "OpencgaR", function(OpencgaR, clinicalAnalysis, members, interpretation, clinicalAnalyses, interpretations, endpointName, params=NULL, ...) { +setMethod("clinicalClient", "OpencgaR", function(OpencgaR, clinicalAnalyses, clinicalAnalysis, interpretation, members, interpretations, endpointName, params=NULL, ...) { switch(endpointName, #' @section Endpoint /{apiVersion}/analysis/clinical/acl/{members}/update: diff --git a/opencga-client/src/main/R/R/Cohort-methods.R b/opencga-client/src/main/R/R/Cohort-methods.R index 3d1c6034484..9dd4ad2e6d6 100644 --- a/opencga-client/src/main/R/R/Cohort-methods.R +++ b/opencga-client/src/main/R/R/Cohort-methods.R @@ -2,7 +2,7 @@ # WARNING: AUTOGENERATED CODE # # This code was generated by a tool. -# Autogenerated on: 2023-04-18 +# Autogenerated on: 2023-07-28 # # Manual changes to this file may cause unexpected behavior in your application. # Manual changes to this file will be overwritten if the code is regenerated. @@ -39,7 +39,7 @@ #' [*]: Required parameter #' @export -setMethod("cohortClient", "OpencgaR", function(OpencgaR, members, cohort, annotationSet, cohorts, endpointName, params=NULL, ...) { +setMethod("cohortClient", "OpencgaR", function(OpencgaR, cohorts, cohort, annotationSet, members, endpointName, params=NULL, ...) { switch(endpointName, #' @section Endpoint /{apiVersion}/cohorts/acl/{members}/update: diff --git a/opencga-client/src/main/R/R/Family-methods.R b/opencga-client/src/main/R/R/Family-methods.R index b4bdd82fbc5..6ca0bd513b6 100644 --- a/opencga-client/src/main/R/R/Family-methods.R +++ b/opencga-client/src/main/R/R/Family-methods.R @@ -2,7 +2,7 @@ # WARNING: AUTOGENERATED CODE # # This code was generated by a tool. -# Autogenerated on: 2023-04-18 +# Autogenerated on: 2023-07-28 # # Manual changes to this file may cause unexpected behavior in your application. # Manual changes to this file will be overwritten if the code is regenerated. @@ -38,7 +38,7 @@ #' [*]: Required parameter #' @export -setMethod("familyClient", "OpencgaR", function(OpencgaR, members, families, family, annotationSet, endpointName, params=NULL, ...) { +setMethod("familyClient", "OpencgaR", function(OpencgaR, annotationSet, families, family, members, endpointName, params=NULL, ...) { switch(endpointName, #' @section Endpoint /{apiVersion}/families/acl/{members}/update: diff --git a/opencga-client/src/main/R/R/File-methods.R b/opencga-client/src/main/R/R/File-methods.R index d97412f4788..7549cd691e3 100644 --- a/opencga-client/src/main/R/R/File-methods.R +++ b/opencga-client/src/main/R/R/File-methods.R @@ -2,7 +2,7 @@ # WARNING: AUTOGENERATED CODE # # This code was generated by a tool. -# Autogenerated on: 2023-04-18 +# Autogenerated on: 2023-07-28 # # Manual changes to this file may cause unexpected behavior in your application. # Manual changes to this file will be overwritten if the code is regenerated. @@ -54,7 +54,7 @@ #' [*]: Required parameter #' @export -setMethod("fileClient", "OpencgaR", function(OpencgaR, folder, file, members, files, annotationSet, endpointName, params=NULL, ...) { +setMethod("fileClient", "OpencgaR", function(OpencgaR, folder, file, files, annotationSet, members, endpointName, params=NULL, ...) { switch(endpointName, #' @section Endpoint /{apiVersion}/files/acl/{members}/update: diff --git a/opencga-client/src/main/R/R/GA4GH-methods.R b/opencga-client/src/main/R/R/GA4GH-methods.R index defcc45b18f..27034fe69dd 100644 --- a/opencga-client/src/main/R/R/GA4GH-methods.R +++ b/opencga-client/src/main/R/R/GA4GH-methods.R @@ -2,7 +2,7 @@ # WARNING: AUTOGENERATED CODE # # This code was generated by a tool. -# Autogenerated on: 2023-04-18 +# Autogenerated on: 2023-07-28 # # Manual changes to this file may cause unexpected behavior in your application. # Manual changes to this file will be overwritten if the code is regenerated. diff --git a/opencga-client/src/main/R/R/Individual-methods.R b/opencga-client/src/main/R/R/Individual-methods.R index 1ded4cea574..7f555edc455 100644 --- a/opencga-client/src/main/R/R/Individual-methods.R +++ b/opencga-client/src/main/R/R/Individual-methods.R @@ -2,7 +2,7 @@ # WARNING: AUTOGENERATED CODE # # This code was generated by a tool. -# Autogenerated on: 2023-04-18 +# Autogenerated on: 2023-07-28 # # Manual changes to this file may cause unexpected behavior in your application. # Manual changes to this file will be overwritten if the code is regenerated. @@ -39,7 +39,7 @@ #' [*]: Required parameter #' @export -setMethod("individualClient", "OpencgaR", function(OpencgaR, members, individual, annotationSet, individuals, endpointName, params=NULL, ...) { +setMethod("individualClient", "OpencgaR", function(OpencgaR, annotationSet, individuals, individual, members, endpointName, params=NULL, ...) { switch(endpointName, #' @section Endpoint /{apiVersion}/individuals/acl/{members}/update: diff --git a/opencga-client/src/main/R/R/Job-methods.R b/opencga-client/src/main/R/R/Job-methods.R index 9a6319a293c..9384517c9f9 100644 --- a/opencga-client/src/main/R/R/Job-methods.R +++ b/opencga-client/src/main/R/R/Job-methods.R @@ -2,7 +2,7 @@ # WARNING: AUTOGENERATED CODE # # This code was generated by a tool. -# Autogenerated on: 2023-04-18 +# Autogenerated on: 2023-07-28 # # Manual changes to this file may cause unexpected behavior in your application. # Manual changes to this file will be overwritten if the code is regenerated. @@ -40,7 +40,7 @@ #' [*]: Required parameter #' @export -setMethod("jobClient", "OpencgaR", function(OpencgaR, members, jobs, job, endpointName, params=NULL, ...) { +setMethod("jobClient", "OpencgaR", function(OpencgaR, job, jobs, members, endpointName, params=NULL, ...) { switch(endpointName, #' @section Endpoint /{apiVersion}/jobs/acl/{members}/update: diff --git a/opencga-client/src/main/R/R/Meta-methods.R b/opencga-client/src/main/R/R/Meta-methods.R index cfd47fb4f17..19b287d5b2f 100644 --- a/opencga-client/src/main/R/R/Meta-methods.R +++ b/opencga-client/src/main/R/R/Meta-methods.R @@ -2,7 +2,7 @@ # WARNING: AUTOGENERATED CODE # # This code was generated by a tool. -# Autogenerated on: 2023-04-18 +# Autogenerated on: 2023-07-28 # # Manual changes to this file may cause unexpected behavior in your application. # Manual changes to this file will be overwritten if the code is regenerated. diff --git a/opencga-client/src/main/R/R/Operation-methods.R b/opencga-client/src/main/R/R/Operation-methods.R index 8869d0ff5a3..a0b91ca9d3d 100644 --- a/opencga-client/src/main/R/R/Operation-methods.R +++ b/opencga-client/src/main/R/R/Operation-methods.R @@ -2,7 +2,7 @@ # WARNING: AUTOGENERATED CODE # # This code was generated by a tool. -# Autogenerated on: 2023-04-18 +# Autogenerated on: 2023-07-28 # # Manual changes to this file may cause unexpected behavior in your application. # Manual changes to this file will be overwritten if the code is regenerated. diff --git a/opencga-client/src/main/R/R/Panel-methods.R b/opencga-client/src/main/R/R/Panel-methods.R index ea88beb1bfa..632307c3855 100644 --- a/opencga-client/src/main/R/R/Panel-methods.R +++ b/opencga-client/src/main/R/R/Panel-methods.R @@ -2,7 +2,7 @@ # WARNING: AUTOGENERATED CODE # # This code was generated by a tool. -# Autogenerated on: 2023-04-18 +# Autogenerated on: 2023-07-28 # # Manual changes to this file may cause unexpected behavior in your application. # Manual changes to this file will be overwritten if the code is regenerated. @@ -36,7 +36,7 @@ #' [*]: Required parameter #' @export -setMethod("panelClient", "OpencgaR", function(OpencgaR, members, panels, endpointName, params=NULL, ...) { +setMethod("panelClient", "OpencgaR", function(OpencgaR, panels, members, endpointName, params=NULL, ...) { switch(endpointName, #' @section Endpoint /{apiVersion}/panels/acl/{members}/update: diff --git a/opencga-client/src/main/R/R/Project-methods.R b/opencga-client/src/main/R/R/Project-methods.R index 88420d4beb6..920696ba716 100644 --- a/opencga-client/src/main/R/R/Project-methods.R +++ b/opencga-client/src/main/R/R/Project-methods.R @@ -2,7 +2,7 @@ # WARNING: AUTOGENERATED CODE # # This code was generated by a tool. -# Autogenerated on: 2023-04-18 +# Autogenerated on: 2023-07-28 # # Manual changes to this file may cause unexpected behavior in your application. # Manual changes to this file will be overwritten if the code is regenerated. diff --git a/opencga-client/src/main/R/R/Sample-methods.R b/opencga-client/src/main/R/R/Sample-methods.R index fa8bc1e707a..cf89f9d20e4 100644 --- a/opencga-client/src/main/R/R/Sample-methods.R +++ b/opencga-client/src/main/R/R/Sample-methods.R @@ -2,7 +2,7 @@ # WARNING: AUTOGENERATED CODE # # This code was generated by a tool. -# Autogenerated on: 2023-04-18 +# Autogenerated on: 2023-07-28 # # Manual changes to this file may cause unexpected behavior in your application. # Manual changes to this file will be overwritten if the code is regenerated. @@ -39,7 +39,7 @@ #' [*]: Required parameter #' @export -setMethod("sampleClient", "OpencgaR", function(OpencgaR, members, sample, samples, annotationSet, endpointName, params=NULL, ...) { +setMethod("sampleClient", "OpencgaR", function(OpencgaR, sample, annotationSet, samples, members, endpointName, params=NULL, ...) { switch(endpointName, #' @section Endpoint /{apiVersion}/samples/acl/{members}/update: diff --git a/opencga-client/src/main/R/R/Study-methods.R b/opencga-client/src/main/R/R/Study-methods.R index 425059d2d03..eb488c2dc93 100644 --- a/opencga-client/src/main/R/R/Study-methods.R +++ b/opencga-client/src/main/R/R/Study-methods.R @@ -2,7 +2,7 @@ # WARNING: AUTOGENERATED CODE # # This code was generated by a tool. -# Autogenerated on: 2023-04-18 +# Autogenerated on: 2023-07-28 # # Manual changes to this file may cause unexpected behavior in your application. # Manual changes to this file will be overwritten if the code is regenerated. @@ -46,7 +46,7 @@ #' [*]: Required parameter #' @export -setMethod("studyClient", "OpencgaR", function(OpencgaR, members, templateId, studies, variableSet, group, study, endpointName, params=NULL, ...) { +setMethod("studyClient", "OpencgaR", function(OpencgaR, group, study, members, templateId, variableSet, studies, endpointName, params=NULL, ...) { switch(endpointName, #' @section Endpoint /{apiVersion}/studies/acl/{members}/update: diff --git a/opencga-client/src/main/R/R/User-methods.R b/opencga-client/src/main/R/R/User-methods.R index 9faadad0488..bc35c83200f 100644 --- a/opencga-client/src/main/R/R/User-methods.R +++ b/opencga-client/src/main/R/R/User-methods.R @@ -2,7 +2,7 @@ # WARNING: AUTOGENERATED CODE # # This code was generated by a tool. -# Autogenerated on: 2023-04-18 +# Autogenerated on: 2023-07-28 # # Manual changes to this file may cause unexpected behavior in your application. # Manual changes to this file will be overwritten if the code is regenerated. diff --git a/opencga-client/src/main/R/R/Variant-methods.R b/opencga-client/src/main/R/R/Variant-methods.R index e9e2f67edeb..f2a6e83c060 100644 --- a/opencga-client/src/main/R/R/Variant-methods.R +++ b/opencga-client/src/main/R/R/Variant-methods.R @@ -2,7 +2,7 @@ # WARNING: AUTOGENERATED CODE # # This code was generated by a tool. -# Autogenerated on: 2023-04-18 +# Autogenerated on: 2023-07-28 # # Manual changes to this file may cause unexpected behavior in your application. # Manual changes to this file will be overwritten if the code is regenerated. diff --git a/opencga-client/src/main/java/org/opencb/opencga/client/rest/clients/AdminClient.java b/opencga-client/src/main/java/org/opencb/opencga/client/rest/clients/AdminClient.java index 4baf9a8229e..9f10cef3b6d 100644 --- a/opencga-client/src/main/java/org/opencb/opencga/client/rest/clients/AdminClient.java +++ b/opencga-client/src/main/java/org/opencb/opencga/client/rest/clients/AdminClient.java @@ -35,7 +35,7 @@ * WARNING: AUTOGENERATED CODE * * This code was generated by a tool. -* Autogenerated on: 2023-04-18 +* Autogenerated on: 2023-07-28 * * Manual changes to this file may cause unexpected behavior in your application. * Manual changes to this file will be overwritten if the code is regenerated. @@ -44,7 +44,7 @@ /** * This class contains methods for the Admin webservices. - * Client version: 2.8.0-SNAPSHOT + * Client version: 2.8.3-SNAPSHOT * PATH: admin */ public class AdminClient extends AbstractParentClient { diff --git a/opencga-client/src/main/java/org/opencb/opencga/client/rest/clients/AlignmentClient.java b/opencga-client/src/main/java/org/opencb/opencga/client/rest/clients/AlignmentClient.java index c153146ca4e..6e7a1d2abd8 100644 --- a/opencga-client/src/main/java/org/opencb/opencga/client/rest/clients/AlignmentClient.java +++ b/opencga-client/src/main/java/org/opencb/opencga/client/rest/clients/AlignmentClient.java @@ -40,7 +40,7 @@ * WARNING: AUTOGENERATED CODE * * This code was generated by a tool. -* Autogenerated on: 2023-04-18 +* Autogenerated on: 2023-07-28 * * Manual changes to this file may cause unexpected behavior in your application. * Manual changes to this file will be overwritten if the code is regenerated. @@ -49,7 +49,7 @@ /** * This class contains methods for the Alignment webservices. - * Client version: 2.8.0-SNAPSHOT + * Client version: 2.8.3-SNAPSHOT * PATH: analysis/alignment */ public class AlignmentClient extends AbstractParentClient { diff --git a/opencga-client/src/main/java/org/opencb/opencga/client/rest/clients/ClinicalAnalysisClient.java b/opencga-client/src/main/java/org/opencb/opencga/client/rest/clients/ClinicalAnalysisClient.java index 9da4bc7e24c..f365c9d3306 100644 --- a/opencga-client/src/main/java/org/opencb/opencga/client/rest/clients/ClinicalAnalysisClient.java +++ b/opencga-client/src/main/java/org/opencb/opencga/client/rest/clients/ClinicalAnalysisClient.java @@ -51,7 +51,7 @@ * WARNING: AUTOGENERATED CODE * * This code was generated by a tool. -* Autogenerated on: 2023-04-18 +* Autogenerated on: 2023-07-28 * * Manual changes to this file may cause unexpected behavior in your application. * Manual changes to this file will be overwritten if the code is regenerated. @@ -60,7 +60,7 @@ /** * This class contains methods for the ClinicalAnalysis webservices. - * Client version: 2.8.0-SNAPSHOT + * Client version: 2.8.3-SNAPSHOT * PATH: analysis/clinical */ public class ClinicalAnalysisClient extends AbstractParentClient { diff --git a/opencga-client/src/main/java/org/opencb/opencga/client/rest/clients/CohortClient.java b/opencga-client/src/main/java/org/opencb/opencga/client/rest/clients/CohortClient.java index 11bfc04c972..c1df8e2a1df 100644 --- a/opencga-client/src/main/java/org/opencb/opencga/client/rest/clients/CohortClient.java +++ b/opencga-client/src/main/java/org/opencb/opencga/client/rest/clients/CohortClient.java @@ -37,7 +37,7 @@ * WARNING: AUTOGENERATED CODE * * This code was generated by a tool. -* Autogenerated on: 2023-04-18 +* Autogenerated on: 2023-07-28 * * Manual changes to this file may cause unexpected behavior in your application. * Manual changes to this file will be overwritten if the code is regenerated. @@ -46,7 +46,7 @@ /** * This class contains methods for the Cohort webservices. - * Client version: 2.8.0-SNAPSHOT + * Client version: 2.8.3-SNAPSHOT * PATH: cohorts */ public class CohortClient extends AbstractParentClient { diff --git a/opencga-client/src/main/java/org/opencb/opencga/client/rest/clients/DiseasePanelClient.java b/opencga-client/src/main/java/org/opencb/opencga/client/rest/clients/DiseasePanelClient.java index fc47e555d99..fd9a2aa9367 100644 --- a/opencga-client/src/main/java/org/opencb/opencga/client/rest/clients/DiseasePanelClient.java +++ b/opencga-client/src/main/java/org/opencb/opencga/client/rest/clients/DiseasePanelClient.java @@ -35,7 +35,7 @@ * WARNING: AUTOGENERATED CODE * * This code was generated by a tool. -* Autogenerated on: 2023-04-18 +* Autogenerated on: 2023-07-28 * * Manual changes to this file may cause unexpected behavior in your application. * Manual changes to this file will be overwritten if the code is regenerated. @@ -44,7 +44,7 @@ /** * This class contains methods for the DiseasePanel webservices. - * Client version: 2.8.0-SNAPSHOT + * Client version: 2.8.3-SNAPSHOT * PATH: panels */ public class DiseasePanelClient extends AbstractParentClient { diff --git a/opencga-client/src/main/java/org/opencb/opencga/client/rest/clients/FamilyClient.java b/opencga-client/src/main/java/org/opencb/opencga/client/rest/clients/FamilyClient.java index 072933ac1e2..1d35c038da5 100644 --- a/opencga-client/src/main/java/org/opencb/opencga/client/rest/clients/FamilyClient.java +++ b/opencga-client/src/main/java/org/opencb/opencga/client/rest/clients/FamilyClient.java @@ -36,7 +36,7 @@ * WARNING: AUTOGENERATED CODE * * This code was generated by a tool. -* Autogenerated on: 2023-04-18 +* Autogenerated on: 2023-07-28 * * Manual changes to this file may cause unexpected behavior in your application. * Manual changes to this file will be overwritten if the code is regenerated. @@ -45,7 +45,7 @@ /** * This class contains methods for the Family webservices. - * Client version: 2.8.0-SNAPSHOT + * Client version: 2.8.3-SNAPSHOT * PATH: families */ public class FamilyClient extends AbstractParentClient { diff --git a/opencga-client/src/main/java/org/opencb/opencga/client/rest/clients/FileClient.java b/opencga-client/src/main/java/org/opencb/opencga/client/rest/clients/FileClient.java index 553e0983a27..189b2000caa 100644 --- a/opencga-client/src/main/java/org/opencb/opencga/client/rest/clients/FileClient.java +++ b/opencga-client/src/main/java/org/opencb/opencga/client/rest/clients/FileClient.java @@ -43,7 +43,7 @@ * WARNING: AUTOGENERATED CODE * * This code was generated by a tool. -* Autogenerated on: 2023-04-18 +* Autogenerated on: 2023-07-28 * * Manual changes to this file may cause unexpected behavior in your application. * Manual changes to this file will be overwritten if the code is regenerated. @@ -52,7 +52,7 @@ /** * This class contains methods for the File webservices. - * Client version: 2.8.0-SNAPSHOT + * Client version: 2.8.3-SNAPSHOT * PATH: files */ public class FileClient extends AbstractParentClient { diff --git a/opencga-client/src/main/java/org/opencb/opencga/client/rest/clients/GA4GHClient.java b/opencga-client/src/main/java/org/opencb/opencga/client/rest/clients/GA4GHClient.java index a4bc5b7f11c..cca31f9e791 100644 --- a/opencga-client/src/main/java/org/opencb/opencga/client/rest/clients/GA4GHClient.java +++ b/opencga-client/src/main/java/org/opencb/opencga/client/rest/clients/GA4GHClient.java @@ -27,7 +27,7 @@ * WARNING: AUTOGENERATED CODE * * This code was generated by a tool. -* Autogenerated on: 2023-04-18 +* Autogenerated on: 2023-07-28 * * Manual changes to this file may cause unexpected behavior in your application. * Manual changes to this file will be overwritten if the code is regenerated. @@ -36,7 +36,7 @@ /** * This class contains methods for the GA4GH webservices. - * Client version: 2.8.0-SNAPSHOT + * Client version: 2.8.3-SNAPSHOT * PATH: ga4gh */ public class GA4GHClient extends AbstractParentClient { diff --git a/opencga-client/src/main/java/org/opencb/opencga/client/rest/clients/IndividualClient.java b/opencga-client/src/main/java/org/opencb/opencga/client/rest/clients/IndividualClient.java index 3b41baf7ae6..f5c8219fe2d 100644 --- a/opencga-client/src/main/java/org/opencb/opencga/client/rest/clients/IndividualClient.java +++ b/opencga-client/src/main/java/org/opencb/opencga/client/rest/clients/IndividualClient.java @@ -36,7 +36,7 @@ * WARNING: AUTOGENERATED CODE * * This code was generated by a tool. -* Autogenerated on: 2023-04-18 +* Autogenerated on: 2023-07-28 * * Manual changes to this file may cause unexpected behavior in your application. * Manual changes to this file will be overwritten if the code is regenerated. @@ -45,7 +45,7 @@ /** * This class contains methods for the Individual webservices. - * Client version: 2.8.0-SNAPSHOT + * Client version: 2.8.3-SNAPSHOT * PATH: individuals */ public class IndividualClient extends AbstractParentClient { diff --git a/opencga-client/src/main/java/org/opencb/opencga/client/rest/clients/JobClient.java b/opencga-client/src/main/java/org/opencb/opencga/client/rest/clients/JobClient.java index 334c154ae53..f5d60864be5 100644 --- a/opencga-client/src/main/java/org/opencb/opencga/client/rest/clients/JobClient.java +++ b/opencga-client/src/main/java/org/opencb/opencga/client/rest/clients/JobClient.java @@ -37,7 +37,7 @@ * WARNING: AUTOGENERATED CODE * * This code was generated by a tool. -* Autogenerated on: 2023-04-18 +* Autogenerated on: 2023-07-28 * * Manual changes to this file may cause unexpected behavior in your application. * Manual changes to this file will be overwritten if the code is regenerated. @@ -46,7 +46,7 @@ /** * This class contains methods for the Job webservices. - * Client version: 2.8.0-SNAPSHOT + * Client version: 2.8.3-SNAPSHOT * PATH: jobs */ public class JobClient extends AbstractParentClient { diff --git a/opencga-client/src/main/java/org/opencb/opencga/client/rest/clients/MetaClient.java b/opencga-client/src/main/java/org/opencb/opencga/client/rest/clients/MetaClient.java index ac4c311a0bb..a2511aa7eb0 100644 --- a/opencga-client/src/main/java/org/opencb/opencga/client/rest/clients/MetaClient.java +++ b/opencga-client/src/main/java/org/opencb/opencga/client/rest/clients/MetaClient.java @@ -28,7 +28,7 @@ * WARNING: AUTOGENERATED CODE * * This code was generated by a tool. -* Autogenerated on: 2023-04-18 +* Autogenerated on: 2023-07-28 * * Manual changes to this file may cause unexpected behavior in your application. * Manual changes to this file will be overwritten if the code is regenerated. @@ -37,7 +37,7 @@ /** * This class contains methods for the Meta webservices. - * Client version: 2.8.0-SNAPSHOT + * Client version: 2.8.3-SNAPSHOT * PATH: meta */ public class MetaClient extends AbstractParentClient { diff --git a/opencga-client/src/main/java/org/opencb/opencga/client/rest/clients/ProjectClient.java b/opencga-client/src/main/java/org/opencb/opencga/client/rest/clients/ProjectClient.java index 9a3094cb554..4f25299d77f 100644 --- a/opencga-client/src/main/java/org/opencb/opencga/client/rest/clients/ProjectClient.java +++ b/opencga-client/src/main/java/org/opencb/opencga/client/rest/clients/ProjectClient.java @@ -32,7 +32,7 @@ * WARNING: AUTOGENERATED CODE * * This code was generated by a tool. -* Autogenerated on: 2023-04-18 +* Autogenerated on: 2023-07-28 * * Manual changes to this file may cause unexpected behavior in your application. * Manual changes to this file will be overwritten if the code is regenerated. @@ -41,7 +41,7 @@ /** * This class contains methods for the Project webservices. - * Client version: 2.8.0-SNAPSHOT + * Client version: 2.8.3-SNAPSHOT * PATH: projects */ public class ProjectClient extends AbstractParentClient { diff --git a/opencga-client/src/main/java/org/opencb/opencga/client/rest/clients/SampleClient.java b/opencga-client/src/main/java/org/opencb/opencga/client/rest/clients/SampleClient.java index efeca3bd4b3..b75d1c759fb 100644 --- a/opencga-client/src/main/java/org/opencb/opencga/client/rest/clients/SampleClient.java +++ b/opencga-client/src/main/java/org/opencb/opencga/client/rest/clients/SampleClient.java @@ -36,7 +36,7 @@ * WARNING: AUTOGENERATED CODE * * This code was generated by a tool. -* Autogenerated on: 2023-04-18 +* Autogenerated on: 2023-07-28 * * Manual changes to this file may cause unexpected behavior in your application. * Manual changes to this file will be overwritten if the code is regenerated. @@ -45,7 +45,7 @@ /** * This class contains methods for the Sample webservices. - * Client version: 2.8.0-SNAPSHOT + * Client version: 2.8.3-SNAPSHOT * PATH: samples */ public class SampleClient extends AbstractParentClient { diff --git a/opencga-client/src/main/java/org/opencb/opencga/client/rest/clients/StudyClient.java b/opencga-client/src/main/java/org/opencb/opencga/client/rest/clients/StudyClient.java index 47f1ce2dbc9..a8b5678c5ae 100644 --- a/opencga-client/src/main/java/org/opencb/opencga/client/rest/clients/StudyClient.java +++ b/opencga-client/src/main/java/org/opencb/opencga/client/rest/clients/StudyClient.java @@ -45,7 +45,7 @@ * WARNING: AUTOGENERATED CODE * * This code was generated by a tool. -* Autogenerated on: 2023-04-18 +* Autogenerated on: 2023-07-28 * * Manual changes to this file may cause unexpected behavior in your application. * Manual changes to this file will be overwritten if the code is regenerated. @@ -54,7 +54,7 @@ /** * This class contains methods for the Study webservices. - * Client version: 2.8.0-SNAPSHOT + * Client version: 2.8.3-SNAPSHOT * PATH: studies */ public class StudyClient extends AbstractParentClient { diff --git a/opencga-client/src/main/java/org/opencb/opencga/client/rest/clients/UserClient.java b/opencga-client/src/main/java/org/opencb/opencga/client/rest/clients/UserClient.java index bdf3eb4f232..8ca08bbd7e0 100644 --- a/opencga-client/src/main/java/org/opencb/opencga/client/rest/clients/UserClient.java +++ b/opencga-client/src/main/java/org/opencb/opencga/client/rest/clients/UserClient.java @@ -36,7 +36,7 @@ * WARNING: AUTOGENERATED CODE * * This code was generated by a tool. -* Autogenerated on: 2023-04-18 +* Autogenerated on: 2023-07-28 * * Manual changes to this file may cause unexpected behavior in your application. * Manual changes to this file will be overwritten if the code is regenerated. @@ -45,7 +45,7 @@ /** * This class contains methods for the User webservices. - * Client version: 2.8.0-SNAPSHOT + * Client version: 2.8.3-SNAPSHOT * PATH: users */ public class UserClient extends AbstractParentClient { diff --git a/opencga-client/src/main/java/org/opencb/opencga/client/rest/clients/VariantClient.java b/opencga-client/src/main/java/org/opencb/opencga/client/rest/clients/VariantClient.java index 5b135d4d38e..812474e898f 100644 --- a/opencga-client/src/main/java/org/opencb/opencga/client/rest/clients/VariantClient.java +++ b/opencga-client/src/main/java/org/opencb/opencga/client/rest/clients/VariantClient.java @@ -62,7 +62,7 @@ * WARNING: AUTOGENERATED CODE * * This code was generated by a tool. -* Autogenerated on: 2023-04-18 +* Autogenerated on: 2023-07-28 * * Manual changes to this file may cause unexpected behavior in your application. * Manual changes to this file will be overwritten if the code is regenerated. @@ -71,7 +71,7 @@ /** * This class contains methods for the Variant webservices. - * Client version: 2.8.0-SNAPSHOT + * Client version: 2.8.3-SNAPSHOT * PATH: analysis/variant */ public class VariantClient extends AbstractParentClient { diff --git a/opencga-client/src/main/java/org/opencb/opencga/client/rest/clients/VariantOperationClient.java b/opencga-client/src/main/java/org/opencb/opencga/client/rest/clients/VariantOperationClient.java index e15498be36d..7a32525c569 100644 --- a/opencga-client/src/main/java/org/opencb/opencga/client/rest/clients/VariantOperationClient.java +++ b/opencga-client/src/main/java/org/opencb/opencga/client/rest/clients/VariantOperationClient.java @@ -50,7 +50,7 @@ * WARNING: AUTOGENERATED CODE * * This code was generated by a tool. -* Autogenerated on: 2023-04-18 +* Autogenerated on: 2023-07-28 * * Manual changes to this file may cause unexpected behavior in your application. * Manual changes to this file will be overwritten if the code is regenerated. @@ -59,7 +59,7 @@ /** * This class contains methods for the VariantOperation webservices. - * Client version: 2.8.0-SNAPSHOT + * Client version: 2.8.3-SNAPSHOT * PATH: operation */ public class VariantOperationClient extends AbstractParentClient { diff --git a/opencga-client/src/main/javascript/Admin.js b/opencga-client/src/main/javascript/Admin.js index 53c4f4e9c41..b0766ce818c 100644 --- a/opencga-client/src/main/javascript/Admin.js +++ b/opencga-client/src/main/javascript/Admin.js @@ -12,7 +12,7 @@ * WARNING: AUTOGENERATED CODE * * This code was generated by a tool. - * Autogenerated on: 2023-04-18 + * Autogenerated on: 2023-07-28 * * Manual changes to this file may cause unexpected behavior in your application. * Manual changes to this file will be overwritten if the code is regenerated. diff --git a/opencga-client/src/main/javascript/Alignment.js b/opencga-client/src/main/javascript/Alignment.js index bc3b7eb2c02..28d04b2b7b0 100644 --- a/opencga-client/src/main/javascript/Alignment.js +++ b/opencga-client/src/main/javascript/Alignment.js @@ -12,7 +12,7 @@ * WARNING: AUTOGENERATED CODE * * This code was generated by a tool. - * Autogenerated on: 2023-04-18 + * Autogenerated on: 2023-07-28 * * Manual changes to this file may cause unexpected behavior in your application. * Manual changes to this file will be overwritten if the code is regenerated. diff --git a/opencga-client/src/main/javascript/ClinicalAnalysis.js b/opencga-client/src/main/javascript/ClinicalAnalysis.js index 30c195691ca..a575404e2a1 100644 --- a/opencga-client/src/main/javascript/ClinicalAnalysis.js +++ b/opencga-client/src/main/javascript/ClinicalAnalysis.js @@ -12,7 +12,7 @@ * WARNING: AUTOGENERATED CODE * * This code was generated by a tool. - * Autogenerated on: 2023-04-18 + * Autogenerated on: 2023-07-28 * * Manual changes to this file may cause unexpected behavior in your application. * Manual changes to this file will be overwritten if the code is regenerated. diff --git a/opencga-client/src/main/javascript/Cohort.js b/opencga-client/src/main/javascript/Cohort.js index 56f11ab10fa..648bf8180d5 100644 --- a/opencga-client/src/main/javascript/Cohort.js +++ b/opencga-client/src/main/javascript/Cohort.js @@ -12,7 +12,7 @@ * WARNING: AUTOGENERATED CODE * * This code was generated by a tool. - * Autogenerated on: 2023-04-18 + * Autogenerated on: 2023-07-28 * * Manual changes to this file may cause unexpected behavior in your application. * Manual changes to this file will be overwritten if the code is regenerated. diff --git a/opencga-client/src/main/javascript/DiseasePanel.js b/opencga-client/src/main/javascript/DiseasePanel.js index c8a18d38ab6..b5050972e8b 100644 --- a/opencga-client/src/main/javascript/DiseasePanel.js +++ b/opencga-client/src/main/javascript/DiseasePanel.js @@ -12,7 +12,7 @@ * WARNING: AUTOGENERATED CODE * * This code was generated by a tool. - * Autogenerated on: 2023-04-18 + * Autogenerated on: 2023-07-28 * * Manual changes to this file may cause unexpected behavior in your application. * Manual changes to this file will be overwritten if the code is regenerated. diff --git a/opencga-client/src/main/javascript/Family.js b/opencga-client/src/main/javascript/Family.js index eef6b77e11e..cc25019b2ff 100644 --- a/opencga-client/src/main/javascript/Family.js +++ b/opencga-client/src/main/javascript/Family.js @@ -12,7 +12,7 @@ * WARNING: AUTOGENERATED CODE * * This code was generated by a tool. - * Autogenerated on: 2023-04-18 + * Autogenerated on: 2023-07-28 * * Manual changes to this file may cause unexpected behavior in your application. * Manual changes to this file will be overwritten if the code is regenerated. diff --git a/opencga-client/src/main/javascript/File.js b/opencga-client/src/main/javascript/File.js index 66ca23ddf1e..db267764fcd 100644 --- a/opencga-client/src/main/javascript/File.js +++ b/opencga-client/src/main/javascript/File.js @@ -12,7 +12,7 @@ * WARNING: AUTOGENERATED CODE * * This code was generated by a tool. - * Autogenerated on: 2023-04-18 + * Autogenerated on: 2023-07-28 * * Manual changes to this file may cause unexpected behavior in your application. * Manual changes to this file will be overwritten if the code is regenerated. diff --git a/opencga-client/src/main/javascript/GA4GH.js b/opencga-client/src/main/javascript/GA4GH.js index e6fb38143ac..a7c03ec5c97 100644 --- a/opencga-client/src/main/javascript/GA4GH.js +++ b/opencga-client/src/main/javascript/GA4GH.js @@ -12,7 +12,7 @@ * WARNING: AUTOGENERATED CODE * * This code was generated by a tool. - * Autogenerated on: 2023-04-18 + * Autogenerated on: 2023-07-28 * * Manual changes to this file may cause unexpected behavior in your application. * Manual changes to this file will be overwritten if the code is regenerated. diff --git a/opencga-client/src/main/javascript/Individual.js b/opencga-client/src/main/javascript/Individual.js index 2487febccf8..af67213f129 100644 --- a/opencga-client/src/main/javascript/Individual.js +++ b/opencga-client/src/main/javascript/Individual.js @@ -12,7 +12,7 @@ * WARNING: AUTOGENERATED CODE * * This code was generated by a tool. - * Autogenerated on: 2023-04-18 + * Autogenerated on: 2023-07-28 * * Manual changes to this file may cause unexpected behavior in your application. * Manual changes to this file will be overwritten if the code is regenerated. diff --git a/opencga-client/src/main/javascript/Job.js b/opencga-client/src/main/javascript/Job.js index e76d111f0b5..95dd1ecb855 100644 --- a/opencga-client/src/main/javascript/Job.js +++ b/opencga-client/src/main/javascript/Job.js @@ -12,7 +12,7 @@ * WARNING: AUTOGENERATED CODE * * This code was generated by a tool. - * Autogenerated on: 2023-04-18 + * Autogenerated on: 2023-07-28 * * Manual changes to this file may cause unexpected behavior in your application. * Manual changes to this file will be overwritten if the code is regenerated. diff --git a/opencga-client/src/main/javascript/Meta.js b/opencga-client/src/main/javascript/Meta.js index b0208dd1cfd..e59cac86214 100644 --- a/opencga-client/src/main/javascript/Meta.js +++ b/opencga-client/src/main/javascript/Meta.js @@ -12,7 +12,7 @@ * WARNING: AUTOGENERATED CODE * * This code was generated by a tool. - * Autogenerated on: 2023-04-18 + * Autogenerated on: 2023-07-28 * * Manual changes to this file may cause unexpected behavior in your application. * Manual changes to this file will be overwritten if the code is regenerated. diff --git a/opencga-client/src/main/javascript/Project.js b/opencga-client/src/main/javascript/Project.js index 06abda04b57..24f6d0500b4 100644 --- a/opencga-client/src/main/javascript/Project.js +++ b/opencga-client/src/main/javascript/Project.js @@ -12,7 +12,7 @@ * WARNING: AUTOGENERATED CODE * * This code was generated by a tool. - * Autogenerated on: 2023-04-18 + * Autogenerated on: 2023-07-28 * * Manual changes to this file may cause unexpected behavior in your application. * Manual changes to this file will be overwritten if the code is regenerated. diff --git a/opencga-client/src/main/javascript/Sample.js b/opencga-client/src/main/javascript/Sample.js index 2c4fdd8956a..d932f90ee6a 100644 --- a/opencga-client/src/main/javascript/Sample.js +++ b/opencga-client/src/main/javascript/Sample.js @@ -12,7 +12,7 @@ * WARNING: AUTOGENERATED CODE * * This code was generated by a tool. - * Autogenerated on: 2023-04-18 + * Autogenerated on: 2023-07-28 * * Manual changes to this file may cause unexpected behavior in your application. * Manual changes to this file will be overwritten if the code is regenerated. diff --git a/opencga-client/src/main/javascript/Study.js b/opencga-client/src/main/javascript/Study.js index 029d4133c82..51c9fbad1b9 100644 --- a/opencga-client/src/main/javascript/Study.js +++ b/opencga-client/src/main/javascript/Study.js @@ -12,7 +12,7 @@ * WARNING: AUTOGENERATED CODE * * This code was generated by a tool. - * Autogenerated on: 2023-04-18 + * Autogenerated on: 2023-07-28 * * Manual changes to this file may cause unexpected behavior in your application. * Manual changes to this file will be overwritten if the code is regenerated. diff --git a/opencga-client/src/main/javascript/User.js b/opencga-client/src/main/javascript/User.js index fd3b9adaf52..101fe7beda7 100644 --- a/opencga-client/src/main/javascript/User.js +++ b/opencga-client/src/main/javascript/User.js @@ -12,7 +12,7 @@ * WARNING: AUTOGENERATED CODE * * This code was generated by a tool. - * Autogenerated on: 2023-04-18 + * Autogenerated on: 2023-07-28 * * Manual changes to this file may cause unexpected behavior in your application. * Manual changes to this file will be overwritten if the code is regenerated. diff --git a/opencga-client/src/main/javascript/Variant.js b/opencga-client/src/main/javascript/Variant.js index f5f8b2e09a1..7baf84d27ef 100644 --- a/opencga-client/src/main/javascript/Variant.js +++ b/opencga-client/src/main/javascript/Variant.js @@ -12,7 +12,7 @@ * WARNING: AUTOGENERATED CODE * * This code was generated by a tool. - * Autogenerated on: 2023-04-18 + * Autogenerated on: 2023-07-28 * * Manual changes to this file may cause unexpected behavior in your application. * Manual changes to this file will be overwritten if the code is regenerated. diff --git a/opencga-client/src/main/javascript/VariantOperation.js b/opencga-client/src/main/javascript/VariantOperation.js index 604e09d9ccf..4883b0065a7 100644 --- a/opencga-client/src/main/javascript/VariantOperation.js +++ b/opencga-client/src/main/javascript/VariantOperation.js @@ -12,7 +12,7 @@ * WARNING: AUTOGENERATED CODE * * This code was generated by a tool. - * Autogenerated on: 2023-04-18 + * Autogenerated on: 2023-07-28 * * Manual changes to this file may cause unexpected behavior in your application. * Manual changes to this file will be overwritten if the code is regenerated. diff --git a/opencga-client/src/main/python/pyopencga/rest_clients/admin_client.py b/opencga-client/src/main/python/pyopencga/rest_clients/admin_client.py index 7048467edf6..74db25099bd 100644 --- a/opencga-client/src/main/python/pyopencga/rest_clients/admin_client.py +++ b/opencga-client/src/main/python/pyopencga/rest_clients/admin_client.py @@ -2,7 +2,7 @@ WARNING: AUTOGENERATED CODE This code was generated by a tool. - Autogenerated on: 2023-04-18 + Autogenerated on: 2023-07-28 Manual changes to this file may cause unexpected behavior in your application. Manual changes to this file will be overwritten if the code is regenerated. @@ -14,7 +14,7 @@ class Admin(_ParentRestClient): """ This class contains methods for the 'Admin' webservices - Client version: 2.8.0-SNAPSHOT + Client version: 2.8.3-SNAPSHOT PATH: /{apiVersion}/admin """ diff --git a/opencga-client/src/main/python/pyopencga/rest_clients/alignment_client.py b/opencga-client/src/main/python/pyopencga/rest_clients/alignment_client.py index 826ae8b6957..7618077ceaa 100644 --- a/opencga-client/src/main/python/pyopencga/rest_clients/alignment_client.py +++ b/opencga-client/src/main/python/pyopencga/rest_clients/alignment_client.py @@ -2,7 +2,7 @@ WARNING: AUTOGENERATED CODE This code was generated by a tool. - Autogenerated on: 2023-04-18 + Autogenerated on: 2023-07-28 Manual changes to this file may cause unexpected behavior in your application. Manual changes to this file will be overwritten if the code is regenerated. @@ -14,7 +14,7 @@ class Alignment(_ParentRestClient): """ This class contains methods for the 'Analysis - Alignment' webservices - Client version: 2.8.0-SNAPSHOT + Client version: 2.8.3-SNAPSHOT PATH: /{apiVersion}/analysis/alignment """ diff --git a/opencga-client/src/main/python/pyopencga/rest_clients/clinical_analysis_client.py b/opencga-client/src/main/python/pyopencga/rest_clients/clinical_analysis_client.py index e6ced9ecbf3..2eae0068cd3 100644 --- a/opencga-client/src/main/python/pyopencga/rest_clients/clinical_analysis_client.py +++ b/opencga-client/src/main/python/pyopencga/rest_clients/clinical_analysis_client.py @@ -2,7 +2,7 @@ WARNING: AUTOGENERATED CODE This code was generated by a tool. - Autogenerated on: 2023-04-18 + Autogenerated on: 2023-07-28 Manual changes to this file may cause unexpected behavior in your application. Manual changes to this file will be overwritten if the code is regenerated. @@ -14,7 +14,7 @@ class ClinicalAnalysis(_ParentRestClient): """ This class contains methods for the 'Analysis - Clinical' webservices - Client version: 2.8.0-SNAPSHOT + Client version: 2.8.3-SNAPSHOT PATH: /{apiVersion}/analysis/clinical """ diff --git a/opencga-client/src/main/python/pyopencga/rest_clients/cohort_client.py b/opencga-client/src/main/python/pyopencga/rest_clients/cohort_client.py index 6c685b9772a..84c65af11d1 100644 --- a/opencga-client/src/main/python/pyopencga/rest_clients/cohort_client.py +++ b/opencga-client/src/main/python/pyopencga/rest_clients/cohort_client.py @@ -2,7 +2,7 @@ WARNING: AUTOGENERATED CODE This code was generated by a tool. - Autogenerated on: 2023-04-18 + Autogenerated on: 2023-07-28 Manual changes to this file may cause unexpected behavior in your application. Manual changes to this file will be overwritten if the code is regenerated. @@ -14,7 +14,7 @@ class Cohort(_ParentRestClient): """ This class contains methods for the 'Cohorts' webservices - Client version: 2.8.0-SNAPSHOT + Client version: 2.8.3-SNAPSHOT PATH: /{apiVersion}/cohorts """ diff --git a/opencga-client/src/main/python/pyopencga/rest_clients/disease_panel_client.py b/opencga-client/src/main/python/pyopencga/rest_clients/disease_panel_client.py index 4ec0b95c8fa..867dd915d0f 100644 --- a/opencga-client/src/main/python/pyopencga/rest_clients/disease_panel_client.py +++ b/opencga-client/src/main/python/pyopencga/rest_clients/disease_panel_client.py @@ -2,7 +2,7 @@ WARNING: AUTOGENERATED CODE This code was generated by a tool. - Autogenerated on: 2023-04-18 + Autogenerated on: 2023-07-28 Manual changes to this file may cause unexpected behavior in your application. Manual changes to this file will be overwritten if the code is regenerated. @@ -14,7 +14,7 @@ class DiseasePanel(_ParentRestClient): """ This class contains methods for the 'Disease Panels' webservices - Client version: 2.8.0-SNAPSHOT + Client version: 2.8.3-SNAPSHOT PATH: /{apiVersion}/panels """ diff --git a/opencga-client/src/main/python/pyopencga/rest_clients/family_client.py b/opencga-client/src/main/python/pyopencga/rest_clients/family_client.py index ab94612b324..3afc10da5c7 100644 --- a/opencga-client/src/main/python/pyopencga/rest_clients/family_client.py +++ b/opencga-client/src/main/python/pyopencga/rest_clients/family_client.py @@ -2,7 +2,7 @@ WARNING: AUTOGENERATED CODE This code was generated by a tool. - Autogenerated on: 2023-04-18 + Autogenerated on: 2023-07-28 Manual changes to this file may cause unexpected behavior in your application. Manual changes to this file will be overwritten if the code is regenerated. @@ -14,7 +14,7 @@ class Family(_ParentRestClient): """ This class contains methods for the 'Families' webservices - Client version: 2.8.0-SNAPSHOT + Client version: 2.8.3-SNAPSHOT PATH: /{apiVersion}/families """ diff --git a/opencga-client/src/main/python/pyopencga/rest_clients/file_client.py b/opencga-client/src/main/python/pyopencga/rest_clients/file_client.py index 0db45804764..7477428ff83 100644 --- a/opencga-client/src/main/python/pyopencga/rest_clients/file_client.py +++ b/opencga-client/src/main/python/pyopencga/rest_clients/file_client.py @@ -2,7 +2,7 @@ WARNING: AUTOGENERATED CODE This code was generated by a tool. - Autogenerated on: 2023-04-18 + Autogenerated on: 2023-07-28 Manual changes to this file may cause unexpected behavior in your application. Manual changes to this file will be overwritten if the code is regenerated. @@ -14,7 +14,7 @@ class File(_ParentRestClient): """ This class contains methods for the 'Files' webservices - Client version: 2.8.0-SNAPSHOT + Client version: 2.8.3-SNAPSHOT PATH: /{apiVersion}/files """ diff --git a/opencga-client/src/main/python/pyopencga/rest_clients/ga4gh_client.py b/opencga-client/src/main/python/pyopencga/rest_clients/ga4gh_client.py index 0b1c0df4afa..8f23e653f21 100644 --- a/opencga-client/src/main/python/pyopencga/rest_clients/ga4gh_client.py +++ b/opencga-client/src/main/python/pyopencga/rest_clients/ga4gh_client.py @@ -2,7 +2,7 @@ WARNING: AUTOGENERATED CODE This code was generated by a tool. - Autogenerated on: 2023-04-18 + Autogenerated on: 2023-07-28 Manual changes to this file may cause unexpected behavior in your application. Manual changes to this file will be overwritten if the code is regenerated. @@ -14,7 +14,7 @@ class GA4GH(_ParentRestClient): """ This class contains methods for the 'GA4GH' webservices - Client version: 2.8.0-SNAPSHOT + Client version: 2.8.3-SNAPSHOT PATH: /{apiVersion}/ga4gh """ diff --git a/opencga-client/src/main/python/pyopencga/rest_clients/individual_client.py b/opencga-client/src/main/python/pyopencga/rest_clients/individual_client.py index e4830dbe5ab..5999c05f36d 100644 --- a/opencga-client/src/main/python/pyopencga/rest_clients/individual_client.py +++ b/opencga-client/src/main/python/pyopencga/rest_clients/individual_client.py @@ -2,7 +2,7 @@ WARNING: AUTOGENERATED CODE This code was generated by a tool. - Autogenerated on: 2023-04-18 + Autogenerated on: 2023-07-28 Manual changes to this file may cause unexpected behavior in your application. Manual changes to this file will be overwritten if the code is regenerated. @@ -14,7 +14,7 @@ class Individual(_ParentRestClient): """ This class contains methods for the 'Individuals' webservices - Client version: 2.8.0-SNAPSHOT + Client version: 2.8.3-SNAPSHOT PATH: /{apiVersion}/individuals """ diff --git a/opencga-client/src/main/python/pyopencga/rest_clients/job_client.py b/opencga-client/src/main/python/pyopencga/rest_clients/job_client.py index fe0a9ec74d3..7b625dc2aa6 100644 --- a/opencga-client/src/main/python/pyopencga/rest_clients/job_client.py +++ b/opencga-client/src/main/python/pyopencga/rest_clients/job_client.py @@ -2,7 +2,7 @@ WARNING: AUTOGENERATED CODE This code was generated by a tool. - Autogenerated on: 2023-04-18 + Autogenerated on: 2023-07-28 Manual changes to this file may cause unexpected behavior in your application. Manual changes to this file will be overwritten if the code is regenerated. @@ -14,7 +14,7 @@ class Job(_ParentRestClient): """ This class contains methods for the 'Jobs' webservices - Client version: 2.8.0-SNAPSHOT + Client version: 2.8.3-SNAPSHOT PATH: /{apiVersion}/jobs """ diff --git a/opencga-client/src/main/python/pyopencga/rest_clients/meta_client.py b/opencga-client/src/main/python/pyopencga/rest_clients/meta_client.py index 96982cc0e3d..975f72d31cf 100644 --- a/opencga-client/src/main/python/pyopencga/rest_clients/meta_client.py +++ b/opencga-client/src/main/python/pyopencga/rest_clients/meta_client.py @@ -2,7 +2,7 @@ WARNING: AUTOGENERATED CODE This code was generated by a tool. - Autogenerated on: 2023-04-18 + Autogenerated on: 2023-07-28 Manual changes to this file may cause unexpected behavior in your application. Manual changes to this file will be overwritten if the code is regenerated. @@ -14,7 +14,7 @@ class Meta(_ParentRestClient): """ This class contains methods for the 'Meta' webservices - Client version: 2.8.0-SNAPSHOT + Client version: 2.8.3-SNAPSHOT PATH: /{apiVersion}/meta """ diff --git a/opencga-client/src/main/python/pyopencga/rest_clients/project_client.py b/opencga-client/src/main/python/pyopencga/rest_clients/project_client.py index d28ecf4d846..60afa46fc33 100644 --- a/opencga-client/src/main/python/pyopencga/rest_clients/project_client.py +++ b/opencga-client/src/main/python/pyopencga/rest_clients/project_client.py @@ -2,7 +2,7 @@ WARNING: AUTOGENERATED CODE This code was generated by a tool. - Autogenerated on: 2023-04-18 + Autogenerated on: 2023-07-28 Manual changes to this file may cause unexpected behavior in your application. Manual changes to this file will be overwritten if the code is regenerated. @@ -14,7 +14,7 @@ class Project(_ParentRestClient): """ This class contains methods for the 'Projects' webservices - Client version: 2.8.0-SNAPSHOT + Client version: 2.8.3-SNAPSHOT PATH: /{apiVersion}/projects """ diff --git a/opencga-client/src/main/python/pyopencga/rest_clients/sample_client.py b/opencga-client/src/main/python/pyopencga/rest_clients/sample_client.py index dca81d4e863..34743081040 100644 --- a/opencga-client/src/main/python/pyopencga/rest_clients/sample_client.py +++ b/opencga-client/src/main/python/pyopencga/rest_clients/sample_client.py @@ -2,7 +2,7 @@ WARNING: AUTOGENERATED CODE This code was generated by a tool. - Autogenerated on: 2023-04-18 + Autogenerated on: 2023-07-28 Manual changes to this file may cause unexpected behavior in your application. Manual changes to this file will be overwritten if the code is regenerated. @@ -14,7 +14,7 @@ class Sample(_ParentRestClient): """ This class contains methods for the 'Samples' webservices - Client version: 2.8.0-SNAPSHOT + Client version: 2.8.3-SNAPSHOT PATH: /{apiVersion}/samples """ diff --git a/opencga-client/src/main/python/pyopencga/rest_clients/study_client.py b/opencga-client/src/main/python/pyopencga/rest_clients/study_client.py index 53849f904d7..f9dcf2b22d4 100644 --- a/opencga-client/src/main/python/pyopencga/rest_clients/study_client.py +++ b/opencga-client/src/main/python/pyopencga/rest_clients/study_client.py @@ -2,7 +2,7 @@ WARNING: AUTOGENERATED CODE This code was generated by a tool. - Autogenerated on: 2023-04-18 + Autogenerated on: 2023-07-28 Manual changes to this file may cause unexpected behavior in your application. Manual changes to this file will be overwritten if the code is regenerated. @@ -14,7 +14,7 @@ class Study(_ParentRestClient): """ This class contains methods for the 'Studies' webservices - Client version: 2.8.0-SNAPSHOT + Client version: 2.8.3-SNAPSHOT PATH: /{apiVersion}/studies """ diff --git a/opencga-client/src/main/python/pyopencga/rest_clients/user_client.py b/opencga-client/src/main/python/pyopencga/rest_clients/user_client.py index 0a446be7d9a..d6409f5d40f 100644 --- a/opencga-client/src/main/python/pyopencga/rest_clients/user_client.py +++ b/opencga-client/src/main/python/pyopencga/rest_clients/user_client.py @@ -2,7 +2,7 @@ WARNING: AUTOGENERATED CODE This code was generated by a tool. - Autogenerated on: 2023-04-18 + Autogenerated on: 2023-07-28 Manual changes to this file may cause unexpected behavior in your application. Manual changes to this file will be overwritten if the code is regenerated. @@ -14,7 +14,7 @@ class User(_ParentRestClient): """ This class contains methods for the 'Users' webservices - Client version: 2.8.0-SNAPSHOT + Client version: 2.8.3-SNAPSHOT PATH: /{apiVersion}/users """ diff --git a/opencga-client/src/main/python/pyopencga/rest_clients/variant_client.py b/opencga-client/src/main/python/pyopencga/rest_clients/variant_client.py index cc233157566..7424f289cd1 100644 --- a/opencga-client/src/main/python/pyopencga/rest_clients/variant_client.py +++ b/opencga-client/src/main/python/pyopencga/rest_clients/variant_client.py @@ -2,7 +2,7 @@ WARNING: AUTOGENERATED CODE This code was generated by a tool. - Autogenerated on: 2023-04-18 + Autogenerated on: 2023-07-28 Manual changes to this file may cause unexpected behavior in your application. Manual changes to this file will be overwritten if the code is regenerated. @@ -14,7 +14,7 @@ class Variant(_ParentRestClient): """ This class contains methods for the 'Analysis - Variant' webservices - Client version: 2.8.0-SNAPSHOT + Client version: 2.8.3-SNAPSHOT PATH: /{apiVersion}/analysis/variant """ diff --git a/opencga-client/src/main/python/pyopencga/rest_clients/variant_operation_client.py b/opencga-client/src/main/python/pyopencga/rest_clients/variant_operation_client.py index 80eb4b8c973..6c0906d553f 100644 --- a/opencga-client/src/main/python/pyopencga/rest_clients/variant_operation_client.py +++ b/opencga-client/src/main/python/pyopencga/rest_clients/variant_operation_client.py @@ -2,7 +2,7 @@ WARNING: AUTOGENERATED CODE This code was generated by a tool. - Autogenerated on: 2023-04-18 + Autogenerated on: 2023-07-28 Manual changes to this file may cause unexpected behavior in your application. Manual changes to this file will be overwritten if the code is regenerated. @@ -14,7 +14,7 @@ class VariantOperation(_ParentRestClient): """ This class contains methods for the 'Operations - Variant Storage' webservices - Client version: 2.8.0-SNAPSHOT + Client version: 2.8.3-SNAPSHOT PATH: /{apiVersion}/operation """ diff --git a/opencga-core/src/main/java/org/opencb/opencga/core/models/variant/VariantIndexParams.java b/opencga-core/src/main/java/org/opencb/opencga/core/models/variant/VariantIndexParams.java index aea655f6d9b..1e0cd7dac49 100644 --- a/opencga-core/src/main/java/org/opencb/opencga/core/models/variant/VariantIndexParams.java +++ b/opencga-core/src/main/java/org/opencb/opencga/core/models/variant/VariantIndexParams.java @@ -17,6 +17,8 @@ package org.opencb.opencga.core.models.variant; import org.opencb.biodata.models.variant.metadata.Aggregation; +import org.opencb.commons.annotations.DataField; +import org.opencb.opencga.core.api.ParamConstants; import org.opencb.opencga.core.tools.ToolParams; public class VariantIndexParams extends ToolParams { @@ -29,11 +31,14 @@ public VariantIndexParams(String file, boolean resume, String outdir, boolean transform, boolean gvcf, - boolean normalizationSkip, String referenceGenome, + boolean normalizationSkip, + String referenceGenome, String failOnMalformedLines, boolean family, boolean somatic, - boolean load, String loadSplitData, boolean loadMultiFileData, + boolean load, + boolean forceReload, + String loadSplitData, boolean loadMultiFileData, String loadSampleIndex, String loadArchive, String loadHomRef, @@ -53,6 +58,7 @@ public VariantIndexParams(String file, this.family = family; this.somatic = somatic; this.load = load; + this.forceReload = forceReload; this.loadSplitData = loadSplitData; this.loadMultiFileData = loadMultiFileData; this.loadSampleIndex = loadSampleIndex; @@ -73,43 +79,82 @@ public VariantIndexParams(String file, this.skipIndexedFiles = skipIndexedFiles; } + @DataField(description = "List of files to be indexed.") private String file; + @DataField(description = "Resume a previously failed index operation") private boolean resume; + @DataField(description = "Output directory") private String outdir; + @DataField(description = "If present it only runs the transform stage, no load is executed") private boolean transform; + @DataField(description = "Hint to indicate that the input file is in gVCF format.") private boolean gvcf; + @DataField(description = "Do not execute the normalization process. WARN: INDELs will be stored with the context base") private boolean normalizationSkip; + @DataField(description = "Reference genome in FASTA format used during the normalization step " + + "for a complete left alignment") private String referenceGenome; + @DataField(description = "Fail when encountering malformed lines. (yes, no, auto) [auto]") private String failOnMalformedLines; + @DataField(description = "Indicate that the files to be loaded are part of a family. " + + "This will set 'load-hom-ref' to YES if it was in AUTO and execute 'family-index' afterwards") private boolean family; + @DataField(description = "Indicate that the files to be loaded contain somatic samples. " + + "This will set 'load-hom-ref' to YES if it was in AUTO.") private boolean somatic; + @DataField(description = "If present only the load stage is executed, transformation is skipped") private boolean load; + @DataField(description = "If the file is already loaded, force a file reload") + private boolean forceReload; + @DataField(description = "Indicate that the variants from a group of samples is split in multiple files, either by CHROMOSOME or by REGION. In either case, variants from different files must not overlap.") private String loadSplitData; + @DataField(description = "Indicate the presence of multiple files for the same sample. Each file could be the result of a different vcf-caller or experiment over the same sample.") private boolean loadMultiFileData; + @DataField(description = "Build sample index while loading. (yes, no, auto) [auto]") private String loadSampleIndex; + @DataField(description = "Load archive data. (yes, no, auto) [auto]") private String loadArchive; + @DataField(description = "Load HOM_REF genotypes. (yes, no, auto) [auto]") private String loadHomRef; + @DataField(description = "Execute post load checks over the database. (yes, no, auto) [auto]") private String postLoadCheck; + @DataField(description = "Load the genotype data for the current file. " + + "This only applies to the GT field from the FORMAT. All the rest of fields from the INFO and FORMAT will be loaded. " + + "Use this parameter skip load data when the GT field is not reliable, or its only value across the file is \"./.\". " + + "If \"auto\", genotypes will be automatically excluded if all genotypes are either missing, ./. or 0/0. " + + "(yes, no, auto) [auto]") private String includeGenotypes; + @DataField(description = "Index including other sample data fields (i.e. FORMAT fields)." + + " Use \"" + ParamConstants.ALL + "\", \"" + ParamConstants.NONE + "\", or CSV with the fields to load.") private String includeSampleData; + @DataField(deprecated = true, description = "Currently two levels of merge are supported: \"basic\" mode merge genotypes of the same variants while \"advanced\" merge multiallelic and overlapping variants.") private String merge; + @DataField(description = "Specify how duplicated variants should be handled. Available policies: \"discard\", \"maxQual\"") private String deduplicationPolicy; + @DataField(description = "Calculate indexed variants statistics after the load step") private boolean calculateStats; + @DataField(description = "Select the type of aggregated VCF file: none, basic, EVS or ExAC") private Aggregation aggregated; + @DataField(description = "File containing population names mapping in an aggregated VCF file") private String aggregationMappingFile; + @DataField(description = "Annotate indexed variants after the load step") private boolean annotate; + @DataField(description = "Annotation source {cellbase_rest, cellbase_db_adaptor}") private String annotator; + @DataField(description = "Overwrite annotations in variants already present") private boolean overwriteAnnotations; + @DataField(description = "Add files to the secondary search index") private boolean indexSearch; + @DataField(description = "Do not fail if any of the input files was already indexed.") private boolean skipIndexedFiles; public String getFile() { @@ -211,6 +256,15 @@ public VariantIndexParams setLoad(boolean load) { return this; } + public boolean isForceReload() { + return forceReload; + } + + public VariantIndexParams setForceReload(boolean forceReload) { + this.forceReload = forceReload; + return this; + } + public String getLoadSplitData() { return loadSplitData; } diff --git a/opencga-storage/opencga-storage-app/src/main/java/org/opencb/opencga/storage/app/cli/client/options/StorageVariantCommandOptions.java b/opencga-storage/opencga-storage-app/src/main/java/org/opencb/opencga/storage/app/cli/client/options/StorageVariantCommandOptions.java index 2550d6f0592..398b7f775cd 100644 --- a/opencga-storage/opencga-storage-app/src/main/java/org/opencb/opencga/storage/app/cli/client/options/StorageVariantCommandOptions.java +++ b/opencga-storage/opencga-storage-app/src/main/java/org/opencb/opencga/storage/app/cli/client/options/StorageVariantCommandOptions.java @@ -94,6 +94,9 @@ public static class GenericVariantIndexOptions { @Parameter(names = {"--load"}, description = "If present only the load stage is executed, transformation is skipped") public boolean load; + @Parameter(names = {"--force-reload"}, description = "If the file is already loaded, force a file reload") + public boolean forceReload; + @Parameter(names = {"--merge"}, description = "Currently two levels of merge are supported: \"basic\" mode merge genotypes of the same variants while \"advanced\" merge multiallelic and overlapping variants.") public String merge; diff --git a/opencga-storage/opencga-storage-core/src/main/java/org/opencb/opencga/storage/core/variant/VariantStoragePipeline.java b/opencga-storage/opencga-storage-core/src/main/java/org/opencb/opencga/storage/core/variant/VariantStoragePipeline.java index 44c063cf17b..6ed8b85434b 100644 --- a/opencga-storage/opencga-storage-core/src/main/java/org/opencb/opencga/storage/core/variant/VariantStoragePipeline.java +++ b/opencga-storage/opencga-storage-core/src/main/java/org/opencb/opencga/storage/core/variant/VariantStoragePipeline.java @@ -52,9 +52,9 @@ import org.opencb.opencga.core.common.TimeUtils; import org.opencb.opencga.core.common.UriUtils; import org.opencb.opencga.core.common.YesNoAuto; +import org.opencb.opencga.core.config.storage.StorageConfiguration; import org.opencb.opencga.core.models.common.mixins.GenericRecordAvroJsonMixin; import org.opencb.opencga.storage.core.StoragePipeline; -import org.opencb.opencga.core.config.storage.StorageConfiguration; import org.opencb.opencga.storage.core.exceptions.StorageEngineException; import org.opencb.opencga.storage.core.io.managers.IOConnectorProvider; import org.opencb.opencga.storage.core.io.plain.StringDataReader; @@ -172,6 +172,16 @@ public URI preTransform(URI input) throws StorageEngineException, IOException, F } return existingStudyMetadata; }); + if (options.getBoolean(FORCE.key())) { + Integer fileId = getMetadataManager().getFileId(studyMetadata.getId(), fileName, true); + if (fileId != null) { + // File is indexed. Mark as non indexed. + getMetadataManager().updateFileMetadata(studyMetadata.getId(), fileId, fileMetadata -> { + fileMetadata.setIndexStatus(TaskMetadata.Status.NONE); + }); + logger.info("File '{}' already loaded. Force reload!", fileName); + } + } if (VariantStorageEngine.SplitData.isPartial(options) && !options.getString(LOAD_VIRTUAL_FILE.key(), "").isEmpty()) { setFileId(smm.registerPartialFile(studyMetadata.getId(), input.getPath())); diff --git a/opencga-storage/opencga-storage-core/src/test/java/org/opencb/opencga/storage/core/variant/solr/VariantSolrExternalResource.java b/opencga-storage/opencga-storage-core/src/test/java/org/opencb/opencga/storage/core/variant/solr/VariantSolrExternalResource.java index 122ef2da4af..c4111746b05 100644 --- a/opencga-storage/opencga-storage-core/src/test/java/org/opencb/opencga/storage/core/variant/solr/VariantSolrExternalResource.java +++ b/opencga-storage/opencga-storage-core/src/test/java/org/opencb/opencga/storage/core/variant/solr/VariantSolrExternalResource.java @@ -21,20 +21,22 @@ import org.apache.solr.client.solrj.SolrServerException; import org.apache.solr.client.solrj.embedded.EmbeddedSolrServer; import org.apache.solr.core.NodeConfig; -import org.apache.solr.core.SolrResourceLoader; import org.junit.rules.ExternalResource; import org.opencb.commons.datastore.solr.SolrManager; import org.opencb.opencga.core.common.GitRepositoryState; +import org.opencb.opencga.core.common.TimeUtils; import org.opencb.opencga.storage.core.exceptions.StorageEngineException; import org.opencb.opencga.storage.core.variant.VariantStorageEngine; import org.opencb.opencga.storage.core.variant.search.solr.VariantSearchManager; import java.io.File; import java.io.IOException; +import java.nio.file.Files; import java.nio.file.Path; import java.nio.file.Paths; -import static org.opencb.opencga.storage.core.variant.VariantStorageBaseTest.*; +import static org.opencb.opencga.storage.core.variant.VariantStorageBaseTest.DB_NAME; +import static org.opencb.opencga.storage.core.variant.VariantStorageBaseTest.getResourceUri; /** * + @@ -61,18 +63,19 @@ public VariantSolrExternalResource(boolean embeded) { protected void before() throws Throwable { super.before(); - Path rootDir = getTmpRootDir(); + Path rootDir = Paths.get("target/test-data", "junit-variant-solr-" + TimeUtils.getTimeMillis()); + Files.createDirectories(rootDir); String configSet = "opencga-variant-configset-" + GitRepositoryState.get().getBuildVersion(); // Copy configuration - getResourceUri("configsets/variantsCollection/solrconfig.xml", "configsets/" + configSet + "/solrconfig.xml"); - getResourceUri("managed-schema", "configsets/" + configSet + "/managed-schema"); - getResourceUri("configsets/variantsCollection/params.json", "configsets/" + configSet + "/params.json"); - getResourceUri("configsets/variantsCollection/protwords.txt", "configsets/" + configSet + "/protwords.txt"); - getResourceUri("configsets/variantsCollection/stopwords.txt", "configsets/" + configSet + "/stopwords.txt"); - getResourceUri("configsets/variantsCollection/synonyms.txt", "configsets/" + configSet + "/synonyms.txt"); - getResourceUri("configsets/variantsCollection/lang/stopwords_en.txt", "configsets/" + configSet + "/lang/stopwords_en.txt"); + getResourceUri("configsets/variantsCollection/solrconfig.xml", "configsets/" + configSet + "/solrconfig.xml", rootDir); + getResourceUri("managed-schema", "configsets/" + configSet + "/managed-schema", rootDir); + getResourceUri("configsets/variantsCollection/params.json", "configsets/" + configSet + "/params.json", rootDir); + getResourceUri("configsets/variantsCollection/protwords.txt", "configsets/" + configSet + "/protwords.txt", rootDir); + getResourceUri("configsets/variantsCollection/stopwords.txt", "configsets/" + configSet + "/stopwords.txt", rootDir); + getResourceUri("configsets/variantsCollection/synonyms.txt", "configsets/" + configSet + "/synonyms.txt", rootDir); + getResourceUri("configsets/variantsCollection/lang/stopwords_en.txt", "configsets/" + configSet + "/lang/stopwords_en.txt", rootDir); String solrHome = rootDir.resolve("solr").toString(); From 7b0a294ee9dbfa0fdfac9dc802aa282739611eed Mon Sep 17 00:00:00 2001 From: JuanfeSanahuja Date: Fri, 11 Aug 2023 12:21:41 +0200 Subject: [PATCH 04/50] CLI: Fix CustomFilesCommandExecutor upload problems #4843 --- .../app/cli/main/custom/CustomFilesCommandExecutor.java | 4 ++-- .../org/opencb/opencga/client/rest/AbstractParentClient.java | 1 + 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/opencga-app/src/main/java/org/opencb/opencga/app/cli/main/custom/CustomFilesCommandExecutor.java b/opencga-app/src/main/java/org/opencb/opencga/app/cli/main/custom/CustomFilesCommandExecutor.java index 719d9999d96..5f245961409 100644 --- a/opencga-app/src/main/java/org/opencb/opencga/app/cli/main/custom/CustomFilesCommandExecutor.java +++ b/opencga-app/src/main/java/org/opencb/opencga/app/cli/main/custom/CustomFilesCommandExecutor.java @@ -38,8 +38,8 @@ public CustomFilesCommandExecutor(ObjectMap options, String token, ClientConfigu public RestResponse upload() throws Exception { // ObjectMap params = new ObjectMap() - options.append("fileFormat", ParamUtils.defaultString(String.valueOf(options.get("fileFormat")), File.Format.UNKNOWN.toString())) - .append("bioformat", ParamUtils.defaultString(String.valueOf(options.get("bioformat")), File.Bioformat.UNKNOWN.toString())); + options.append("fileFormat", options.getString("fileFormat", File.Format.UNKNOWN.toString())) + .append("bioformat", options.getString("bioformat", File.Bioformat.UNKNOWN.toString())); // //If the DEPRECATED parameter fileFormat has set we only override it if the new parameter format is also set // params.append("fileFormat", ParamUtils.defaultString(commandOptions.format, params.getString("fileFormat"))); // params.putIfNotEmpty("study", commandOptions.study); diff --git a/opencga-client/src/main/java/org/opencb/opencga/client/rest/AbstractParentClient.java b/opencga-client/src/main/java/org/opencb/opencga/client/rest/AbstractParentClient.java index 58d37b4caf6..007c5f7f2e5 100644 --- a/opencga-client/src/main/java/org/opencb/opencga/client/rest/AbstractParentClient.java +++ b/opencga-client/src/main/java/org/opencb/opencga/client/rest/AbstractParentClient.java @@ -456,6 +456,7 @@ protected RestResponse callUploadRest(WebTarget path, Map client.property(ClientProperties.READ_TIMEOUT, DEFAULT_UPLOAD_TIMEOUT); path.register(MultiPartFeature.class); path.property(ClientProperties.REQUEST_ENTITY_PROCESSING, RequestEntityProcessing.CHUNKED); + final FileDataBodyPart filePart = new FileDataBodyPart("file", new File(filePath)); FormDataMultiPart formDataMultiPart = new FormDataMultiPart(); // Add the rest of the parameters to the form From a3de4e1aad88e3bb447658a23c2fe9457155acc2 Mon Sep 17 00:00:00 2001 From: JuanfeSanahuja Date: Fri, 11 Aug 2023 15:29:48 +0200 Subject: [PATCH 05/50] Prepare next release 2.8.4-SNAPSHOT --- .github/workflows/test-analysis.yml | 4 ++-- opencga-analysis/pom.xml | 2 +- opencga-app/pom.xml | 2 +- opencga-catalog/pom.xml | 2 +- opencga-client/pom.xml | 2 +- opencga-clinical/pom.xml | 2 +- opencga-core/pom.xml | 2 +- opencga-master/pom.xml | 2 +- opencga-server/pom.xml | 2 +- opencga-storage/opencga-storage-app/pom.xml | 2 +- opencga-storage/opencga-storage-benchmark/pom.xml | 2 +- opencga-storage/opencga-storage-core/pom.xml | 2 +- .../opencga-storage-hadoop-core/pom.xml | 2 +- .../opencga-storage-hadoop-deps-emr6.1/pom.xml | 2 +- .../opencga-storage-hadoop-deps-hdp2.6/pom.xml | 2 +- .../opencga-storage-hadoop-deps-hdp3.1/pom.xml | 2 +- .../opencga-storage-hadoop-deps/pom.xml | 2 +- opencga-storage/opencga-storage-hadoop/pom.xml | 2 +- opencga-storage/opencga-storage-server/pom.xml | 2 +- opencga-storage/pom.xml | 2 +- opencga-test/pom.xml | 2 +- pom.xml | 14 +++++++------- 22 files changed, 29 insertions(+), 29 deletions(-) diff --git a/.github/workflows/test-analysis.yml b/.github/workflows/test-analysis.yml index 240db1ece4c..5e9a7e952a1 100644 --- a/.github/workflows/test-analysis.yml +++ b/.github/workflows/test-analysis.yml @@ -24,7 +24,7 @@ on: SSH_TESTING_SERVER_PASSWORD: required: true env: - xb_version: "1.6.3" + xb_version: "1.6.4" jobs: analysis: name: Execute Sonar Analysis @@ -77,7 +77,7 @@ jobs: needs: test strategy: matrix: - module: [ "opencga-app", "opencga-catalog", "opencga-client", "opencga-clinical", "opencga-core", "opencga-master", "opencga-server", "opencga-storage", "opencga-storage/opencga-storage-app", "opencga-storage/opencga-storage-benchmark", "opencga-storage/opencga-storage-core", "opencga-storage/opencga-storage-hadoop", "opencga-storage/opencga-storage-server", "opencga-storage/opencga-storage-hadoop/opencga-storage-hadoop-core", "opencga-storage/opencga-storage-hadoop/opencga-storage-hadoop-deps" ] + module: ["opencga-app", "opencga-catalog", "opencga-client", "opencga-clinical", "opencga-core", "opencga-master", "opencga-server", "opencga-storage", "opencga-storage/opencga-storage-app", "opencga-storage/opencga-storage-benchmark", "opencga-storage/opencga-storage-core", "opencga-storage/opencga-storage-hadoop", "opencga-storage/opencga-storage-server", "opencga-storage/opencga-storage-hadoop/opencga-storage-hadoop-core", "opencga-storage/opencga-storage-hadoop/opencga-storage-hadoop-deps"] steps: - name: Download result dir uses: actions/download-artifact@v3 diff --git a/opencga-analysis/pom.xml b/opencga-analysis/pom.xml index 260955d38c6..27d587f2570 100644 --- a/opencga-analysis/pom.xml +++ b/opencga-analysis/pom.xml @@ -22,7 +22,7 @@ org.opencb.opencga opencga - 2.8.3 + 2.8.4-SNAPSHOT ../pom.xml diff --git a/opencga-app/pom.xml b/opencga-app/pom.xml index 4d18a6476ca..c641496c541 100644 --- a/opencga-app/pom.xml +++ b/opencga-app/pom.xml @@ -22,7 +22,7 @@ org.opencb.opencga opencga - 2.8.3 + 2.8.4-SNAPSHOT ../pom.xml diff --git a/opencga-catalog/pom.xml b/opencga-catalog/pom.xml index a0ea06ca14c..7d080fd8418 100644 --- a/opencga-catalog/pom.xml +++ b/opencga-catalog/pom.xml @@ -23,7 +23,7 @@ org.opencb.opencga opencga - 2.8.3 + 2.8.4-SNAPSHOT ../pom.xml diff --git a/opencga-client/pom.xml b/opencga-client/pom.xml index 191a5319867..888eaac8d71 100644 --- a/opencga-client/pom.xml +++ b/opencga-client/pom.xml @@ -22,7 +22,7 @@ org.opencb.opencga opencga - 2.8.3 + 2.8.4-SNAPSHOT ../pom.xml diff --git a/opencga-clinical/pom.xml b/opencga-clinical/pom.xml index a9630add90e..360241475b7 100644 --- a/opencga-clinical/pom.xml +++ b/opencga-clinical/pom.xml @@ -5,7 +5,7 @@ org.opencb.opencga opencga - 2.8.3 + 2.8.4-SNAPSHOT ../pom.xml 4.0.0 diff --git a/opencga-core/pom.xml b/opencga-core/pom.xml index 508d50cede8..51641a67ce1 100644 --- a/opencga-core/pom.xml +++ b/opencga-core/pom.xml @@ -22,7 +22,7 @@ org.opencb.opencga opencga - 2.8.3 + 2.8.4-SNAPSHOT ../pom.xml diff --git a/opencga-master/pom.xml b/opencga-master/pom.xml index d45f901844c..ab98b30941e 100644 --- a/opencga-master/pom.xml +++ b/opencga-master/pom.xml @@ -22,7 +22,7 @@ opencga org.opencb.opencga - 2.8.3 + 2.8.4-SNAPSHOT ../pom.xml diff --git a/opencga-server/pom.xml b/opencga-server/pom.xml index 0d66c9f3a74..ee168db3285 100644 --- a/opencga-server/pom.xml +++ b/opencga-server/pom.xml @@ -22,7 +22,7 @@ org.opencb.opencga opencga - 2.8.3 + 2.8.4-SNAPSHOT ../pom.xml diff --git a/opencga-storage/opencga-storage-app/pom.xml b/opencga-storage/opencga-storage-app/pom.xml index 9d41b4d028d..571408e76ce 100644 --- a/opencga-storage/opencga-storage-app/pom.xml +++ b/opencga-storage/opencga-storage-app/pom.xml @@ -22,7 +22,7 @@ org.opencb.opencga opencga-storage - 2.8.3 + 2.8.4-SNAPSHOT ../pom.xml diff --git a/opencga-storage/opencga-storage-benchmark/pom.xml b/opencga-storage/opencga-storage-benchmark/pom.xml index 89d8c6c9d7e..37f3a122b1a 100644 --- a/opencga-storage/opencga-storage-benchmark/pom.xml +++ b/opencga-storage/opencga-storage-benchmark/pom.xml @@ -22,7 +22,7 @@ opencga-storage org.opencb.opencga - 2.8.3 + 2.8.4-SNAPSHOT ../pom.xml diff --git a/opencga-storage/opencga-storage-core/pom.xml b/opencga-storage/opencga-storage-core/pom.xml index 3b2f329ccb0..cfeeb573faa 100644 --- a/opencga-storage/opencga-storage-core/pom.xml +++ b/opencga-storage/opencga-storage-core/pom.xml @@ -25,7 +25,7 @@ org.opencb.opencga opencga-storage - 2.8.3 + 2.8.4-SNAPSHOT ../pom.xml diff --git a/opencga-storage/opencga-storage-hadoop/opencga-storage-hadoop-core/pom.xml b/opencga-storage/opencga-storage-hadoop/opencga-storage-hadoop-core/pom.xml index bd7a7c7baa4..168c6fe1676 100644 --- a/opencga-storage/opencga-storage-hadoop/opencga-storage-hadoop-core/pom.xml +++ b/opencga-storage/opencga-storage-hadoop/opencga-storage-hadoop-core/pom.xml @@ -23,7 +23,7 @@ org.opencb.opencga opencga-storage-hadoop - 2.8.3 + 2.8.4-SNAPSHOT ../pom.xml diff --git a/opencga-storage/opencga-storage-hadoop/opencga-storage-hadoop-deps/opencga-storage-hadoop-deps-emr6.1/pom.xml b/opencga-storage/opencga-storage-hadoop/opencga-storage-hadoop-deps/opencga-storage-hadoop-deps-emr6.1/pom.xml index f64c1bc25ba..17aedc345a2 100644 --- a/opencga-storage/opencga-storage-hadoop/opencga-storage-hadoop-deps/opencga-storage-hadoop-deps-emr6.1/pom.xml +++ b/opencga-storage/opencga-storage-hadoop/opencga-storage-hadoop-deps/opencga-storage-hadoop-deps-emr6.1/pom.xml @@ -22,7 +22,7 @@ org.opencb.opencga opencga-storage-hadoop-deps - 2.8.3 + 2.8.4-SNAPSHOT ../pom.xml diff --git a/opencga-storage/opencga-storage-hadoop/opencga-storage-hadoop-deps/opencga-storage-hadoop-deps-hdp2.6/pom.xml b/opencga-storage/opencga-storage-hadoop/opencga-storage-hadoop-deps/opencga-storage-hadoop-deps-hdp2.6/pom.xml index a5852716f29..41bf7b35961 100644 --- a/opencga-storage/opencga-storage-hadoop/opencga-storage-hadoop-deps/opencga-storage-hadoop-deps-hdp2.6/pom.xml +++ b/opencga-storage/opencga-storage-hadoop/opencga-storage-hadoop-deps/opencga-storage-hadoop-deps-hdp2.6/pom.xml @@ -22,7 +22,7 @@ org.opencb.opencga opencga-storage-hadoop-deps - 2.8.3 + 2.8.4-SNAPSHOT ../pom.xml diff --git a/opencga-storage/opencga-storage-hadoop/opencga-storage-hadoop-deps/opencga-storage-hadoop-deps-hdp3.1/pom.xml b/opencga-storage/opencga-storage-hadoop/opencga-storage-hadoop-deps/opencga-storage-hadoop-deps-hdp3.1/pom.xml index cbbfa9c0e83..9b3778791cc 100644 --- a/opencga-storage/opencga-storage-hadoop/opencga-storage-hadoop-deps/opencga-storage-hadoop-deps-hdp3.1/pom.xml +++ b/opencga-storage/opencga-storage-hadoop/opencga-storage-hadoop-deps/opencga-storage-hadoop-deps-hdp3.1/pom.xml @@ -22,7 +22,7 @@ org.opencb.opencga opencga-storage-hadoop-deps - 2.8.3 + 2.8.4-SNAPSHOT ../pom.xml diff --git a/opencga-storage/opencga-storage-hadoop/opencga-storage-hadoop-deps/pom.xml b/opencga-storage/opencga-storage-hadoop/opencga-storage-hadoop-deps/pom.xml index 3dc7eedf5dc..4888d43ee94 100644 --- a/opencga-storage/opencga-storage-hadoop/opencga-storage-hadoop-deps/pom.xml +++ b/opencga-storage/opencga-storage-hadoop/opencga-storage-hadoop-deps/pom.xml @@ -50,7 +50,7 @@ org.opencb.opencga opencga-storage-hadoop - 2.8.3 + 2.8.4-SNAPSHOT ../pom.xml diff --git a/opencga-storage/opencga-storage-hadoop/pom.xml b/opencga-storage/opencga-storage-hadoop/pom.xml index 202510b2e48..1a800f5260f 100644 --- a/opencga-storage/opencga-storage-hadoop/pom.xml +++ b/opencga-storage/opencga-storage-hadoop/pom.xml @@ -28,7 +28,7 @@ org.opencb.opencga opencga-storage - 2.8.3 + 2.8.4-SNAPSHOT ../pom.xml diff --git a/opencga-storage/opencga-storage-server/pom.xml b/opencga-storage/opencga-storage-server/pom.xml index bbe30f1aa3b..ba87c9b2a6d 100644 --- a/opencga-storage/opencga-storage-server/pom.xml +++ b/opencga-storage/opencga-storage-server/pom.xml @@ -22,7 +22,7 @@ org.opencb.opencga opencga-storage - 2.8.3 + 2.8.4-SNAPSHOT ../pom.xml diff --git a/opencga-storage/pom.xml b/opencga-storage/pom.xml index ab93e1a8071..996d1d8c1ad 100644 --- a/opencga-storage/pom.xml +++ b/opencga-storage/pom.xml @@ -22,7 +22,7 @@ org.opencb.opencga opencga - 2.8.3 + 2.8.4-SNAPSHOT ../pom.xml diff --git a/opencga-test/pom.xml b/opencga-test/pom.xml index 8f13ebd49ab..f9f2250601e 100644 --- a/opencga-test/pom.xml +++ b/opencga-test/pom.xml @@ -24,7 +24,7 @@ org.opencb.opencga opencga - 2.8.3 + 2.8.4-SNAPSHOT ../pom.xml diff --git a/pom.xml b/pom.xml index a91ad02aa54..8403754f3b5 100644 --- a/pom.xml +++ b/pom.xml @@ -22,7 +22,7 @@ org.opencb.opencga opencga - 2.8.3 + 2.8.4-SNAPSHOT pom OpenCGA OenCGA projects implements a big data platform for genomic data analysis @@ -42,12 +42,12 @@ - 2.8.3 - 2.8.3 - 5.4.0 - 2.8.0 - 4.8.0 - 2.8.3 + 2.8.4_dev + 2.8.4_dev + 5.4.1-SNAPSHOT + 2.8.1-SNAPSHOT + 4.8.1-SNAPSHOT + 2.8.4-SNAPSHOT 0.2.0 From eb632fadd5eb6517edea0fe23655b07da5ede0dd Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jacobo=20Coll=20Morag=C3=B3n?= Date: Mon, 14 Aug 2023 23:42:15 +0100 Subject: [PATCH 06/50] storage: Fix OOME on CatalogStorageMetadataSynchronizer for very large studies #TASK-4853 --- .../metadata/CatalogStorageMetadataSynchronizer.java | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/opencga-analysis/src/main/java/org/opencb/opencga/analysis/variant/metadata/CatalogStorageMetadataSynchronizer.java b/opencga-analysis/src/main/java/org/opencb/opencga/analysis/variant/metadata/CatalogStorageMetadataSynchronizer.java index 4f6f7bb6452..3d97af2c238 100644 --- a/opencga-analysis/src/main/java/org/opencb/opencga/analysis/variant/metadata/CatalogStorageMetadataSynchronizer.java +++ b/opencga-analysis/src/main/java/org/opencb/opencga/analysis/variant/metadata/CatalogStorageMetadataSynchronizer.java @@ -508,6 +508,16 @@ protected boolean synchronizeFiles(StudyMetadata study, List files, String } fileSamplesMap.put(fileMetadata.getName(), samples); allSamples.addAll(fileMetadata.getSamples()); + if (samples.size() > 100) { + // Try to reuse value. + // If the file holds more than 100 samples, it's most likely this same set of samples is already present + for (Set value : fileSamplesMap.values()) { + if (value.equals(samples)) { + fileSamplesMap.put(fileMetadata.getName(), value); + break; + } + } + } } if (!indexedFilesFromStorage.isEmpty()) { From 4aeaa83083572ff77f94570a1e85aeee7bb1e2de Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jacobo=20Coll=20Morag=C3=B3n?= Date: Wed, 30 Aug 2023 11:38:46 +0100 Subject: [PATCH 07/50] core: Fix cellbase validator to acknowledge tokens. #TASK-4913 --- .../core/cellbase/CellBaseValidator.java | 48 +++++++++++++++++-- .../core/cellbase/CellBaseValidatorTest.java | 35 ++++++++++++++ 2 files changed, 78 insertions(+), 5 deletions(-) diff --git a/opencga-core/src/main/java/org/opencb/opencga/core/cellbase/CellBaseValidator.java b/opencga-core/src/main/java/org/opencb/opencga/core/cellbase/CellBaseValidator.java index a2c5da2dc72..b4383a2ec2a 100644 --- a/opencga-core/src/main/java/org/opencb/opencga/core/cellbase/CellBaseValidator.java +++ b/opencga-core/src/main/java/org/opencb/opencga/core/cellbase/CellBaseValidator.java @@ -1,6 +1,8 @@ package org.opencb.opencga.core.cellbase; +import io.jsonwebtoken.JwtException; import org.apache.commons.lang3.StringUtils; +import org.opencb.biodata.models.variant.avro.VariantAnnotation; import org.opencb.cellbase.client.rest.CellBaseClient; import org.opencb.cellbase.core.config.SpeciesConfiguration; import org.opencb.cellbase.core.config.SpeciesProperties; @@ -8,16 +10,14 @@ import org.opencb.cellbase.core.result.CellBaseDataResponse; import org.opencb.cellbase.core.token.DataAccessTokenManager; import org.opencb.cellbase.core.token.DataAccessTokenSources; +import org.opencb.commons.datastore.core.QueryOptions; import org.opencb.opencga.core.common.VersionUtils; import org.opencb.opencga.core.config.storage.CellBaseConfiguration; import org.slf4j.Logger; import org.slf4j.LoggerFactory; import java.io.IOException; -import java.util.ArrayList; -import java.util.Comparator; -import java.util.List; -import java.util.Optional; +import java.util.*; public class CellBaseValidator { @@ -46,6 +46,7 @@ private CellBaseClient newCellBaseClient(CellBaseConfiguration cellBaseConfigura toCellBaseSpeciesName(species), assembly, cellBaseConfiguration.getDataRelease(), + cellBaseConfiguration.getToken(), cellBaseConfiguration.toClientConfiguration()); } @@ -120,7 +121,7 @@ public void validate() throws IOException { validate(false); } - public CellBaseConfiguration validate(boolean autoComplete) throws IOException { + private CellBaseConfiguration validate(boolean autoComplete) throws IOException { CellBaseConfiguration cellBaseConfiguration = getCellBaseConfiguration(); String inputVersion = getVersion(); CellBaseDataResponse species; @@ -173,6 +174,38 @@ public CellBaseConfiguration validate(boolean autoComplete) throws IOException { } } } + if (getToken() != null) { + // Check it's supported + if (!supportsToken(serverVersion)) { + throw new IllegalArgumentException("Token not supported for cellbase " + + "url: '" + getURL() + "'" + + ", version: '" + inputVersion + "'"); + } + + // Check it's an actual token + DataAccessTokenManager tokenManager = new DataAccessTokenManager(); + try { + tokenManager.decode(getToken()); + } catch (JwtException e) { + throw new IllegalArgumentException("Malformed token for cellbase " + + "url: '" + getURL() + "'" + + ", version: '" + inputVersion + + "', species: '" + getSpecies() + + "', assembly: '" + getAssembly() + "'"); + } + + // Check it's a valid token + CellBaseDataResponse response = cellBaseClient.getVariantClient() + .getAnnotationByVariantIds(Collections.singletonList("1:1:N:C"), new QueryOptions(), true); + if (response.firstResult() == null) { + throw new IllegalArgumentException("Invalid token for cellbase " + + "url: '" + getURL() + "'" + + ", version: '" + inputVersion + + "', species: '" + getSpecies() + + "', assembly: '" + getAssembly() + "'"); + } + } + return cellBaseConfiguration; } @@ -206,6 +239,11 @@ public static boolean supportsDataRelease(String serverVersion) { return VersionUtils.isMinVersion("5.1.0", serverVersion); } + public static boolean supportsToken(String serverVersion) { + // Tokens support starts at version 5.4.0 + return VersionUtils.isMinVersion("5.4.0", serverVersion); + } + public String getVersionFromServerMajor() throws IOException { return major(getVersionFromServer()); } diff --git a/opencga-core/src/test/java/org/opencb/opencga/core/cellbase/CellBaseValidatorTest.java b/opencga-core/src/test/java/org/opencb/opencga/core/cellbase/CellBaseValidatorTest.java index 36db80985f0..38d91dd0fc8 100644 --- a/opencga-core/src/test/java/org/opencb/opencga/core/cellbase/CellBaseValidatorTest.java +++ b/opencga-core/src/test/java/org/opencb/opencga/core/cellbase/CellBaseValidatorTest.java @@ -1,6 +1,8 @@ package org.opencb.opencga.core.cellbase; +import org.apache.commons.lang3.StringUtils; import org.junit.Assert; +import org.junit.Assume; import org.junit.Rule; import org.junit.Test; import org.junit.rules.ExpectedException; @@ -70,4 +72,37 @@ public void testNoActiveReleases() throws IOException { thrown.expectMessage("No active data releases found on cellbase"); CellBaseValidator.validate(new CellBaseConfiguration(ParamConstants.CELLBASE_URL, "v5.1", null, null), "mmusculus", "GRCm38", true); } + + @Test + public void testToken() throws IOException { + String token = System.getenv("CELLBASE_HGMD_TOKEN"); + Assume.assumeTrue(StringUtils.isNotEmpty(token)); + CellBaseConfiguration validated = CellBaseValidator.validate(new CellBaseConfiguration(ParamConstants.CELLBASE_URL, "v5.4", null, token), "hsapiens", "grch38", true); + Assert.assertNotNull(validated.getToken()); + } + + @Test + public void testTokenNotSupported() throws IOException { + String token = System.getenv("CELLBASE_HGMD_TOKEN"); + Assume.assumeTrue(StringUtils.isNotEmpty(token)); + CellBaseConfiguration validated = CellBaseValidator.validate(new CellBaseConfiguration(ParamConstants.CELLBASE_URL, "v5.1", null, token), "hsapiens", "grch38", true); + Assert.assertNotNull(validated.getToken()); + } + + @Test + public void testMalformedToken() throws IOException { + thrown.expectMessage("Malformed token for cellbase"); + String token = "MALFORMED_TOKEN"; + CellBaseConfiguration validated = CellBaseValidator.validate(new CellBaseConfiguration(ParamConstants.CELLBASE_URL, "v5.4", null, token), "hsapiens", "grch38", true); + Assert.assertNotNull(validated.getToken()); + } + + @Test + public void testUnsignedToken() throws IOException { + thrown.expectMessage("Invalid token for cellbase"); + String token = "eyJhbGciOiJIUzI1NiJ9.eyJzb3VyY2VzIjp7ImhnbWQiOjkyMjMzNzIwMzY4NTQ3NzU4MDd9LCJ2ZXJzaW9uIjoiMS4wIiwic3ViIjoiWkVUVEEiLCJpYXQiOjE2OTMyMTY5MDd9.invalidsignature"; + CellBaseConfiguration validated = CellBaseValidator.validate(new CellBaseConfiguration(ParamConstants.CELLBASE_URL, "v5.4", null, token), "hsapiens", "grch38", true); + Assert.assertNotNull(validated.getToken()); + } + } \ No newline at end of file From 368084dbc4431ab1e58c681d7a035691ed0d3fad Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jacobo=20Coll=20Morag=C3=B3n?= Date: Wed, 30 Aug 2023 17:38:03 +0100 Subject: [PATCH 08/50] core: Do not validate empty string tokens. #TASK-4913 --- .../org/opencb/opencga/core/cellbase/CellBaseValidator.java | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/opencga-core/src/main/java/org/opencb/opencga/core/cellbase/CellBaseValidator.java b/opencga-core/src/main/java/org/opencb/opencga/core/cellbase/CellBaseValidator.java index b4383a2ec2a..8d4873eb488 100644 --- a/opencga-core/src/main/java/org/opencb/opencga/core/cellbase/CellBaseValidator.java +++ b/opencga-core/src/main/java/org/opencb/opencga/core/cellbase/CellBaseValidator.java @@ -174,7 +174,9 @@ private CellBaseConfiguration validate(boolean autoComplete) throws IOException } } } - if (getToken() != null) { + if (StringUtils.isEmpty(getToken())) { + cellBaseConfiguration.setToken(null); + } else { // Check it's supported if (!supportsToken(serverVersion)) { throw new IllegalArgumentException("Token not supported for cellbase " From 8abd155a3c413babc3f3df28c9f4ba27d6572bfa Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jacobo=20Coll=20Morag=C3=B3n?= Date: Thu, 31 Aug 2023 10:05:31 +0100 Subject: [PATCH 09/50] core: Improve exception message #TASK-4913 --- .../opencga/analysis/variant/manager/VariantStorageManager.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/opencga-analysis/src/main/java/org/opencb/opencga/analysis/variant/manager/VariantStorageManager.java b/opencga-analysis/src/main/java/org/opencb/opencga/analysis/variant/manager/VariantStorageManager.java index 806fbb6d818..cf5164f727a 100644 --- a/opencga-analysis/src/main/java/org/opencb/opencga/analysis/variant/manager/VariantStorageManager.java +++ b/opencga-analysis/src/main/java/org/opencb/opencga/analysis/variant/manager/VariantStorageManager.java @@ -1225,7 +1225,7 @@ private R secureTool(String toolId, boolean isOperation, ObjectMap params, S throw e; } catch (Exception e) { exception = e; - throw new StorageEngineException("Error executing operation " + toolId, e); + throw new StorageEngineException("Error executing operation '" + toolId + "' : " + e.getMessage(), e); } finally { if (result instanceof DataResult) { auditAttributes.append("dbTime", ((DataResult) result).getTime()); From 483d556a062faba8d1d47d02666d7ca6c937f3f3 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jacobo=20Coll=20Morag=C3=B3n?= Date: Thu, 31 Aug 2023 11:15:12 +0100 Subject: [PATCH 10/50] core: Fix validation test #TASK-4913 --- .../analysis/variant/manager/VariantStorageManager.java | 8 +++++++- .../opencb/opencga/core/cellbase/CellBaseValidator.java | 5 +++-- .../opencga/core/cellbase/CellBaseValidatorTest.java | 8 ++++++++ 3 files changed, 18 insertions(+), 3 deletions(-) diff --git a/opencga-analysis/src/main/java/org/opencb/opencga/analysis/variant/manager/VariantStorageManager.java b/opencga-analysis/src/main/java/org/opencb/opencga/analysis/variant/manager/VariantStorageManager.java index cf5164f727a..48b5cf87114 100644 --- a/opencga-analysis/src/main/java/org/opencb/opencga/analysis/variant/manager/VariantStorageManager.java +++ b/opencga-analysis/src/main/java/org/opencb/opencga/analysis/variant/manager/VariantStorageManager.java @@ -49,6 +49,7 @@ import org.opencb.opencga.catalog.managers.StudyManager; import org.opencb.opencga.core.api.ParamConstants; import org.opencb.opencga.core.cellbase.CellBaseValidator; +import org.opencb.opencga.core.common.ExceptionUtils; import org.opencb.opencga.core.common.UriUtils; import org.opencb.opencga.core.config.storage.CellBaseConfiguration; import org.opencb.opencga.core.config.storage.SampleIndexConfiguration; @@ -564,7 +565,10 @@ public OpenCGAResult setCellbaseConfiguration(String project, CellBaseConfi String annotationSaveId, String token) throws CatalogException, StorageEngineException { StopWatch stopwatch = StopWatch.createStarted(); - return secureOperationByProject("configureCellbase", project, new ObjectMap(), token, engine -> { + return secureOperationByProject("configureCellbase", project, new ObjectMap() + .append("cellbaseConfiguration", cellbaseConfiguration) + .append("annotate", annotate) + .append("annotationSaveId", annotationSaveId), token, engine -> { OpenCGAResult result = new OpenCGAResult<>(); result.setResultType(Job.class.getCanonicalName()); result.setResults(new ArrayList<>()); @@ -1237,6 +1241,8 @@ private R secureTool(String toolId, boolean isOperation, ObjectMap params, S if (exception != null) { auditAttributes.append("errorType", exception.getClass()); auditAttributes.append("errorMessage", exception.getMessage()); + auditAttributes.append("errorMessageFull", ExceptionUtils.prettyExceptionMessage(exception, false, true)); + auditAttributes.append("exceptionStackTrace", ExceptionUtils.prettyExceptionStackTrace(exception)); status = new AuditRecord.Status(AuditRecord.Status.Result.ERROR, new Error(-1, exception.getClass().getName(), exception.getMessage())); } else { diff --git a/opencga-core/src/main/java/org/opencb/opencga/core/cellbase/CellBaseValidator.java b/opencga-core/src/main/java/org/opencb/opencga/core/cellbase/CellBaseValidator.java index 8d4873eb488..5a180602950 100644 --- a/opencga-core/src/main/java/org/opencb/opencga/core/cellbase/CellBaseValidator.java +++ b/opencga-core/src/main/java/org/opencb/opencga/core/cellbase/CellBaseValidator.java @@ -174,7 +174,8 @@ private CellBaseConfiguration validate(boolean autoComplete) throws IOException } } } - if (StringUtils.isEmpty(getToken())) { + String token = getToken(); + if (StringUtils.isEmpty(token)) { cellBaseConfiguration.setToken(null); } else { // Check it's supported @@ -187,7 +188,7 @@ private CellBaseConfiguration validate(boolean autoComplete) throws IOException // Check it's an actual token DataAccessTokenManager tokenManager = new DataAccessTokenManager(); try { - tokenManager.decode(getToken()); + tokenManager.decode(token); } catch (JwtException e) { throw new IllegalArgumentException("Malformed token for cellbase " + "url: '" + getURL() + "'" diff --git a/opencga-core/src/test/java/org/opencb/opencga/core/cellbase/CellBaseValidatorTest.java b/opencga-core/src/test/java/org/opencb/opencga/core/cellbase/CellBaseValidatorTest.java index 38d91dd0fc8..36026700237 100644 --- a/opencga-core/src/test/java/org/opencb/opencga/core/cellbase/CellBaseValidatorTest.java +++ b/opencga-core/src/test/java/org/opencb/opencga/core/cellbase/CellBaseValidatorTest.java @@ -85,10 +85,18 @@ public void testToken() throws IOException { public void testTokenNotSupported() throws IOException { String token = System.getenv("CELLBASE_HGMD_TOKEN"); Assume.assumeTrue(StringUtils.isNotEmpty(token)); + thrown.expectMessage("Token not supported"); CellBaseConfiguration validated = CellBaseValidator.validate(new CellBaseConfiguration(ParamConstants.CELLBASE_URL, "v5.1", null, token), "hsapiens", "grch38", true); Assert.assertNotNull(validated.getToken()); } + @Test + public void testTokenEmpty() throws IOException { + String token = ""; + CellBaseConfiguration validated = CellBaseValidator.validate(new CellBaseConfiguration(ParamConstants.CELLBASE_URL, "v5.1", null, token), "hsapiens", "grch38", true); + Assert.assertNull(validated.getToken()); + } + @Test public void testMalformedToken() throws IOException { thrown.expectMessage("Malformed token for cellbase"); From 465289a256dbad611e4138653d66ad76a343d4b6 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jacobo=20Coll=20Morag=C3=B3n?= Date: Tue, 19 Sep 2023 17:41:38 +0100 Subject: [PATCH 11/50] storage: Do not modify the input query at VariantStorageEngine::count #TASK-4938 --- .../opencga/storage/core/variant/VariantStorageEngine.java | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/opencga-storage/opencga-storage-core/src/main/java/org/opencb/opencga/storage/core/variant/VariantStorageEngine.java b/opencga-storage/opencga-storage-core/src/main/java/org/opencb/opencga/storage/core/variant/VariantStorageEngine.java index c3c27c26c35..cd6202ebf35 100644 --- a/opencga-storage/opencga-storage-core/src/main/java/org/opencb/opencga/storage/core/variant/VariantStorageEngine.java +++ b/opencga-storage/opencga-storage-core/src/main/java/org/opencb/opencga/storage/core/variant/VariantStorageEngine.java @@ -1315,9 +1315,10 @@ public DataResult groupBy(Query query, List fields, QueryOptions options } public DataResult count(Query query) throws StorageEngineException { - VariantQueryResult result = get(query, new QueryOptions(QueryOptions.INCLUDE, VariantField.ID) - .append(QueryOptions.LIMIT, 1) - .append(QueryOptions.COUNT, true)); + VariantQueryResult result = get(VariantQueryUtils.copy(query), + new QueryOptions(QueryOptions.INCLUDE, VariantField.ID) + .append(QueryOptions.LIMIT, 1) + .append(QueryOptions.COUNT, true)); return new DataResult<>( result.getTime(), result.getEvents(), From 759d74d26bf0e739bb3e14209a774d23a6261425 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jacobo=20Coll=20Morag=C3=B3n?= Date: Wed, 20 Sep 2023 09:56:56 +0100 Subject: [PATCH 12/50] server: Fix meta/status cache update. #TASK-4945 --- .../server/OpenCGAHealthCheckMonitor.java | 262 ++++++++++++++++++ .../opencga/server/rest/MetaWSServer.java | 134 +-------- .../opencga/server/rest/OpenCGAWSServer.java | 5 +- 3 files changed, 273 insertions(+), 128 deletions(-) create mode 100644 opencga-server/src/main/java/org/opencb/opencga/server/OpenCGAHealthCheckMonitor.java diff --git a/opencga-server/src/main/java/org/opencb/opencga/server/OpenCGAHealthCheckMonitor.java b/opencga-server/src/main/java/org/opencb/opencga/server/OpenCGAHealthCheckMonitor.java new file mode 100644 index 00000000000..8c778e84aa8 --- /dev/null +++ b/opencga-server/src/main/java/org/opencb/opencga/server/OpenCGAHealthCheckMonitor.java @@ -0,0 +1,262 @@ +package org.opencb.opencga.server; + +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonProperty; +import org.apache.commons.lang3.time.StopWatch; +import org.opencb.commons.datastore.core.Event; +import org.opencb.opencga.analysis.variant.manager.VariantStorageManager; +import org.opencb.opencga.catalog.managers.CatalogManager; +import org.opencb.opencga.core.config.Configuration; +import org.opencb.opencga.core.response.OpenCGAResult; +import org.opencb.opencga.storage.core.StorageEngineFactory; +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; + +import java.time.Duration; +import java.time.LocalDateTime; +import java.time.format.DateTimeFormatter; +import java.util.Collections; +import java.util.concurrent.TimeUnit; +import java.util.concurrent.atomic.AtomicReference; + +public class OpenCGAHealthCheckMonitor { + + protected final Logger logger = LoggerFactory.getLogger(this.getClass()); + + private final AtomicReference cachedResult = new AtomicReference<>(); + + private final Configuration configuration; + private final CatalogManager catalogManager; + private final StorageEngineFactory storageEngineFactory; + private final VariantStorageManager variantManager; + + public OpenCGAHealthCheckMonitor(Configuration configuration, CatalogManager catalogManager, + StorageEngineFactory storageEngineFactory, + VariantStorageManager variantManager) { + this.configuration = configuration; + this.catalogManager = catalogManager; + this.storageEngineFactory = storageEngineFactory; + this.variantManager = variantManager; + } + + public static class HealthCheckStatus { + + enum Status { + OK, + KO, + NA + } + + @JsonProperty("CatalogMongoDB") + private Status catalogMongoDbStatus = null; + @JsonProperty("Solr") + private Status solrStatus = null; + @JsonProperty("VariantStorage") + private Status variantStorageStatus = null; + + @JsonProperty("VariantStorageId") + private String variantStorageId = ""; + + @JsonIgnore + private String errorMessage = null; + @JsonIgnore + private LocalDateTime creationDate; + @JsonIgnore + private boolean healthy; + + public HealthCheckStatus() { + } + + public Status getCatalogMongoDbStatus() { + return catalogMongoDbStatus; + } + + public HealthCheckStatus setCatalogMongoDbStatus(Status catalogMongoDbStatus) { + this.catalogMongoDbStatus = catalogMongoDbStatus; + return this; + } + + public Status getSolrStatus() { + return solrStatus; + } + + public HealthCheckStatus setSolrStatus(Status solrStatus) { + this.solrStatus = solrStatus; + return this; + } + + public Status getVariantStorageStatus() { + return variantStorageStatus; + } + + public HealthCheckStatus setVariantStorageStatus(Status variantStorageStatus) { + this.variantStorageStatus = variantStorageStatus; + return this; + } + + public String getVariantStorageId() { + return variantStorageId; + } + + public HealthCheckStatus setVariantStorageId(String variantStorageId) { + this.variantStorageId = variantStorageId; + return this; + } + + public boolean isHealthy() { + return healthy; + } + + public HealthCheckStatus setHealthy(boolean healthy) { + this.healthy = healthy; + return this; + } + + public String getErrorMessage() { + return errorMessage; + } + + public HealthCheckStatus setErrorMessage(String errorMessage) { + this.errorMessage = errorMessage; + return this; + } + + public LocalDateTime getCreationDate() { + return creationDate; + } + + public HealthCheckStatus setCreationDate(LocalDateTime creationDate) { + this.creationDate = creationDate; + return this; + } + + @Override + public String toString() { + final StringBuilder sb = new StringBuilder("HealthCheckStatus{"); + sb.append("catalogMongoDbStatus='").append(catalogMongoDbStatus).append('\''); + sb.append(", solrStatus='").append(solrStatus).append('\''); + sb.append(", variantStorageStatus='").append(variantStorageStatus).append('\''); + sb.append(", variantStorageId='").append(variantStorageId).append('\''); + sb.append(", errorMessage='").append(errorMessage).append('\''); + sb.append(", creationDate=").append(creationDate); + sb.append(", healthy=").append(healthy); + sb.append('}'); + return sb.toString(); + } + } + + public OpenCGAResult getStatus() { + + OpenCGAResult queryResult = new OpenCGAResult<>(); + StopWatch stopWatch = StopWatch.createStarted(); + + if (shouldUpdateStatus()) { + logger.debug("Update HealthCheck cache status"); + updateHealthCheck(); + } else { + HealthCheckStatus status = cachedResult.get(); + String msg = "HealthCheck results from cache at " + status.getCreationDate().format(DateTimeFormatter.ofPattern("HH:mm:ss")); + queryResult.setEvents(Collections.singletonList(new Event(Event.Type.INFO, msg))); + logger.debug(msg); + } + + queryResult.setTime(((int) stopWatch.getTime(TimeUnit.MILLISECONDS))); + queryResult.setResults(Collections.singletonList(cachedResult.get())); + return queryResult; + } + + private boolean shouldUpdateStatus() { + HealthCheckStatus status = cachedResult.get(); + if (status == null || !status.isHealthy()) { + // Always update if not healthy or undefined + return true; + } + // If healthy, only update every "healthCheck.interval" seconds + long elapsedTime = Duration.between(status.getCreationDate(), LocalDateTime.now()).getSeconds(); + return elapsedTime > configuration.getHealthCheck().getInterval(); + } + + private synchronized void updateHealthCheck() { + if (!shouldUpdateStatus()) { + // Skip update! + return; + } + StringBuilder errorMsg = new StringBuilder(); + boolean healthy = true; + + HealthCheckStatus status = new HealthCheckStatus(); + + StopWatch totalTime = StopWatch.createStarted(); + StopWatch catalogMongoDBTime = StopWatch.createStarted(); + try { + if (catalogManager.getCatalogDatabaseStatus()) { + status.setCatalogMongoDbStatus(HealthCheckStatus.Status.OK); + } else { + status.setCatalogMongoDbStatus(HealthCheckStatus.Status.KO); + healthy = false; + } + } catch (Exception e) { + status.setCatalogMongoDbStatus(HealthCheckStatus.Status.KO); + healthy = false; + errorMsg.append(e.getMessage()); + logger.error("Error reading catalog status", e); + } + catalogMongoDBTime.stop(); + + StopWatch storageTime = StopWatch.createStarted(); + try { + storageEngineFactory.getVariantStorageEngine(null, configuration.getDatabasePrefix() + "_test_connection", "test_connection") + .testConnection(); + status.setVariantStorageId(storageEngineFactory.getVariantStorageEngine().getStorageEngineId()); + status.setVariantStorageStatus(HealthCheckStatus.Status.OK); + } catch (Exception e) { + status.setVariantStorageStatus(HealthCheckStatus.Status.KO); + healthy = false; + errorMsg.append(e.getMessage()); + logger.error("Error reading variant storage status", e); + } + storageTime.stop(); + + StopWatch solrEngineTime = StopWatch.createStarted(); + if (storageEngineFactory.getStorageConfiguration().getSearch().isActive()) { + try { + if (variantManager.isSolrAvailable()) { + status.setSolrStatus(HealthCheckStatus.Status.OK); + } else { + errorMsg.append(", unable to connect with solr, "); + status.setSolrStatus(HealthCheckStatus.Status.KO); + healthy = false; + } + } catch (Exception e) { + status.setSolrStatus(HealthCheckStatus.Status.KO); + healthy = false; + errorMsg.append(e.getMessage()); + logger.error("Error reading solr status", e); + } + } else { + status.setSolrStatus(HealthCheckStatus.Status.NA); + } + solrEngineTime.stop(); + totalTime.stop(); + + if (totalTime.getTime(TimeUnit.SECONDS) > 5) { + logger.warn("Slow OpenCGA status: Updated time: {}. Catalog: {} , Storage: {} , Solr: {}", + totalTime.getTime(TimeUnit.MILLISECONDS) / 1000.0, + catalogMongoDBTime.getTime(TimeUnit.MILLISECONDS) / 1000.0, + storageTime.getTime(TimeUnit.MILLISECONDS) / 1000.0, + solrEngineTime.getTime(TimeUnit.MILLISECONDS) / 1000.0 + ); + } + + if (errorMsg.length() == 0) { + status.setErrorMessage(null); + } else { + status.setErrorMessage(errorMsg.toString()); + } + + status.setCreationDate(LocalDateTime.now()); + status.setHealthy(healthy); + cachedResult.set(status); + } + +} diff --git a/opencga-server/src/main/java/org/opencb/opencga/server/rest/MetaWSServer.java b/opencga-server/src/main/java/org/opencb/opencga/server/rest/MetaWSServer.java index e075e938983..09c5d90345d 100644 --- a/opencga-server/src/main/java/org/opencb/opencga/server/rest/MetaWSServer.java +++ b/opencga-server/src/main/java/org/opencb/opencga/server/rest/MetaWSServer.java @@ -17,8 +17,6 @@ package org.opencb.opencga.server.rest; import org.apache.commons.lang3.StringUtils; -import org.apache.commons.lang3.time.StopWatch; -import org.opencb.commons.datastore.core.Event; import org.opencb.commons.utils.DataModelsUtils; import org.opencb.opencga.core.common.GitRepositoryState; import org.opencb.opencga.core.exceptions.VersionException; @@ -26,6 +24,7 @@ import org.opencb.opencga.core.tools.annotations.Api; import org.opencb.opencga.core.tools.annotations.ApiOperation; import org.opencb.opencga.core.tools.annotations.ApiParam; +import org.opencb.opencga.server.OpenCGAHealthCheckMonitor; import org.opencb.opencga.server.generator.RestApiParser; import org.opencb.opencga.server.generator.models.RestApi; import org.opencb.opencga.server.rest.admin.AdminWSServer; @@ -44,13 +43,7 @@ import javax.ws.rs.core.Response; import javax.ws.rs.core.UriInfo; import java.io.IOException; -import java.time.Duration; -import java.time.LocalTime; -import java.time.format.DateTimeFormatter; import java.util.*; -import java.util.concurrent.ConcurrentHashMap; -import java.util.concurrent.TimeUnit; -import java.util.concurrent.atomic.AtomicReference; /** * Created by pfurio on 05/05/17. @@ -60,15 +53,6 @@ @Api(value = "Meta", description = "Meta RESTful Web Services API") public class MetaWSServer extends OpenCGAWSServer { - private static final AtomicReference healthCheckErrorMessage = new AtomicReference<>(); - private static final AtomicReference lastAccess = new AtomicReference<>(LocalTime.now()); - private static final Map healthCheckResults = new ConcurrentHashMap<>(); - private final String OKAY = "OK"; - private final String NOT_OKAY = "KO"; - private final String SOLR = "Solr"; - private final String VARIANT_STORAGE = "VariantStorage"; - private final String CATALOG_MONGO_DB = "CatalogMongoDB"; - public MetaWSServer(@Context UriInfo uriInfo, @Context HttpServletRequest httpServletRequest, @Context HttpHeaders httpHeaders) throws IOException, VersionException { super(uriInfo, httpServletRequest, httpHeaders); @@ -111,116 +95,16 @@ public Response fail() { @Path("/status") @ApiOperation(httpMethod = "GET", value = "Database status.", response = Map.class) public Response status() { + OpenCGAResult queryResult = healthCheckMonitor.getStatus(); + OpenCGAHealthCheckMonitor.HealthCheckStatus status = queryResult.first(); - OpenCGAResult> queryResult = new OpenCGAResult<>(); - StopWatch stopWatch = StopWatch.createStarted(); - - if (shouldUpdateStatus()) { - logger.debug("Update HealthCheck cache status"); - updateHealthCheck(); - } else { - logger.debug("HealthCheck results from cache at " + lastAccess.get().format(DateTimeFormatter.ofPattern("HH:mm:ss"))); - queryResult.setEvents(Collections.singletonList(new Event(Event.Type.INFO, "HealthCheck results from cache at " - + lastAccess.get().format(DateTimeFormatter.ofPattern("HH:mm:ss"))))); - } - - queryResult.setTime(((int) stopWatch.getTime(TimeUnit.MILLISECONDS))); - queryResult.setResults(Collections.singletonList(healthCheckResults)); - - if (isHealthy()) { - logger.debug("HealthCheck : " + healthCheckResults.toString()); + if (status.isHealthy()) { + logger.debug("HealthCheck : " + status); return createOkResponse(queryResult); } else { - logger.error("HealthCheck : " + healthCheckResults.toString()); - return createErrorResponse(healthCheckErrorMessage.get(), queryResult); - } - } - - private boolean shouldUpdateStatus() { - if (!isHealthy()) { - // Always update if not healthy - return true; - } - // If healthy, only update every "healthCheck.interval" seconds - long elapsedTime = Duration.between(lastAccess.get(), LocalTime.now()).getSeconds(); - return elapsedTime > configuration.getHealthCheck().getInterval(); - } - - private synchronized void updateHealthCheck() { - if (!shouldUpdateStatus()) { - // Skip update! - return; - } - StringBuilder errorMsg = new StringBuilder(); - - Map newHealthCheckResults = new HashMap<>(); - newHealthCheckResults.put(CATALOG_MONGO_DB, ""); - newHealthCheckResults.put(VARIANT_STORAGE, ""); - newHealthCheckResults.put(SOLR, ""); - - StopWatch totalTime = StopWatch.createStarted(); - StopWatch catalogMongoDBTime = StopWatch.createStarted(); - try { - if (catalogManager.getCatalogDatabaseStatus()) { - newHealthCheckResults.put(CATALOG_MONGO_DB, OKAY); - } else { - newHealthCheckResults.put(CATALOG_MONGO_DB, NOT_OKAY); - } - } catch (Exception e) { - newHealthCheckResults.put(CATALOG_MONGO_DB, NOT_OKAY); - errorMsg.append(e.getMessage()); - } - catalogMongoDBTime.stop(); - - StopWatch storageTime = StopWatch.createStarted(); - try { - storageEngineFactory.getVariantStorageEngine(null, configuration.getDatabasePrefix() + "_test_connection", "test_connection") - .testConnection(); - newHealthCheckResults.put("VariantStorageId", storageEngineFactory.getVariantStorageEngine().getStorageEngineId()); - newHealthCheckResults.put(VARIANT_STORAGE, OKAY); - } catch (Exception e) { - newHealthCheckResults.put(VARIANT_STORAGE, NOT_OKAY); - errorMsg.append(e.getMessage()); -// errorMsg.append(" No storageEngineId is set in configuration or Unable to initiate storage Engine, ").append(e.getMessage() -// ).append(", "); - } - storageTime.stop(); - - StopWatch solrEngineTime = StopWatch.createStarted(); - if (storageEngineFactory.getStorageConfiguration().getSearch().isActive()) { - try { - if (variantManager.isSolrAvailable()) { - newHealthCheckResults.put(SOLR, OKAY); - } else { - errorMsg.append(", unable to connect with solr, "); - newHealthCheckResults.put(SOLR, NOT_OKAY); - } - } catch (Exception e) { - newHealthCheckResults.put(SOLR, NOT_OKAY); - errorMsg.append(e.getMessage()); - } - } else { - newHealthCheckResults.put(SOLR, "solr not active in storage-configuration!"); + logger.error("HealthCheck : " + status); + return createErrorResponse(status.getErrorMessage(), queryResult); } - solrEngineTime.stop(); - - if (totalTime.getTime(TimeUnit.SECONDS) > 5) { - logger.warn("Slow OpenCGA status: Updated time: {}. Catalog: {} , Storage: {} , Solr: {}", - totalTime.getTime(TimeUnit.MILLISECONDS) / 1000.0, - catalogMongoDBTime.getTime(TimeUnit.MILLISECONDS) / 1000.0, - storageTime.getTime(TimeUnit.MILLISECONDS) / 1000.0, - solrEngineTime.getTime(TimeUnit.MILLISECONDS) / 1000.0 - ); - } - - if (errorMsg.length() == 0) { - healthCheckErrorMessage.set(null); - } else { - healthCheckErrorMessage.set(errorMsg.toString()); - } - - healthCheckResults.putAll(newHealthCheckResults); - lastAccess.set(LocalTime.now()); } @GET @@ -270,8 +154,4 @@ public Response api(@ApiParam(value = "List of categories to get API from") @Que RestApi restApi = new RestApiParser().parse(classes, summary); return createOkResponse(new OpenCGAResult<>(0, Collections.emptyList(), 1, Collections.singletonList(restApi.getCategories()), 1)); } - - private boolean isHealthy() { - return healthCheckResults.isEmpty() ? false : !healthCheckResults.values().stream().anyMatch(x -> x.equals(NOT_OKAY)); - } } diff --git a/opencga-server/src/main/java/org/opencb/opencga/server/rest/OpenCGAWSServer.java b/opencga-server/src/main/java/org/opencb/opencga/server/rest/OpenCGAWSServer.java index d152cf17277..259f38cc652 100644 --- a/opencga-server/src/main/java/org/opencb/opencga/server/rest/OpenCGAWSServer.java +++ b/opencga-server/src/main/java/org/opencb/opencga/server/rest/OpenCGAWSServer.java @@ -53,6 +53,7 @@ import org.opencb.opencga.core.response.RestResponse; import org.opencb.opencga.core.tools.ToolParams; import org.opencb.opencga.core.tools.annotations.ApiParam; +import org.opencb.opencga.server.OpenCGAHealthCheckMonitor; import org.opencb.opencga.server.WebServiceException; import org.opencb.opencga.server.rest.analysis.ClinicalWebService; import org.opencb.opencga.storage.core.StorageEngineFactory; @@ -137,6 +138,8 @@ public static Configuration getConfiguration() { protected static StorageEngineFactory storageEngineFactory; protected static VariantStorageManager variantManager; + protected static OpenCGAHealthCheckMonitor healthCheckMonitor; + private static final int DEFAULT_LIMIT = AbstractManager.DEFAULT_LIMIT; private static final int MAX_LIMIT = AbstractManager.MAX_LIMIT; private static final int MAX_ID_SIZE = 100; @@ -294,6 +297,7 @@ private static void initOpenCGAObjects() { catalogManager = new CatalogManager(configuration); storageEngineFactory = StorageEngineFactory.get(storageConfiguration); variantManager = new VariantStorageManager(catalogManager, storageEngineFactory); + healthCheckMonitor = new OpenCGAHealthCheckMonitor(configuration, catalogManager, storageEngineFactory, variantManager); MigrationSummary migrationSummary = catalogManager.getMigrationManager().getMigrationSummary(); if (migrationSummary.getMigrationsToBeApplied() > 0) { @@ -304,7 +308,6 @@ private static void initOpenCGAObjects() { } } } - } catch (Exception e) { errorMessage = e.getMessage(); // e.printStackTrace(); From fedb9394fef07c25fe6a084a3587b62ff6c1240c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jacobo=20Coll=20Morag=C3=B3n?= Date: Wed, 20 Sep 2023 14:00:01 +0100 Subject: [PATCH 13/50] server: Populate status with async check. #TASK-4945 --- .../server/OpenCGAHealthCheckMonitor.java | 25 +++++++++++++++++-- .../opencga/server/rest/OpenCGAWSServer.java | 1 + 2 files changed, 24 insertions(+), 2 deletions(-) diff --git a/opencga-server/src/main/java/org/opencb/opencga/server/OpenCGAHealthCheckMonitor.java b/opencga-server/src/main/java/org/opencb/opencga/server/OpenCGAHealthCheckMonitor.java index 8c778e84aa8..fa8c0a1b95f 100644 --- a/opencga-server/src/main/java/org/opencb/opencga/server/OpenCGAHealthCheckMonitor.java +++ b/opencga-server/src/main/java/org/opencb/opencga/server/OpenCGAHealthCheckMonitor.java @@ -16,6 +16,8 @@ import java.time.LocalDateTime; import java.time.format.DateTimeFormatter; import java.util.Collections; +import java.util.concurrent.ExecutorService; +import java.util.concurrent.Executors; import java.util.concurrent.TimeUnit; import java.util.concurrent.atomic.AtomicReference; @@ -29,6 +31,7 @@ public class OpenCGAHealthCheckMonitor { private final CatalogManager catalogManager; private final StorageEngineFactory storageEngineFactory; private final VariantStorageManager variantManager; + private final ExecutorService executorService; public OpenCGAHealthCheckMonitor(Configuration configuration, CatalogManager catalogManager, StorageEngineFactory storageEngineFactory, @@ -37,6 +40,7 @@ public OpenCGAHealthCheckMonitor(Configuration configuration, CatalogManager cat this.catalogManager = catalogManager; this.storageEngineFactory = storageEngineFactory; this.variantManager = variantManager; + executorService = Executors.newCachedThreadPool(); } public static class HealthCheckStatus { @@ -145,6 +149,15 @@ public String toString() { } } + public void asyncUpdate() { + if (shouldUpdateStatus()) { + executorService.submit(() -> { + logger.debug("Update HealthCheck cache status"); + updateHealthCheck(); + }); + } + } + public OpenCGAResult getStatus() { OpenCGAResult queryResult = new OpenCGAResult<>(); @@ -176,8 +189,17 @@ private boolean shouldUpdateStatus() { return elapsedTime > configuration.getHealthCheck().getInterval(); } - private synchronized void updateHealthCheck() { + private void updateHealthCheck() { + updateHealthCheck(StopWatch.createStarted()); + } + + private synchronized void updateHealthCheck(StopWatch totalTime) { if (!shouldUpdateStatus()) { + if (totalTime.getTime(TimeUnit.SECONDS) > 5) { + logger.warn("Slow OpenCGA status. Synchronized time wait: {} . Skip update.", + totalTime.getTime(TimeUnit.MILLISECONDS) / 1000.0 + ); + } // Skip update! return; } @@ -186,7 +208,6 @@ private synchronized void updateHealthCheck() { HealthCheckStatus status = new HealthCheckStatus(); - StopWatch totalTime = StopWatch.createStarted(); StopWatch catalogMongoDBTime = StopWatch.createStarted(); try { if (catalogManager.getCatalogDatabaseStatus()) { diff --git a/opencga-server/src/main/java/org/opencb/opencga/server/rest/OpenCGAWSServer.java b/opencga-server/src/main/java/org/opencb/opencga/server/rest/OpenCGAWSServer.java index 259f38cc652..f7ef8a80bc7 100644 --- a/opencga-server/src/main/java/org/opencb/opencga/server/rest/OpenCGAWSServer.java +++ b/opencga-server/src/main/java/org/opencb/opencga/server/rest/OpenCGAWSServer.java @@ -298,6 +298,7 @@ private static void initOpenCGAObjects() { storageEngineFactory = StorageEngineFactory.get(storageConfiguration); variantManager = new VariantStorageManager(catalogManager, storageEngineFactory); healthCheckMonitor = new OpenCGAHealthCheckMonitor(configuration, catalogManager, storageEngineFactory, variantManager); + healthCheckMonitor.asyncUpdate(); MigrationSummary migrationSummary = catalogManager.getMigrationManager().getMigrationSummary(); if (migrationSummary.getMigrationsToBeApplied() > 0) { From 60b74ab3644af602be07f5b52b4a1d37393d352e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jacobo=20Coll=20Morag=C3=B3n?= Date: Wed, 20 Sep 2023 16:36:37 +0100 Subject: [PATCH 14/50] storage: Fix NPE executing SampleIndexDuplicatedVariantsTest tests. #TASK-5027 --- .../SampleIndexOnlyVariantQueryExecutor.java | 20 ++++++++++++------- 1 file changed, 13 insertions(+), 7 deletions(-) diff --git a/opencga-storage/opencga-storage-hadoop/opencga-storage-hadoop-core/src/main/java/org/opencb/opencga/storage/hadoop/variant/index/SampleIndexOnlyVariantQueryExecutor.java b/opencga-storage/opencga-storage-hadoop/opencga-storage-hadoop-core/src/main/java/org/opencb/opencga/storage/hadoop/variant/index/SampleIndexOnlyVariantQueryExecutor.java index 5829a9580a8..510085420dd 100644 --- a/opencga-storage/opencga-storage-hadoop/opencga-storage-hadoop-core/src/main/java/org/opencb/opencga/storage/hadoop/variant/index/SampleIndexOnlyVariantQueryExecutor.java +++ b/opencga-storage/opencga-storage-hadoop/opencga-storage-hadoop-core/src/main/java/org/opencb/opencga/storage/hadoop/variant/index/SampleIndexOnlyVariantQueryExecutor.java @@ -248,11 +248,7 @@ private boolean isIncludeCovered(SampleIndexQuery sampleIndexQuery, Query inputQ return false; } - List sampleDataKeys = VariantQueryUtils.getIncludeSampleData(inputQuery); - if (sampleDataKeys == null) { - // Undefined, get default sampleDataKeys - sampleDataKeys = HBaseToVariantConverter.getFixedFormat(study.getStudyMetadata()); - } + List sampleDataKeys = getSampleDataKeys(inputQuery, study); if (sampleDataKeys.size() != 1) { // One and only one sampledatakey @@ -490,8 +486,9 @@ private class AddMissingDataTask implements Task { for (Integer fileId : fileIds) { filesFromSample.add(metadataManager.getFileName(studyId, fileId)); } - List includeSampleData = VariantQueryUtils.getIncludeSampleData(parsedQuery.getInputQuery()); - gtIdx = includeSampleData.indexOf("GT"); + + List sampleDataKeys = getSampleDataKeys(parsedQuery.getInputQuery(), parsedQuery.getProjection().getStudy(studyId)); + gtIdx = sampleDataKeys.indexOf("GT"); } @Override @@ -657,4 +654,13 @@ private void mergeFileEntries(StudyEntry studyEntry, List newFileEntr } } } + + private List getSampleDataKeys(Query parsedQuery, VariantQueryProjection.StudyVariantQueryProjection parsedQuery1) { + List sampleDataKeys = VariantQueryUtils.getIncludeSampleData(parsedQuery); + if (sampleDataKeys == null) { + // Undefined, get default sampleDataKeys + sampleDataKeys = HBaseToVariantConverter.getFixedFormat(parsedQuery1.getStudyMetadata()); + } + return sampleDataKeys; + } } From c2bc6c7a9e2dbaa8594e1465bd3e1759511be080 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jacobo=20Coll=20Morag=C3=B3n?= Date: Mon, 25 Sep 2023 17:54:21 +0100 Subject: [PATCH 15/50] storage: Fix NPE at variant-secondary-sample-index with partial families. #TASK-4872 --- .../variant/knockout/KnockoutAnalysis.java | 10 ++-- .../manager/VariantCatalogQueryUtils.java | 15 ++--- .../manager/VariantStorageManager.java | 26 ++++---- .../VariantFamilyIndexOperationTool.java | 3 +- ...iantSecondarySampleIndexOperationTool.java | 3 +- .../manager/VariantCatalogQueryUtilsTest.java | 5 +- .../manager/VariantOperationsTest.java | 60 +++++++++++++++++-- .../storage/core/metadata/models/Trio.java | 59 ++++++++++++++++-- .../core/variant/VariantStorageEngine.java | 27 +++++---- .../dummy/DummyVariantStorageEngine.java | 5 +- .../variant/HadoopVariantStorageEngine.java | 7 +-- .../index/family/FamilyIndexDriver.java | 33 +++++----- .../index/family/FamilyIndexLoader.java | 57 +++++++++--------- .../variant/index/family/FamilyIndexTest.java | 8 ++- .../variant/index/sample/SampleIndexTest.java | 21 +++---- 15 files changed, 224 insertions(+), 115 deletions(-) diff --git a/opencga-analysis/src/main/java/org/opencb/opencga/analysis/variant/knockout/KnockoutAnalysis.java b/opencga-analysis/src/main/java/org/opencb/opencga/analysis/variant/knockout/KnockoutAnalysis.java index 34b337731a5..069d7ae46a7 100644 --- a/opencga-analysis/src/main/java/org/opencb/opencga/analysis/variant/knockout/KnockoutAnalysis.java +++ b/opencga-analysis/src/main/java/org/opencb/opencga/analysis/variant/knockout/KnockoutAnalysis.java @@ -202,12 +202,12 @@ protected void run() throws Exception { if (family == null || StringUtils.isEmpty(family.getId())) { continue; } - List> trios = variantStorageManager.getTriosFromFamily(getStudy(), family, true, getToken()); - for (List trio : trios) { - String child = trio.get(2); + List trios = variantStorageManager.getTriosFromFamily(getStudy(), family, true, getToken()); + for (Trio trio : trios) { + String child = trio.getChild(); if (analysisParams.getSample().contains(child)) { - String father = trio.get(0); - String mother = trio.get(1); + String father = trio.getFather(); + String mother = trio.getMother(); triosMap.put(child, new Trio(family.getId(), "-".equals(father) ? null : father, "-".equals(mother) ? null : mother, diff --git a/opencga-analysis/src/main/java/org/opencb/opencga/analysis/variant/manager/VariantCatalogQueryUtils.java b/opencga-analysis/src/main/java/org/opencb/opencga/analysis/variant/manager/VariantCatalogQueryUtils.java index 2d08fb77566..7a588c900f5 100644 --- a/opencga-analysis/src/main/java/org/opencb/opencga/analysis/variant/manager/VariantCatalogQueryUtils.java +++ b/opencga-analysis/src/main/java/org/opencb/opencga/analysis/variant/manager/VariantCatalogQueryUtils.java @@ -1299,10 +1299,10 @@ public Integer getReleaseFilter(Query query, String sessionId) throws CatalogExc return release; } - public List> getTriosFromFamily( + public List getTriosFromFamily( String studyFqn, Family family, VariantStorageMetadataManager metadataManager, boolean skipIncompleteFamily, String sessionId) throws StorageEngineException, CatalogException { - List> trios = getTrios(studyFqn, metadataManager, family.getMembers(), sessionId); + List trios = getTrios(studyFqn, metadataManager, family.getMembers(), sessionId); if (trios.size() == 0) { if (skipIncompleteFamily) { logger.debug("Skip family '" + family.getId() + "'. "); @@ -1313,7 +1313,7 @@ public List> getTriosFromFamily( return trios; } - public List> getTriosFromSamples( + public List getTriosFromSamples( String studyFqn, VariantStorageMetadataManager metadataManager, Collection sampleIds, String token) throws CatalogException { OpenCGAResult individualResult = catalogManager.getIndividualManager() @@ -1330,12 +1330,12 @@ public List> getTriosFromSamples( return getTrios(studyFqn, metadataManager, individualResult.getResults(), token); } - public List> getTrios( + public List getTrios( String studyFqn, VariantStorageMetadataManager metadataManager, List membersList, String sessionId) throws CatalogException { int studyId = metadataManager.getStudyId(studyFqn); Map membersMap = membersList.stream().collect(Collectors.toMap(Individual::getUid, i -> i)); - List> trios = new LinkedList<>(); + List trios = new LinkedList<>(); for (Individual individual : membersList) { String fatherSample = null; String motherSample = null; @@ -1402,10 +1402,7 @@ public List> getTrios( // Allow one missing parent if (childSample != null && (fatherSample != null || motherSample != null)) { - trios.add(Arrays.asList( - fatherSample == null ? "-" : fatherSample, - motherSample == null ? "-" : motherSample, - childSample)); + trios.add(new Trio(fatherSample, motherSample, childSample)); } } return trios; diff --git a/opencga-analysis/src/main/java/org/opencb/opencga/analysis/variant/manager/VariantStorageManager.java b/opencga-analysis/src/main/java/org/opencb/opencga/analysis/variant/manager/VariantStorageManager.java index 48b5cf87114..076c950cdd7 100644 --- a/opencga-analysis/src/main/java/org/opencb/opencga/analysis/variant/manager/VariantStorageManager.java +++ b/opencga-analysis/src/main/java/org/opencb/opencga/analysis/variant/manager/VariantStorageManager.java @@ -76,10 +76,7 @@ import org.opencb.opencga.storage.core.exceptions.StorageEngineException; import org.opencb.opencga.storage.core.metadata.VariantMetadataFactory; import org.opencb.opencga.storage.core.metadata.VariantStorageMetadataManager; -import org.opencb.opencga.storage.core.metadata.models.ProjectMetadata; -import org.opencb.opencga.storage.core.metadata.models.SampleMetadata; -import org.opencb.opencga.storage.core.metadata.models.StudyMetadata; -import org.opencb.opencga.storage.core.metadata.models.VariantScoreMetadata; +import org.opencb.opencga.storage.core.metadata.models.*; import org.opencb.opencga.storage.core.utils.CellBaseUtils; import org.opencb.opencga.storage.core.variant.BeaconResponse; import org.opencb.opencga.storage.core.variant.VariantStorageEngine; @@ -397,7 +394,7 @@ public void sampleIndexAnnotate(String study, List samples, ObjectMap pa }); } - public DataResult> familyIndexUpdate(String study, + public DataResult familyIndexUpdate(String study, ObjectMap params, String token) throws CatalogException, StorageEngineException { return secureOperation(VariantFamilyIndexOperationTool.ID, study, params, token, engine -> { @@ -405,11 +402,11 @@ public DataResult> familyIndexUpdate(String study, }); } - public DataResult> familyIndex(String study, List familiesStr, boolean skipIncompleteFamilies, + public DataResult familyIndex(String study, List familiesStr, boolean skipIncompleteFamilies, ObjectMap params, String token) throws CatalogException, StorageEngineException { return secureOperation(VariantFamilyIndexOperationTool.ID, study, params, token, engine -> { - List> trios = new LinkedList<>(); + List trios = new LinkedList<>(); List events = new LinkedList<>(); VariantStorageMetadataManager metadataManager = engine.getMetadataManager(); VariantCatalogQueryUtils catalogUtils = new VariantCatalogQueryUtils(catalogManager); @@ -425,9 +422,9 @@ public DataResult> familyIndex(String study, List familiesS trios.addAll(catalogUtils.getTriosFromFamily(study, family, metadataManager, skipIncompleteFamilies, token)); } } - DataResult> dataResult = engine.familyIndex(study, trios, params); + DataResult dataResult = engine.familyIndex(study, trios, params); getSynchronizer(engine).synchronizeCatalogSamplesFromStorage(study, trios.stream() - .flatMap(Collection::stream) + .flatMap(t->t.toList().stream()) .collect(Collectors.toList()), token); return dataResult; }); @@ -439,7 +436,7 @@ private CatalogStorageMetadataSynchronizer getSynchronizer(VariantStorageEngine return synchronizer; } - public DataResult> familyIndexBySamples(String study, Collection samples, ObjectMap params, String token) + public DataResult familyIndexBySamples(String study, Collection samples, ObjectMap params, String token) throws CatalogException, StorageEngineException { return secureOperation(VariantFamilyIndexOperationTool.ID, study, params, token, engine -> { Collection thisSamples = samples; @@ -447,17 +444,16 @@ public DataResult> familyIndexBySamples(String study, Collection> trios = catalogUtils.getTriosFromSamples(study, engine.getMetadataManager(), thisSamples, token); - - DataResult> dataResult = engine.familyIndex(study, trios, params); + List trios = catalogUtils.getTriosFromSamples(study, engine.getMetadataManager(), thisSamples, token); + DataResult dataResult = engine.familyIndex(study, trios, params); getSynchronizer(engine).synchronizeCatalogSamplesFromStorage(study, trios.stream() - .flatMap(Collection::stream) + .flatMap(t -> t.toList().stream()) .collect(Collectors.toList()), token); return dataResult; }); } - public List> getTriosFromFamily(String study, Family family, boolean skipIncompleteFamilies, String token) + public List getTriosFromFamily(String study, Family family, boolean skipIncompleteFamilies, String token) throws CatalogException, StorageEngineException { VariantStorageEngine variantStorageEngine = getVariantStorageEngine(study, token); return catalogUtils.getTriosFromFamily(study, family, variantStorageEngine.getMetadataManager(), skipIncompleteFamilies, token); diff --git a/opencga-analysis/src/main/java/org/opencb/opencga/analysis/variant/operations/VariantFamilyIndexOperationTool.java b/opencga-analysis/src/main/java/org/opencb/opencga/analysis/variant/operations/VariantFamilyIndexOperationTool.java index ed774beca11..c7258c79f74 100644 --- a/opencga-analysis/src/main/java/org/opencb/opencga/analysis/variant/operations/VariantFamilyIndexOperationTool.java +++ b/opencga-analysis/src/main/java/org/opencb/opencga/analysis/variant/operations/VariantFamilyIndexOperationTool.java @@ -24,6 +24,7 @@ import org.opencb.opencga.core.models.operations.variant.VariantFamilyIndexParams; import org.opencb.opencga.core.tools.annotations.Tool; import org.opencb.opencga.core.tools.annotations.ToolParams; +import org.opencb.opencga.storage.core.metadata.models.Trio; import java.util.Collections; import java.util.List; @@ -67,7 +68,7 @@ protected void check() throws Exception { @Override protected void run() throws Exception { step(() -> { - DataResult> trios; + DataResult trios; if (variantFamilyIndexParams.isUpdateIndex()) { trios = variantStorageManager.familyIndexUpdate(study, params, token); } else { diff --git a/opencga-analysis/src/main/java/org/opencb/opencga/analysis/variant/operations/VariantSecondarySampleIndexOperationTool.java b/opencga-analysis/src/main/java/org/opencb/opencga/analysis/variant/operations/VariantSecondarySampleIndexOperationTool.java index 1954d7eb790..d4dd7ab8a89 100644 --- a/opencga-analysis/src/main/java/org/opencb/opencga/analysis/variant/operations/VariantSecondarySampleIndexOperationTool.java +++ b/opencga-analysis/src/main/java/org/opencb/opencga/analysis/variant/operations/VariantSecondarySampleIndexOperationTool.java @@ -24,6 +24,7 @@ import org.opencb.opencga.core.models.operations.variant.VariantSecondarySampleIndexParams; import org.opencb.opencga.core.tools.annotations.Tool; import org.opencb.opencga.core.tools.annotations.ToolParams; +import org.opencb.opencga.storage.core.metadata.models.Trio; import java.util.ArrayList; import java.util.List; @@ -80,7 +81,7 @@ protected void run() throws Exception { } if (sampleIndexParams.isFamilyIndex()) { step("familyIndex", () -> { - DataResult> result = variantStorageManager.familyIndexBySamples(study, sampleIndexParams.getSample(), params, + DataResult result = variantStorageManager.familyIndexBySamples(study, sampleIndexParams.getSample(), params, getToken()); if (result.getEvents() != null) { for (Event event : result.getEvents()) { diff --git a/opencga-analysis/src/test/java/org/opencb/opencga/analysis/variant/manager/VariantCatalogQueryUtilsTest.java b/opencga-analysis/src/test/java/org/opencb/opencga/analysis/variant/manager/VariantCatalogQueryUtilsTest.java index 58aa48f7828..b38101ef933 100644 --- a/opencga-analysis/src/test/java/org/opencb/opencga/analysis/variant/manager/VariantCatalogQueryUtilsTest.java +++ b/opencga-analysis/src/test/java/org/opencb/opencga/analysis/variant/manager/VariantCatalogQueryUtilsTest.java @@ -60,6 +60,7 @@ import org.opencb.opencga.storage.core.metadata.VariantStorageMetadataManager; import org.opencb.opencga.storage.core.metadata.models.StudyMetadata; import org.opencb.opencga.storage.core.metadata.models.TaskMetadata; +import org.opencb.opencga.storage.core.metadata.models.Trio; import org.opencb.opencga.storage.core.utils.CellBaseUtils; import org.opencb.opencga.storage.core.variant.adaptors.VariantField; import org.opencb.opencga.storage.core.variant.adaptors.VariantQuery; @@ -868,9 +869,9 @@ public void getTriosFromFamily() throws Exception { sampleMetadata -> sampleMetadata.setIndexStatus(TaskMetadata.Status.READY)); } - List> trios = queryUtils.getTriosFromFamily("s1", f1, metadataManager, true, sessionId); + List trios = queryUtils.getTriosFromFamily("s1", f1, metadataManager, true, sessionId); // System.out.println("trios = " + trios); - assertEquals(Arrays.asList(Arrays.asList("sample1", "sample2", "sample3"), Arrays.asList("sample1", "sample2", "sample4")), trios); + assertEquals(Arrays.asList(new Trio("sample1", "sample2", "sample3"), new Trio("sample1", "sample2", "sample4")), trios); } diff --git a/opencga-analysis/src/test/java/org/opencb/opencga/analysis/variant/manager/VariantOperationsTest.java b/opencga-analysis/src/test/java/org/opencb/opencga/analysis/variant/manager/VariantOperationsTest.java index 38ef6f98a21..9562f9cf188 100644 --- a/opencga-analysis/src/test/java/org/opencb/opencga/analysis/variant/manager/VariantOperationsTest.java +++ b/opencga-analysis/src/test/java/org/opencb/opencga/analysis/variant/manager/VariantOperationsTest.java @@ -43,9 +43,7 @@ import org.opencb.opencga.core.models.common.IndexStatus; import org.opencb.opencga.core.models.family.Family; import org.opencb.opencga.core.models.file.File; -import org.opencb.opencga.core.models.individual.Individual; -import org.opencb.opencga.core.models.individual.IndividualInternal; -import org.opencb.opencga.core.models.individual.Location; +import org.opencb.opencga.core.models.individual.*; import org.opencb.opencga.core.models.job.Job; import org.opencb.opencga.core.models.operations.variant.VariantAnnotationIndexParams; import org.opencb.opencga.core.models.operations.variant.VariantSecondaryAnnotationIndexParams; @@ -148,6 +146,16 @@ public void setUp() throws Throwable { @After public void tearDown() { if (hadoopExternalResource != null) { + + try { + VariantStorageEngine engine = opencga.getStorageEngineFactory().getVariantStorageEngine(storageEngine, DB_NAME); + if (storageEngine.equals(HadoopVariantStorageEngine.STORAGE_ENGINE_ID)) { + VariantHbaseTestUtils.printVariants(((VariantHadoopDBAdaptor) engine.getDBAdaptor()), Paths.get(opencga.createTmpOutdir("_hbase_print_variants_AFTER")).toUri()); + } + } catch (Exception ignore) { + ignore.printStackTrace(); + } + hadoopExternalResource.after(); hadoopExternalResource = null; } @@ -246,7 +254,7 @@ private void loadDataset() throws Throwable { Collections.emptyList(), false, 0, Collections.emptyList(), Collections.emptyList(), Collections.emptyList(), IndividualInternal.init(), Collections.emptyMap()).setFather(individuals.get(0)).setMother(individuals.get(1)), Collections.singletonList(daughter), new QueryOptions(ParamConstants.INCLUDE_RESULT_PARAM, true), token).first()); catalogManager.getFamilyManager().create( STUDY, - new Family("f1", "f1", Collections.singletonList(phenotype), Collections.singletonList(disorder), null, null, 3, null, null), + new Family("f1", "f1", Collections.singletonList(phenotype), Collections.singletonList(disorder), null, null, 4, null, null), individuals.stream().map(Individual::getId).collect(Collectors.toList()), new QueryOptions(), token); @@ -375,6 +383,50 @@ public void testVariantSecondarySampleIndex() throws Exception { } } + @Test + public void testVariantSecondarySampleIndexPartialFamily() throws Exception { + Assume.assumeThat(storageEngine, anyOf( +// is(DummyVariantStorageEngine.STORAGE_ENGINE_ID), + is(HadoopVariantStorageEngine.STORAGE_ENGINE_ID) + )); + for (String sample : samples) { + SampleInternalVariantSecondarySampleIndex sampleIndex = catalogManager.getSampleManager().get(STUDY, sample, new QueryOptions(), token).first().getInternal().getVariant().getSecondarySampleIndex(); + assertEquals(sample, IndexStatus.READY, sampleIndex.getStatus().getId()); + assertEquals(sample, IndexStatus.NONE, sampleIndex.getFamilyStatus().getId()); + assertEquals(sample, 1, sampleIndex.getVersion().intValue()); + } + + Phenotype phenotype = new Phenotype("phenotype", "phenotype", ""); + Disorder disorder = new Disorder("disorder", "disorder", "", "", Collections.singletonList(phenotype), Collections.emptyMap()); + + catalogManager.getFamilyManager().delete(STUDY, Collections.singletonList("f1"), null, token); + catalogManager.getIndividualManager().update(STUDY, daughter, new IndividualUpdateParams() + .setMother(new IndividualReferenceParam(null, null)), null, token); + catalogManager.getFamilyManager().create( + STUDY, + new Family("f2", "f2", Collections.singletonList(phenotype), Collections.singletonList(disorder), null, null, 2, null, null), + Arrays.asList(father, daughter), new QueryOptions(), + token); + + // Run family index. The family index status should be READY on offspring + toolRunner.execute(VariantSecondarySampleIndexOperationTool.class, STUDY, + new VariantSecondarySampleIndexParams() + .setFamilyIndex(true) + .setSample(Arrays.asList(daughter)), + Paths.get(opencga.createTmpOutdir()), "index", token); + + for (String sample : samples) { + SampleInternalVariantSecondarySampleIndex sampleIndex = catalogManager.getSampleManager().get(STUDY, sample, new QueryOptions(), token).first().getInternal().getVariant().getSecondarySampleIndex(); + assertEquals(sample, IndexStatus.READY, sampleIndex.getStatus().getId()); + if (sample.equals(daughter)) { + assertEquals(sample, IndexStatus.READY, sampleIndex.getFamilyStatus().getId()); + } else { + assertEquals(sample, IndexStatus.NONE, sampleIndex.getFamilyStatus().getId()); + } + assertEquals(sample, 1, sampleIndex.getVersion().intValue()); + } + } + @Test public void testGwasIndex() throws Exception { // Variant scores can not be loaded in mongodb nor dummy diff --git a/opencga-storage/opencga-storage-core/src/main/java/org/opencb/opencga/storage/core/metadata/models/Trio.java b/opencga-storage/opencga-storage-core/src/main/java/org/opencb/opencga/storage/core/metadata/models/Trio.java index 2c12a0021e0..82c85135b74 100644 --- a/opencga-storage/opencga-storage-core/src/main/java/org/opencb/opencga/storage/core/metadata/models/Trio.java +++ b/opencga-storage/opencga-storage-core/src/main/java/org/opencb/opencga/storage/core/metadata/models/Trio.java @@ -6,21 +6,42 @@ import java.util.List; import java.util.Objects; +/** + * This class represents a family trio. + * + * - Father and mother can be null + * - Child cannot be null + * - All samples must be unique + * - All samples must be different to NA (dash) + * + */ public class Trio { + public static final String NA = "-"; private final String id; private final String father; private final String mother; private final String child; + public Trio(String trio) { + String[] split = trio.split(","); + if (split.length != 3) { + throw new IllegalArgumentException("Expected three samples in trio '" + trio + "'"); + } + this.id = null; + this.child = split[0]; + this.father = NA.equals(split[1]) ? null : split[1]; + this.mother = NA.equals(split[2]) ? null : split[2]; + } + public Trio(List trio) { this(null, trio); } public Trio(String id, List trio) { this.id = id; - this.father = trio.get(1); - this.mother = trio.get(2); this.child = trio.get(0); + this.father = NA.equals(trio.get(1)) ? null : trio.get(1); + this.mother = NA.equals(trio.get(2)) ? null : trio.get(2); } public Trio(String father, String mother, String child) { @@ -29,8 +50,8 @@ public Trio(String father, String mother, String child) { public Trio(String id, String father, String mother, String child) { this.id = id; - this.father = father; - this.mother = mother; + this.father = NA.equals(father) ? null : father; + this.mother = NA.equals(mother) ? null : mother; this.child = child; } @@ -50,6 +71,11 @@ public String getChild() { return child; } + /** + * Returns a list with the non-null samples in the trio. + * + * @return List of samples + */ public List toList() { ArrayList list = new ArrayList<>(3); list.add(getChild()); @@ -82,6 +108,31 @@ public int hashCode() { return Objects.hash(id, father, mother, child); } + /** + * Serialize the trio into a string contain the three samples separated by commas. + * order: child, father, mother. + * If the father or mother are null, they will be replaced by {@link #NA}. + * + * Can be deserialized using {@link #Trio(String)}. + * + * @return String + */ + public String serialize() { + ArrayList list = new ArrayList<>(3); + list.add(getChild()); + if (getFather() == null) { + list.add(NA); + } else { + list.add(getFather()); + } + if (getMother() == null) { + list.add(NA); + } else { + list.add(getMother()); + } + return Strings.join(list, ','); + } + @Override public String toString() { return Strings.join(toList(), ','); diff --git a/opencga-storage/opencga-storage-core/src/main/java/org/opencb/opencga/storage/core/variant/VariantStorageEngine.java b/opencga-storage/opencga-storage-core/src/main/java/org/opencb/opencga/storage/core/variant/VariantStorageEngine.java index cd6202ebf35..8779643964b 100644 --- a/opencga-storage/opencga-storage-core/src/main/java/org/opencb/opencga/storage/core/variant/VariantStorageEngine.java +++ b/opencga-storage/opencga-storage-core/src/main/java/org/opencb/opencga/storage/core/variant/VariantStorageEngine.java @@ -582,45 +582,52 @@ public void sampleIndexAnnotate(String study, List samples, ObjectMap op * The Family Index is used alongside with the SampleIndex to speed up queries involving children and parents. * * @param study Study - * @param trios List of trios "father, mother, child". - * Missing parents in trios are specified with "-", - * If a family has two children, two trios should be defined. + * @param trios Trios to index. If a family has two children, two trios should be defined. * @param options Other options * @throws StorageEngineException in an error occurs * @return List of trios used to index. Empty if there was nothing to do. */ - public DataResult> familyIndex(String study, List> trios, ObjectMap options) throws StorageEngineException { + public DataResult familyIndex(String study, List trios, ObjectMap options) throws StorageEngineException { throw new UnsupportedOperationException("Unsupported familyIndex"); } - public DataResult> familyIndexUpdate(String study, ObjectMap options) throws StorageEngineException { + /** + * Update the family index. + * The Family Index is used alongside with the SampleIndex to speed up queries involving children and parents. + * + * @param study Study + * @param options Other options + * @throws StorageEngineException in an error occurs + * @return List of trios used to index. Empty if there was nothing to do. + */ + public DataResult familyIndexUpdate(String study, ObjectMap options) throws StorageEngineException { StudyMetadata studyMetadata = getMetadataManager().getStudyMetadata(study); int studyId = studyMetadata.getId(); int version = studyMetadata.getSampleIndexConfigurationLatest().getVersion(); - List> trios = new LinkedList<>(); + List trios = new LinkedList<>(); for (SampleMetadata sampleMetadata : getMetadataManager().sampleMetadataIterable(studyId)) { if (sampleMetadata.isFamilyIndexDefined()) { if (sampleMetadata.getFamilyIndexStatus(version) != TaskMetadata.Status.READY) { // This sample's family index needs to be updated String father; if (sampleMetadata.getFather() == null) { - father = "-"; + father = null; } else { father = getMetadataManager().getSampleName(studyId, sampleMetadata.getFather()); } String mother; if (sampleMetadata.getMother() == null) { - mother = "-"; + mother = null; } else { mother = getMetadataManager().getSampleName(studyId, sampleMetadata.getMother()); } - trios.add(Arrays.asList(father, mother, sampleMetadata.getName())); + trios.add(new Trio(father, mother, sampleMetadata.getName())); } } } if (trios.isEmpty()) { logger.info("Nothing to do!"); - return new DataResult>().setEvents(Collections.singletonList(new Event(Event.Type.INFO, "Nothing to do"))); + return new DataResult().setEvents(Collections.singletonList(new Event(Event.Type.INFO, "Nothing to do"))); } else { return familyIndex(study, trios, options); } diff --git a/opencga-storage/opencga-storage-core/src/test/java/org/opencb/opencga/storage/core/variant/dummy/DummyVariantStorageEngine.java b/opencga-storage/opencga-storage-core/src/test/java/org/opencb/opencga/storage/core/variant/dummy/DummyVariantStorageEngine.java index c81c7d21831..55866e24160 100644 --- a/opencga-storage/opencga-storage-core/src/test/java/org/opencb/opencga/storage/core/variant/dummy/DummyVariantStorageEngine.java +++ b/opencga-storage/opencga-storage-core/src/test/java/org/opencb/opencga/storage/core/variant/dummy/DummyVariantStorageEngine.java @@ -28,6 +28,7 @@ import org.opencb.opencga.storage.core.metadata.VariantStorageMetadataManager; import org.opencb.opencga.storage.core.metadata.models.StudyMetadata; import org.opencb.opencga.storage.core.metadata.models.TaskMetadata; +import org.opencb.opencga.storage.core.metadata.models.Trio; import org.opencb.opencga.storage.core.variant.VariantStorageEngine; import org.opencb.opencga.storage.core.variant.adaptors.VariantDBAdaptor; import org.opencb.opencga.storage.core.variant.io.VariantImporter; @@ -102,7 +103,7 @@ public DummyVariantStoragePipeline newStoragePipeline(boolean connected) throws } @Override - public DataResult> familyIndex(String study, List> trios, ObjectMap options) throws StorageEngineException { + public DataResult familyIndex(String study, List trios, ObjectMap options) throws StorageEngineException { logger.info("Running family index!"); VariantStorageMetadataManager metadataManager = getMetadataManager(); StudyMetadata studyMetadata = metadataManager.getStudyMetadata(study); @@ -121,7 +122,7 @@ public DataResult> familyIndex(String study, List> tri } }); } - return new DataResult>().setResults(trios); + return new DataResult().setResults(trios); } @Override diff --git a/opencga-storage/opencga-storage-hadoop/opencga-storage-hadoop-core/src/main/java/org/opencb/opencga/storage/hadoop/variant/HadoopVariantStorageEngine.java b/opencga-storage/opencga-storage-hadoop/opencga-storage-hadoop-core/src/main/java/org/opencb/opencga/storage/hadoop/variant/HadoopVariantStorageEngine.java index c3afc1f5040..917b679cf1c 100644 --- a/opencga-storage/opencga-storage-hadoop/opencga-storage-hadoop-core/src/main/java/org/opencb/opencga/storage/hadoop/variant/HadoopVariantStorageEngine.java +++ b/opencga-storage/opencga-storage-hadoop/opencga-storage-hadoop-core/src/main/java/org/opencb/opencga/storage/hadoop/variant/HadoopVariantStorageEngine.java @@ -46,10 +46,7 @@ import org.opencb.opencga.storage.core.io.managers.IOConnectorProvider; import org.opencb.opencga.storage.core.metadata.VariantMetadataFactory; import org.opencb.opencga.storage.core.metadata.VariantStorageMetadataManager; -import org.opencb.opencga.storage.core.metadata.models.FileMetadata; -import org.opencb.opencga.storage.core.metadata.models.SampleMetadata; -import org.opencb.opencga.storage.core.metadata.models.StudyMetadata; -import org.opencb.opencga.storage.core.metadata.models.TaskMetadata; +import org.opencb.opencga.storage.core.metadata.models.*; import org.opencb.opencga.storage.core.utils.CellBaseUtils; import org.opencb.opencga.storage.core.variant.VariantStorageEngine; import org.opencb.opencga.storage.core.variant.VariantStorageOptions; @@ -400,7 +397,7 @@ public void sampleIndexAnnotate(String study, List samples, ObjectMap op @Override - public DataResult> familyIndex(String study, List> trios, ObjectMap options) throws StorageEngineException { + public DataResult familyIndex(String study, List trios, ObjectMap options) throws StorageEngineException { options = getMergedOptions(options); return new FamilyIndexLoader(getSampleIndexDBAdaptor(), getDBAdaptor(), getMRExecutor()) .load(study, trios, options); diff --git a/opencga-storage/opencga-storage-hadoop/opencga-storage-hadoop-core/src/main/java/org/opencb/opencga/storage/hadoop/variant/index/family/FamilyIndexDriver.java b/opencga-storage/opencga-storage-hadoop/opencga-storage-hadoop-core/src/main/java/org/opencb/opencga/storage/hadoop/variant/index/family/FamilyIndexDriver.java index 36f17f5f3a1..ada52270419 100644 --- a/opencga-storage/opencga-storage-hadoop/opencga-storage-hadoop-core/src/main/java/org/opencb/opencga/storage/hadoop/variant/index/family/FamilyIndexDriver.java +++ b/opencga-storage/opencga-storage-hadoop/opencga-storage-hadoop-core/src/main/java/org/opencb/opencga/storage/hadoop/variant/index/family/FamilyIndexDriver.java @@ -17,6 +17,7 @@ import org.opencb.opencga.storage.core.metadata.models.CohortMetadata; import org.opencb.opencga.storage.core.metadata.models.SampleMetadata; import org.opencb.opencga.storage.core.metadata.models.TaskMetadata; +import org.opencb.opencga.storage.core.metadata.models.Trio; import org.opencb.opencga.storage.core.variant.adaptors.VariantQueryParam; import org.opencb.opencga.storage.hadoop.variant.AbstractVariantsTableDriver; import org.opencb.opencga.storage.hadoop.variant.GenomeHelper; @@ -98,28 +99,28 @@ protected void parseAndValidateParameters() throws IOException { if (StringUtils.isNotEmpty(triosStr)) { String[] trios = triosStr.split(";"); List trioList = new ArrayList<>(3); - for (String trio : trios) { - for (String sample : trio.split(",")) { - Integer sampleId; - if (sample.equals("-")) { - sampleId = MISSING_SAMPLE; - } else { - sampleId = metadataManager.getSampleId(getStudyId(), sample); - if (sampleId == null) { - throw new IllegalArgumentException("Sample '" + sample + "' not found."); - } - } - trioList.add(sampleId); + for (String trioString : trios) { + Trio trio = new Trio(Arrays.asList(trioString.split(","))); + + if (trio.getFather() == null) { + trioList.add(MISSING_SAMPLE); + } else { + trioList.add(metadataManager.getSampleIdOrFail(getStudyId(), trio.getFather())); } - if (trioList.size() != 3) { - throw new IllegalArgumentException("Found trio with " + trioList.size() + " members, instead of 3: " + trioList); + if (trio.getMother() == null) { + trioList.add(MISSING_SAMPLE); + } else { + trioList.add(metadataManager.getSampleIdOrFail(getStudyId(), trio.getMother())); } - SampleMetadata sampleMetadata = metadataManager.getSampleMetadata(getStudyId(), trioList.get(2)); + int childId = metadataManager.getSampleIdOrFail(getStudyId(), trio.getChild()); + trioList.add(childId); + + SampleMetadata sampleMetadata = metadataManager.getSampleMetadata(getStudyId(), childId); if (!overwrite && sampleMetadata.getFamilyIndexStatus(sampleIndexVersion) == TaskMetadata.Status.READY) { LOGGER.info("Skip sample " + sampleMetadata.getName() + ". Already precomputed!"); } else { sampleIds.addAll(trioList); - LOGGER.info("Trio: " + trio + " -> " + trioList); + LOGGER.info("Trio: " + trioString + " -> " + trioList); } trioList.clear(); } diff --git a/opencga-storage/opencga-storage-hadoop/opencga-storage-hadoop-core/src/main/java/org/opencb/opencga/storage/hadoop/variant/index/family/FamilyIndexLoader.java b/opencga-storage/opencga-storage-hadoop/opencga-storage-hadoop-core/src/main/java/org/opencb/opencga/storage/hadoop/variant/index/family/FamilyIndexLoader.java index 244945ce71e..17083348c45 100644 --- a/opencga-storage/opencga-storage-hadoop/opencga-storage-hadoop-core/src/main/java/org/opencb/opencga/storage/hadoop/variant/index/family/FamilyIndexLoader.java +++ b/opencga-storage/opencga-storage-hadoop/opencga-storage-hadoop-core/src/main/java/org/opencb/opencga/storage/hadoop/variant/index/family/FamilyIndexLoader.java @@ -9,6 +9,7 @@ import org.opencb.opencga.storage.core.metadata.models.CohortMetadata; import org.opencb.opencga.storage.core.metadata.models.SampleMetadata; import org.opencb.opencga.storage.core.metadata.models.TaskMetadata; +import org.opencb.opencga.storage.core.metadata.models.Trio; import org.opencb.opencga.storage.hadoop.variant.HadoopVariantStorageOptions; import org.opencb.opencga.storage.hadoop.variant.adaptors.VariantHadoopDBAdaptor; import org.opencb.opencga.storage.hadoop.variant.executors.MRExecutor; @@ -17,7 +18,6 @@ import org.slf4j.Logger; import org.slf4j.LoggerFactory; -import java.util.ArrayList; import java.util.Iterator; import java.util.LinkedList; import java.util.List; @@ -38,9 +38,9 @@ public FamilyIndexLoader(SampleIndexDBAdaptor sampleIndexDBAdaptor, VariantHadoo this.mrExecutor = mrExecutor; } - public DataResult> load(String study, List> trios, ObjectMap options) throws StorageEngineException { + public DataResult load(String study, List trios, ObjectMap options) throws StorageEngineException { trios = new LinkedList<>(trios); - DataResult> dr = new DataResult<>(); + DataResult dr = new DataResult<>(); dr.setResults(trios); dr.setEvents(new LinkedList<>()); @@ -55,35 +55,34 @@ public DataResult> load(String study, List> trios, Obj options.put(FamilyIndexDriver.SAMPLE_INDEX_VERSION, version); options.put(FamilyIndexDriver.OUTPUT, sampleIndexDBAdaptor.getSampleIndexTableName(studyId, version)); - Iterator> iterator = trios.iterator(); + Iterator iterator = trios.iterator(); while (iterator.hasNext()) { - List trioIds = new ArrayList<>(3); - List trio = iterator.next(); - for (String sample : trio) { - Integer sampleId; - if (sample.equals("-")) { - sampleId = -1; - } else { - sampleId = metadataManager.getSampleId(studyId, sample); - if (sampleId == null) { - throw new IllegalArgumentException("Sample '" + sample + "' not found."); - } - } - trioIds.add(sampleId); + Trio trio = iterator.next(); + + final Integer fatherId; + final Integer motherId; + final Integer childId; + + childId = metadataManager.getSampleId(studyId, trio.getChild()); + if (trio.getFather() == null) { + fatherId = -1; + } else { + fatherId = metadataManager.getSampleIdOrFail(studyId, trio.getFather()); } - if (trioIds.size() != 3) { - throw new IllegalArgumentException("Found trio with " + trioIds.size() + " members, instead of 3: " + trioIds); + if (trio.getMother() == null) { + motherId = -1; + } else { + motherId = metadataManager.getSampleIdOrFail(studyId, trio.getMother()); } - SampleMetadata sampleMetadata = metadataManager.getSampleMetadata(studyId, trioIds.get(2)); + + SampleMetadata sampleMetadata = metadataManager.getSampleMetadata(studyId, childId); if (!overwrite && sampleMetadata.getFamilyIndexStatus(version) == TaskMetadata.Status.READY) { String msg = "Skip sample " + sampleMetadata.getName() + ". Already precomputed!"; logger.info(msg); dr.getEvents().add(new Event(Event.Type.INFO, msg)); iterator.remove(); } else { - Integer fatherId = trioIds.get(0); boolean fatherDefined = fatherId != -1; - Integer motherId = trioIds.get(1); boolean motherDefined = motherId != -1; if (fatherDefined && !fatherId.equals(sampleMetadata.getFather()) || motherDefined && !motherId.equals(sampleMetadata.getMother())) { @@ -106,14 +105,14 @@ public DataResult> load(String study, List> trios, Obj int batchSize = options.getInt(HadoopVariantStorageOptions.SAMPLE_INDEX_FAMILY_MAX_TRIOS_PER_MR.key(), HadoopVariantStorageOptions.SAMPLE_INDEX_FAMILY_MAX_TRIOS_PER_MR.defaultValue()); - List>> batches = BatchUtils.splitBatches(trios, batchSize); + List> batches = BatchUtils.splitBatches(trios, batchSize); if (batches.size() == 1) { runBatch(study, trios, options, studyId); } else { logger.warn("Unable to run family index in one single MapReduce operation."); logger.info("Split in {} jobs of {} samples each.", batches, batches.get(0).size()); for (int i = 0; i < batches.size(); i++) { - List> batch = batches.get(i); + List batch = batches.get(i); logger.info("Running MapReduce {}/{} over {} trios", i + 1, batches, batch.size()); runBatch(study, batch, options, studyId); } @@ -122,12 +121,14 @@ public DataResult> load(String study, List> trios, Obj return dr; } - private void runBatch(String study, List> trios, ObjectMap options, int studyId) throws StorageEngineException { + private void runBatch(String study, List trios, ObjectMap options, int studyId) throws StorageEngineException { if (trios.size() < 500) { - options.put(FamilyIndexDriver.TRIOS, trios.stream().map(trio -> String.join(",", trio)).collect(Collectors.joining(";"))); + options.put(FamilyIndexDriver.TRIOS, trios.stream() + .map(Trio::serialize) + .collect(Collectors.joining(";"))); } else { CohortMetadata cohortMetadata = metadataManager.registerTemporaryCohort(study, "pendingFamilyIndexSamples", - trios.stream().map(t -> t.get(2)).collect(Collectors.toList())); + trios.stream().map(Trio::getChild).collect(Collectors.toList())); options.put(FamilyIndexDriver.TRIOS_COHORT, cohortMetadata.getName()); options.put(FamilyIndexDriver.TRIOS_COHORT_DELETE, true); @@ -137,7 +138,7 @@ private void runBatch(String study, List> trios, ObjectMap options, tableNameGenerator.getArchiveTableName(studyId), tableNameGenerator.getVariantTableName(), studyId, null, options), - "Precompute mendelian errors for " + (trios.size() == 1 ? "trio " + trios.get(0) : trios.size() + " trios")); + "Precompute mendelian errors for " + (trios.size() == 1 ? "trio " + trios.get(0).serialize() : trios.size() + " trios")); } public void postIndex(int studyId, int version) diff --git a/opencga-storage/opencga-storage-hadoop/opencga-storage-hadoop-core/src/test/java/org/opencb/opencga/storage/hadoop/variant/index/family/FamilyIndexTest.java b/opencga-storage/opencga-storage-hadoop/opencga-storage-hadoop-core/src/test/java/org/opencb/opencga/storage/hadoop/variant/index/family/FamilyIndexTest.java index 630ddb4960d..034e676c1b4 100644 --- a/opencga-storage/opencga-storage-hadoop/opencga-storage-hadoop-core/src/test/java/org/opencb/opencga/storage/hadoop/variant/index/family/FamilyIndexTest.java +++ b/opencga-storage/opencga-storage-hadoop/opencga-storage-hadoop-core/src/test/java/org/opencb/opencga/storage/hadoop/variant/index/family/FamilyIndexTest.java @@ -18,6 +18,7 @@ import org.opencb.opencga.core.models.operations.variant.VariantAggregateFamilyParams; import org.opencb.opencga.core.response.VariantQueryResult; import org.opencb.opencga.core.testclassification.duration.MediumTests; +import org.opencb.opencga.storage.core.metadata.models.Trio; import org.opencb.opencga.storage.core.variant.VariantStorageBaseTest; import org.opencb.opencga.storage.core.variant.VariantStorageOptions; import org.opencb.opencga.storage.core.variant.adaptors.GenotypeClass; @@ -80,12 +81,13 @@ public void before() throws Exception { runETL(variantStorageEngine, getResourceUri("variant-test-me.vcf"), outputUri, params, true, true, true); - List family = Arrays.asList(father, mother, child); + Trio family = new Trio(father, mother, child); + Trio family2 = new Trio("FATHER", "MOTHER", "PROBAND"); - variantStorageEngine.aggregateFamily(study, new VariantAggregateFamilyParams(family, false), new ObjectMap()); + variantStorageEngine.aggregateFamily(study, new VariantAggregateFamilyParams(family.toList(), false), new ObjectMap()); variantStorageEngine.familyIndex(study, Collections.singletonList(family), new ObjectMap()); - variantStorageEngine.familyIndex(study, Collections.singletonList(Arrays.asList("FATHER", "MOTHER", "PROBAND")), new ObjectMap()); + variantStorageEngine.familyIndex(study, Collections.singletonList(family2), new ObjectMap()); variantStorageEngine.annotate(outputUri, new ObjectMap()); diff --git a/opencga-storage/opencga-storage-hadoop/opencga-storage-hadoop-core/src/test/java/org/opencb/opencga/storage/hadoop/variant/index/sample/SampleIndexTest.java b/opencga-storage/opencga-storage-hadoop/opencga-storage-hadoop-core/src/test/java/org/opencb/opencga/storage/hadoop/variant/index/sample/SampleIndexTest.java index 0319c2bc43b..3e6ab96edcd 100644 --- a/opencga-storage/opencga-storage-hadoop/opencga-storage-hadoop-core/src/test/java/org/opencb/opencga/storage/hadoop/variant/index/sample/SampleIndexTest.java +++ b/opencga-storage/opencga-storage-hadoop/opencga-storage-hadoop-core/src/test/java/org/opencb/opencga/storage/hadoop/variant/index/sample/SampleIndexTest.java @@ -31,6 +31,7 @@ import org.opencb.opencga.storage.core.exceptions.StorageEngineException; import org.opencb.opencga.storage.core.metadata.models.SampleMetadata; import org.opencb.opencga.storage.core.metadata.models.StudyMetadata; +import org.opencb.opencga.storage.core.metadata.models.Trio; import org.opencb.opencga.storage.core.variant.VariantStorageBaseTest; import org.opencb.opencga.storage.core.variant.VariantStorageEngine; import org.opencb.opencga.storage.core.variant.VariantStorageOptions; @@ -111,12 +112,12 @@ public class SampleIndexTest extends VariantStorageBaseTest implements HadoopVar // Arrays.asList("NA19661", "NA19685", "NA19600"), // Arrays.asList("NA19685", "NA19600", "NA19660") // ); - private static List> trios = Arrays.asList( - Arrays.asList("NA19660", "NA19661", "NA19685"), - Arrays.asList("NA19660", "NA19661", "NA19600") + private static List trios = Arrays.asList( + new Trio("NA19660", "NA19661", "NA19685"), + new Trio("NA19660", "NA19661", "NA19600") ); - private static List> triosPlatinum = Arrays.asList( - Arrays.asList("NA12877", "-", "NA12878") + private static List triosPlatinum = Arrays.asList( + new Trio("NA12877", null, "NA12878") ); @Before @@ -341,8 +342,8 @@ public void regenerateSampleIndex() throws Exception { studyId, Collections.emptySet(), options), ""); - if (sampleNames.get(study).containsAll(trios.get(0))) { - options.put(FamilyIndexDriver.TRIOS, trios.stream().map(trio -> String.join(",", trio)).collect(Collectors.joining(";"))); + if (sampleNames.get(study).containsAll(trios.get(0).toList())) { + options.put(FamilyIndexDriver.TRIOS, trios.stream().map(Trio::serialize).collect(Collectors.joining(";"))); options.put(FamilyIndexDriver.OVERWRITE, true); new TestMRExecutor().run(FamilyIndexDriver.class, FamilyIndexDriver.buildArgs( dbAdaptor.getArchiveTableName(studyId), @@ -350,7 +351,7 @@ public void regenerateSampleIndex() throws Exception { studyId, Collections.emptySet(), options), ""); } else if (study.equals(STUDY_NAME_3)) { - options.put(FamilyIndexDriver.TRIOS, triosPlatinum.stream().map(trio -> String.join(",", trio)).collect(Collectors.joining(";"))); + options.put(FamilyIndexDriver.TRIOS, triosPlatinum.stream().map(Trio::serialize).collect(Collectors.joining(";"))); options.put(FamilyIndexDriver.OVERWRITE, true); new TestMRExecutor().run(FamilyIndexDriver.class, FamilyIndexDriver.buildArgs( dbAdaptor.getArchiveTableName(studyId), @@ -1036,8 +1037,8 @@ public void testApproximateCount() { @Test public void testFamilyIndexQueryCount() { - List trio = trios.get(0); - String proband = trio.get(2); + Trio trio = trios.get(0); + String proband = trio.getChild(); VariantQueryResult result = variantStorageEngine.get( new Query() .append(STUDY.key(), STUDY_NAME) From db992c5849391590068ea15b3738471c7a3d3002 Mon Sep 17 00:00:00 2001 From: pfurio Date: Tue, 26 Sep 2023 13:14:36 +0200 Subject: [PATCH 16/50] catalog: improve delete error messages, #TASK-4210 --- .../db/mongodb/IndividualMongoDBAdaptor.java | 8 +++----- .../catalog/db/mongodb/SampleMongoDBAdaptor.java | 6 ++---- .../opencga/catalog/managers/FamilyManager.java | 3 ++- .../catalog/managers/IndividualManager.java | 6 ++---- .../opencga/catalog/managers/SampleManager.java | 14 +++++++------- .../catalog/managers/SampleManagerTest.java | 2 +- 6 files changed, 17 insertions(+), 22 deletions(-) diff --git a/opencga-catalog/src/main/java/org/opencb/opencga/catalog/db/mongodb/IndividualMongoDBAdaptor.java b/opencga-catalog/src/main/java/org/opencb/opencga/catalog/db/mongodb/IndividualMongoDBAdaptor.java index 1a074a17331..6437a0293b2 100644 --- a/opencga-catalog/src/main/java/org/opencb/opencga/catalog/db/mongodb/IndividualMongoDBAdaptor.java +++ b/opencga-catalog/src/main/java/org/opencb/opencga/catalog/db/mongodb/IndividualMongoDBAdaptor.java @@ -644,7 +644,6 @@ private void updateClinicalAnalysisIndividualReferences(ClientSession clientSess */ private void checkInUseInClinicalAnalysis(ClientSession clientSession, Document individual) throws CatalogDBException, CatalogParameterException, CatalogAuthorizationException { - String individualId = individual.getString(QueryParams.ID.key()); long individualUid = individual.getLong(PRIVATE_UID); long studyUid = individual.getLong(PRIVATE_STUDY_UID); @@ -653,8 +652,7 @@ private void checkInUseInClinicalAnalysis(ClientSession clientSession, Document .append(ClinicalAnalysisDBAdaptor.QueryParams.INDIVIDUAL.key(), individualUid); OpenCGAResult count = dbAdaptorFactory.getClinicalAnalysisDBAdaptor().count(clientSession, query); if (count.getNumMatches() > 0) { - throw new CatalogDBException("Could not delete individual '" + individualId + "'. Individual is in use in " - + count.getNumMatches() + " cases"); + throw new CatalogDBException("Individual is in use in " + count.getNumMatches() + " cases"); } } @@ -940,7 +938,7 @@ public OpenCGAResult delete(Individual individual) throws CatalogDBException, Ca return runTransaction(clientSession -> privateDelete(clientSession, result.first())); } catch (CatalogDBException e) { logger.error("Could not delete individual {}: {}", individual.getId(), e.getMessage(), e); - throw new CatalogDBException("Could not delete individual " + individual.getId() + ": " + e.getMessage(), e.getCause()); + throw new CatalogDBException("Could not delete individual " + individual.getId() + ": " + e.getMessage(), e); } } @@ -976,7 +974,7 @@ OpenCGAResult privateDelete(ClientSession clientSession, Document indivi checkInUseInClinicalAnalysis(clientSession, individualDocument); logger.debug("Deleting individual {} ({})", individualId, individualUid); - // Look for all the different family versions + // Look for all the different individual versions Query individualQuery = new Query() .append(QueryParams.UID.key(), individualUid) .append(QueryParams.STUDY_UID.key(), studyUid); diff --git a/opencga-catalog/src/main/java/org/opencb/opencga/catalog/db/mongodb/SampleMongoDBAdaptor.java b/opencga-catalog/src/main/java/org/opencb/opencga/catalog/db/mongodb/SampleMongoDBAdaptor.java index dde62bd87d3..6d7bd764c57 100644 --- a/opencga-catalog/src/main/java/org/opencb/opencga/catalog/db/mongodb/SampleMongoDBAdaptor.java +++ b/opencga-catalog/src/main/java/org/opencb/opencga/catalog/db/mongodb/SampleMongoDBAdaptor.java @@ -500,7 +500,6 @@ void updateIndividualIdFromSamples(ClientSession clientSession, long studyUid, S */ private void checkInUseInClinicalAnalysis(ClientSession clientSession, Document sample) throws CatalogDBException, CatalogParameterException, CatalogAuthorizationException { - String sampleId = sample.getString(QueryParams.ID.key()); long sampleUid = sample.getLong(QueryParams.UID.key()); long studyUid = sample.getLong(QueryParams.STUDY_UID.key()); @@ -509,8 +508,7 @@ private void checkInUseInClinicalAnalysis(ClientSession clientSession, Document .append(ClinicalAnalysisDBAdaptor.QueryParams.SAMPLE.key(), sampleUid); OpenCGAResult count = dbAdaptorFactory.getClinicalAnalysisDBAdaptor().count(clientSession, query); if (count.getNumMatches() > 0) { - throw new CatalogDBException("Could not delete sample '" + sampleId + "'. Sample is in use in " - + count.getNumMatches() + " cases"); + throw new CatalogDBException("Sample is in use in " + count.getNumMatches() + " cases"); } } @@ -860,7 +858,7 @@ public OpenCGAResult delete(Sample sample) throws CatalogDBException, CatalogPar return runTransaction(clientSession -> privateDelete(clientSession, result.first())); } catch (CatalogDBException e) { logger.error("Could not delete sample {}: {}", sample.getId(), e.getMessage(), e); - throw new CatalogDBException("Could not delete sample " + sample.getId() + ": " + e.getMessage(), e.getCause()); + throw new CatalogDBException("Could not delete sample " + sample.getId() + ": " + e.getMessage(), e); } } diff --git a/opencga-catalog/src/main/java/org/opencb/opencga/catalog/managers/FamilyManager.java b/opencga-catalog/src/main/java/org/opencb/opencga/catalog/managers/FamilyManager.java index d7183adabae..c135e390744 100644 --- a/opencga-catalog/src/main/java/org/opencb/opencga/catalog/managers/FamilyManager.java +++ b/opencga-catalog/src/main/java/org/opencb/opencga/catalog/managers/FamilyManager.java @@ -530,7 +530,8 @@ private void checkCanBeDeleted(Study study, Family family) throws CatalogExcepti OpenCGAResult result = clinicalDBAdaptor.get(query, ClinicalAnalysisManager.INCLUDE_CLINICAL_IDS); if (result.getNumResults() > 0) { String clinicalIds = result.getResults().stream().map(ClinicalAnalysis::getId).collect(Collectors.joining(", ")); - throw new CatalogException("Family {" + family.getId() + "} in use in Clinical Analyses: {" + clinicalIds + "}"); + throw new CatalogException("Could not delete family '" + family.getId() + "'. Family is in use in Clinical Analyses: '" + + clinicalIds + "'"); } } diff --git a/opencga-catalog/src/main/java/org/opencb/opencga/catalog/managers/IndividualManager.java b/opencga-catalog/src/main/java/org/opencb/opencga/catalog/managers/IndividualManager.java index 07d03a295ce..97057677b0d 100644 --- a/opencga-catalog/src/main/java/org/opencb/opencga/catalog/managers/IndividualManager.java +++ b/opencga-catalog/src/main/java/org/opencb/opencga/catalog/managers/IndividualManager.java @@ -710,10 +710,8 @@ private OpenCGAResult delete(Study study, Individual individual, ObjectMap param // Check if the individual can be deleted if (!params.getBoolean(Constants.FORCE, false)) { if (familyDataResult.getNumResults() > 0) { - throw new CatalogException("Individual found in the families: " + familyDataResult.getResults() - .stream() - .map(Family::getId) - .collect(Collectors.joining(", "))); + throw new CatalogException("Could not delete individual '" + individual.getId() + "'. Individual found in the families: " + + familyDataResult.getResults().stream().map(Family::getId).collect(Collectors.joining(", "))); } } else { logger.info("Forcing deletion of individuals belonging to families"); diff --git a/opencga-catalog/src/main/java/org/opencb/opencga/catalog/managers/SampleManager.java b/opencga-catalog/src/main/java/org/opencb/opencga/catalog/managers/SampleManager.java index 5ab592050d2..580bc1c2c2c 100644 --- a/opencga-catalog/src/main/java/org/opencb/opencga/catalog/managers/SampleManager.java +++ b/opencga-catalog/src/main/java/org/opencb/opencga/catalog/managers/SampleManager.java @@ -815,6 +815,7 @@ public OpenCGAResult resetAnnotations(String studyStr, String sampleStr, } private void checkSampleCanBeDeleted(long studyId, Sample sample, boolean force) throws CatalogException { + String msg = "Could not delete sample '" + sample.getId() + "'. "; // Look for files related with the sample Query query = new Query() .append(FileDBAdaptor.QueryParams.SAMPLE_IDS.key(), sample.getId()) @@ -834,9 +835,9 @@ private void checkSampleCanBeDeleted(long studyId, Sample sample, boolean force) } if (!errorFiles.isEmpty()) { if (force) { - throw new CatalogException("Associated files are used in storage: " + StringUtils.join(errorFiles, ", ")); + throw new CatalogException(msg + "Associated files are used in storage: " + StringUtils.join(errorFiles, ", ")); } else { - throw new CatalogException("Sample associated to the files: " + StringUtils.join(errorFiles, ", ")); + throw new CatalogException(msg + "Sample associated to the files: " + StringUtils.join(errorFiles, ", ")); } } @@ -865,14 +866,14 @@ private void checkSampleCanBeDeleted(long studyId, Sample sample, boolean force) } } if (associatedToDefaultCohort) { - throw new CatalogException("Sample in cohort " + StudyEntry.DEFAULT_COHORT); + throw new CatalogException(msg + "Sample in cohort " + StudyEntry.DEFAULT_COHORT); } if (!errorCohorts.isEmpty()) { if (force) { - throw new CatalogException("Sample present in cohorts in the process of calculating the stats: " + throw new CatalogException(msg + "Sample present in cohorts in the process of calculating the stats: " + StringUtils.join(errorCohorts, ", ")); } else { - throw new CatalogException("Sample present in cohorts: " + StringUtils.join(errorCohorts, ", ")); + throw new CatalogException(msg + "Sample present in cohorts: " + StringUtils.join(errorCohorts, ", ")); } } @@ -884,8 +885,7 @@ private void checkSampleCanBeDeleted(long studyId, Sample sample, boolean force) OpenCGAResult individualDataResult = individualDBAdaptor.get(query, new QueryOptions(QueryOptions.INCLUDE, Arrays.asList(IndividualDBAdaptor.QueryParams.UID.key(), IndividualDBAdaptor.QueryParams.ID.key()))); if (individualDataResult.getNumResults() > 0) { - throw new CatalogException("Sample from individual " + individualDataResult.first().getName() + "(" - + individualDataResult.first().getUid() + ")"); + throw new CatalogException(msg + "Sample is associated with individual '" + individualDataResult.first().getId() + "'."); } } } diff --git a/opencga-catalog/src/test/java/org/opencb/opencga/catalog/managers/SampleManagerTest.java b/opencga-catalog/src/test/java/org/opencb/opencga/catalog/managers/SampleManagerTest.java index 51c78472790..24c94481fe6 100644 --- a/opencga-catalog/src/test/java/org/opencb/opencga/catalog/managers/SampleManagerTest.java +++ b/opencga-catalog/src/test/java/org/opencb/opencga/catalog/managers/SampleManagerTest.java @@ -2786,7 +2786,7 @@ public void deleteInUseInCATest() throws CatalogException { try { catalogManager.getSampleManager().delete(studyFqn, Collections.singletonList(case1.getProband().getSamples().get(0).getId()), - new QueryOptions(ParamConstants.FORCE, true), token); + new QueryOptions(ParamConstants.FORCE, false), token); } catch (CatalogException e) { assertTrue(e.getMessage().contains("in use in 3 cases")); } From b11d9a87d356f7517687e5e11df62274160a74cc Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jacobo=20Coll=20Morag=C3=B3n?= Date: Tue, 26 Sep 2023 18:01:59 +0100 Subject: [PATCH 17/50] storage: Fix NPE when updating cellbase configuration on empty variant storages #TASK-4873 --- .../manager/VariantStorageManager.java | 19 ++++++++++--- .../analysis/variant/VariantAnalysisTest.java | 17 ++++++++++++ .../manager/VariantOperationsTest.java | 27 +++++++++++++++++++ 3 files changed, 59 insertions(+), 4 deletions(-) diff --git a/opencga-analysis/src/main/java/org/opencb/opencga/analysis/variant/manager/VariantStorageManager.java b/opencga-analysis/src/main/java/org/opencb/opencga/analysis/variant/manager/VariantStorageManager.java index 48b5cf87114..af96016add0 100644 --- a/opencga-analysis/src/main/java/org/opencb/opencga/analysis/variant/manager/VariantStorageManager.java +++ b/opencga-analysis/src/main/java/org/opencb/opencga/analysis/variant/manager/VariantStorageManager.java @@ -63,6 +63,7 @@ import org.opencb.opencga.core.models.operations.variant.*; import org.opencb.opencga.core.models.project.DataStore; import org.opencb.opencga.core.models.project.Project; +import org.opencb.opencga.core.models.project.ProjectOrganism; import org.opencb.opencga.core.models.sample.Sample; import org.opencb.opencga.core.models.sample.SamplePermissions; import org.opencb.opencga.core.models.study.Study; @@ -1015,11 +1016,21 @@ protected VariantStorageEngine getVariantStorageEngineByProject(String project, return variantStorageEngine; } - private void setCellbaseConfiguration(VariantStorageEngine engine, String project, String token) + private void setCellbaseConfiguration(VariantStorageEngine engine, String projectId, String token) throws CatalogException { - CellBaseConfiguration cellbase = catalogManager.getProjectManager() - .get(project, new QueryOptions(INCLUDE, ProjectDBAdaptor.QueryParams.CELLBASE.key()), token) - .first().getCellbase(); + Project project = catalogManager.getProjectManager() + .get(projectId, new QueryOptions(INCLUDE, Arrays.asList( + ProjectDBAdaptor.QueryParams.CELLBASE.key(), + ProjectDBAdaptor.QueryParams.ORGANISM.key())), token) + .first(); + CellBaseConfiguration cellbase = project.getCellbase(); + ProjectOrganism organism = project.getOrganism(); + if (organism == null) { + throw new CatalogException("Missing organism in project '" + project.getFqn()+ "'"); + } else { + engine.getOptions().put(VariantStorageOptions.SPECIES.key(), organism.getScientificName()); + engine.getOptions().put(VariantStorageOptions.ASSEMBLY.key(), organism.getAssembly()); + } if (cellbase != null) { if (StringUtils.isEmpty(cellbase.getToken()) || storageConfiguration.getCellbase() != null) { cellbase.setToken(storageConfiguration.getCellbase().getToken()); diff --git a/opencga-analysis/src/test/java/org/opencb/opencga/analysis/variant/VariantAnalysisTest.java b/opencga-analysis/src/test/java/org/opencb/opencga/analysis/variant/VariantAnalysisTest.java index 31a59eebc2e..fafdb74d983 100644 --- a/opencga-analysis/src/test/java/org/opencb/opencga/analysis/variant/VariantAnalysisTest.java +++ b/opencga-analysis/src/test/java/org/opencb/opencga/analysis/variant/VariantAnalysisTest.java @@ -22,6 +22,7 @@ import org.hamcrest.CoreMatchers; import org.junit.*; import org.junit.experimental.categories.Category; +import org.junit.rules.ExpectedException; import org.junit.runner.RunWith; import org.junit.runners.Parameterized; import org.opencb.biodata.models.clinical.Disorder; @@ -58,6 +59,7 @@ import org.opencb.opencga.core.api.ParamConstants; import org.opencb.opencga.core.common.ExceptionUtils; import org.opencb.opencga.core.common.JacksonUtils; +import org.opencb.opencga.core.config.storage.CellBaseConfiguration; import org.opencb.opencga.core.config.storage.StorageConfiguration; import org.opencb.opencga.core.exceptions.ToolException; import org.opencb.opencga.core.models.cohort.Cohort; @@ -69,6 +71,8 @@ import org.opencb.opencga.core.models.individual.Individual; import org.opencb.opencga.core.models.individual.IndividualInternal; import org.opencb.opencga.core.models.individual.Location; +import org.opencb.opencga.core.models.project.ProjectCreateParams; +import org.opencb.opencga.core.models.project.ProjectOrganism; import org.opencb.opencga.core.models.sample.Sample; import org.opencb.opencga.core.models.sample.SampleQualityControl; import org.opencb.opencga.core.models.sample.SampleReferenceParam; @@ -80,6 +84,7 @@ import org.opencb.opencga.core.tools.result.ExecutionResult; import org.opencb.opencga.core.tools.result.ExecutionResultManager; import org.opencb.opencga.storage.core.StorageEngineFactory; +import org.opencb.opencga.storage.core.exceptions.StorageEngineException; import org.opencb.opencga.storage.core.variant.VariantStorageEngine; import org.opencb.opencga.storage.core.variant.VariantStorageOptions; import org.opencb.opencga.storage.core.variant.adaptors.VariantQuery; @@ -126,6 +131,8 @@ public class VariantAnalysisTest { private static String cancer_sample = "AR2.10039966-01T"; private static String germline_sample = "AR2.10039966-01G"; + @Rule + public ExpectedException thrown = ExpectedException.none(); @Parameterized.Parameters(name = "{0}") public static Object[][] parameters() { @@ -1056,6 +1063,16 @@ public void testPedigreeGraph() throws CatalogException { assertEquals(base64, family.getPedigreeGraph().getBase64()); } + @Test + public void testCellbaseConfigure() throws Exception { + String project = "Project_test_cellbase_configure"; + catalogManager.getProjectManager().create(new ProjectCreateParams(project, project, "", "", "", new ProjectOrganism("hsapiens", "grch38"), null, null), QueryOptions.empty(), token); + + thrown.expect(StorageEngineException.class); + thrown.expectMessage("The storage engine is in mode=READ_ONLY"); + variantStorageManager.setCellbaseConfiguration(project, new CellBaseConfiguration("https://uk.ws.zettagenomics.com/cellbase/", "v5.2", "1", ""), false, null, token); + } + public void checkExecutionResult(ExecutionResult er) { checkExecutionResult(er, true); } diff --git a/opencga-analysis/src/test/java/org/opencb/opencga/analysis/variant/manager/VariantOperationsTest.java b/opencga-analysis/src/test/java/org/opencb/opencga/analysis/variant/manager/VariantOperationsTest.java index 38ef6f98a21..cef05368b27 100644 --- a/opencga-analysis/src/test/java/org/opencb/opencga/analysis/variant/manager/VariantOperationsTest.java +++ b/opencga-analysis/src/test/java/org/opencb/opencga/analysis/variant/manager/VariantOperationsTest.java @@ -36,6 +36,7 @@ import org.opencb.opencga.core.api.ParamConstants; import org.opencb.opencga.core.common.JacksonUtils; import org.opencb.opencga.core.common.YesNoAuto; +import org.opencb.opencga.core.config.storage.CellBaseConfiguration; import org.opencb.opencga.core.config.storage.SampleIndexConfiguration; import org.opencb.opencga.core.config.storage.StorageConfiguration; import org.opencb.opencga.core.models.cohort.Cohort; @@ -50,6 +51,8 @@ import org.opencb.opencga.core.models.operations.variant.VariantAnnotationIndexParams; import org.opencb.opencga.core.models.operations.variant.VariantSecondaryAnnotationIndexParams; import org.opencb.opencga.core.models.operations.variant.VariantSecondarySampleIndexParams; +import org.opencb.opencga.core.models.project.ProjectCreateParams; +import org.opencb.opencga.core.models.project.ProjectOrganism; import org.opencb.opencga.core.models.sample.*; import org.opencb.opencga.core.models.user.Account; import org.opencb.opencga.core.models.variant.VariantIndexParams; @@ -58,6 +61,7 @@ import org.opencb.opencga.core.testclassification.duration.LongTests; import org.opencb.opencga.core.tools.result.ExecutionResult; import org.opencb.opencga.storage.core.metadata.models.VariantScoreMetadata; +import org.opencb.opencga.storage.core.utils.CellBaseUtils; import org.opencb.opencga.storage.core.variant.VariantStorageEngine; import org.opencb.opencga.storage.core.variant.adaptors.VariantQueryParam; import org.opencb.opencga.storage.core.variant.dummy.DummyVariantStorageEngine; @@ -75,6 +79,7 @@ import static org.hamcrest.CoreMatchers.anyOf; import static org.hamcrest.CoreMatchers.is; import static org.junit.Assert.assertEquals; +import static org.junit.Assert.assertNotEquals; @RunWith(Parameterized.class) @Category(LongTests.class) @@ -408,6 +413,28 @@ public void testGwasIndex() throws Exception { }); } + @Test + public void testCellbaseConfigure() throws Exception { + String project = "Project_test_cellbase_configure"; + catalogManager.getProjectManager().create(new ProjectCreateParams(project, project, "", "", "", new ProjectOrganism("hsapiens", "GRCh38"), null, null), QueryOptions.empty(), token); + + CellBaseUtils cellBaseUtils = variantStorageManager.getVariantStorageEngineByProject(project, null, token).getCellBaseUtils(); + assertEquals(ParamConstants.CELLBASE_URL, cellBaseUtils.getURL()); + assertEquals(ParamConstants.CELLBASE_VERSION, cellBaseUtils.getVersion()); + assertEquals("hsapiens", cellBaseUtils.getSpecies()); + assertEquals("GRCh38", cellBaseUtils.getAssembly()); + + String newCellbase = "https://uk.ws.zettagenomics.com/cellbase/"; + String newCellbaseVersion = "v5.2"; + + assertNotEquals(newCellbase, cellBaseUtils.getURL()); + assertNotEquals(newCellbaseVersion, cellBaseUtils.getVersion()); + + variantStorageManager.setCellbaseConfiguration(project, new CellBaseConfiguration(newCellbase, newCellbaseVersion, "1", ""), false, null, token); + CellBaseConfiguration cellbaseConfiguration = catalogManager.getProjectManager().get(project, new QueryOptions(), token).first().getCellbase(); +// assertTrue(family.getPedigreeGraph() != null); + } + public void checkExecutionResult(ExecutionResult er) { checkExecutionResult(er, true); } From f583161d66d26b96180f459e473337a0a03d3520 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Joaqu=C3=ADn=20T=C3=A1rraga=20Gim=C3=A9nez?= Date: Wed, 27 Sep 2023 13:23:33 +0200 Subject: [PATCH 18/50] analysis: update signature.tools.lib to v2.4.2 and add paramter -commonsigtier=T2 when fitting, #TASK-5038 --- .../MutationalSignatureLocalAnalysisExecutor.java | 4 +++- opencga-app/app/cloud/docker/opencga-ext-tools/Dockerfile | 2 +- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/opencga-analysis/src/main/java/org/opencb/opencga/analysis/variant/mutationalSignature/MutationalSignatureLocalAnalysisExecutor.java b/opencga-analysis/src/main/java/org/opencb/opencga/analysis/variant/mutationalSignature/MutationalSignatureLocalAnalysisExecutor.java index c542521329a..042784b844a 100644 --- a/opencga-analysis/src/main/java/org/opencb/opencga/analysis/variant/mutationalSignature/MutationalSignatureLocalAnalysisExecutor.java +++ b/opencga-analysis/src/main/java/org/opencb/opencga/analysis/variant/mutationalSignature/MutationalSignatureLocalAnalysisExecutor.java @@ -592,7 +592,9 @@ private void computeSignatureFitting() throws IOException, ToolException, Catalo StringBuilder scriptParams = new StringBuilder("R CMD Rscript --vanilla ") .append("/opt/opencga/signature.tools.lib/scripts/signatureFit") .append(" --catalogues=/data/input/").append(cataloguesFile.getName()) - .append(" --outdir=/data/output"); + .append(" --outdir=/data/output") + .append(" --commonsigtier=T2"); + if (StringUtils.isNotEmpty(getFitMethod())) { scriptParams.append(" --fitmethod=").append(getFitMethod()); } diff --git a/opencga-app/app/cloud/docker/opencga-ext-tools/Dockerfile b/opencga-app/app/cloud/docker/opencga-ext-tools/Dockerfile index 364a2994a24..ab1d4e8d09f 100644 --- a/opencga-app/app/cloud/docker/opencga-ext-tools/Dockerfile +++ b/opencga-app/app/cloud/docker/opencga-ext-tools/Dockerfile @@ -24,7 +24,7 @@ RUN apt-get update -y && DEBIAN_FRONTEND="noninteractive" TZ="Europe/London" apt WORKDIR /opt/opencga/signature.tools.lib RUN git fetch origin --tags && \ - git checkout tags/v2.4.1 && \ + git checkout tags/v2.4.2 && \ sed -i '/Mmusculus/d' DESCRIPTION && \ sed -i '/Cfamiliaris/d' DESCRIPTION && \ sed -i '/1000genomes/d' DESCRIPTION && \ From 460eb10102aec5d1d4fade00f2d150611831bcee Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jacobo=20Coll=20Morag=C3=B3n?= Date: Wed, 27 Sep 2023 17:18:51 +0100 Subject: [PATCH 19/50] storage: Do not update the largestVariantSize for every sample for every partial file. #TASK-4899 --- .../MarkUnknownLargestVariantLength.java | 43 +++++++++++++++++++ .../core/metadata/models/SampleMetadata.java | 7 +++ .../models/StudyResourceMetadata.java | 2 +- .../core/variant/VariantStorageEngine.java | 7 +-- .../core/variant/VariantStoragePipeline.java | 4 +- ...HadoopLocalLoadVariantStoragePipeline.java | 35 ++++++--------- .../index/sample/SampleIndexQueryParser.java | 8 +++- .../index/sample/SampleIndexSchema.java | 6 +++ ...doopVariantStorageEngineSplitDataTest.java | 33 +++++++++++++- 9 files changed, 114 insertions(+), 31 deletions(-) create mode 100644 opencga-app/src/main/java/org/opencb/opencga/app/migrations/v2_8_6/storage/MarkUnknownLargestVariantLength.java diff --git a/opencga-app/src/main/java/org/opencb/opencga/app/migrations/v2_8_6/storage/MarkUnknownLargestVariantLength.java b/opencga-app/src/main/java/org/opencb/opencga/app/migrations/v2_8_6/storage/MarkUnknownLargestVariantLength.java new file mode 100644 index 00000000000..eedf55b1870 --- /dev/null +++ b/opencga-app/src/main/java/org/opencb/opencga/app/migrations/v2_8_6/storage/MarkUnknownLargestVariantLength.java @@ -0,0 +1,43 @@ +package org.opencb.opencga.app.migrations.v2_8_6.storage; + +import org.opencb.opencga.app.migrations.StorageMigrationTool; +import org.opencb.opencga.catalog.migration.Migration; +import org.opencb.opencga.storage.core.metadata.models.SampleMetadata; +import org.opencb.opencga.storage.core.variant.VariantStorageEngine; +import org.opencb.opencga.storage.hadoop.variant.index.sample.SampleIndexSchema; + +import java.util.Map; + +@Migration(id = "mark_unknown_largest_variant_length" , + description = "Mark as unknown largest variant length", + version = "2.8.4", + domain = Migration.MigrationDomain.STORAGE, + language = Migration.MigrationLanguage.JAVA, + patch = 1, + date = 20230927 +) +public class MarkUnknownLargestVariantLength extends StorageMigrationTool { + + @Override + protected void run() throws Exception { + for (String project : getVariantStorageProjects()) { + try (VariantStorageEngine engine = getVariantStorageEngineByProject(project)) { + for (Map.Entry entry : engine.getMetadataManager().getStudies().entrySet()) { + String studyName = entry.getKey(); + Integer studyId = entry.getValue(); + logger.info("Process study '" + studyName + "' (" + studyId + ")"); + // Check for indexed samples with undefined largest variant length + for (SampleMetadata sampleMetadata : engine.getMetadataManager().sampleMetadataIterable(studyId)) { + if (sampleMetadata.isIndexed()) { + if (!sampleMetadata.getAttributes().containsKey(SampleIndexSchema.LARGEST_VARIANT_LENGTH)) { + logger.info("Mark unknown largest variant length for sample '" + sampleMetadata.getName() + "'"); + engine.getMetadataManager().updateSampleMetadata(studyId, sampleMetadata.getId(), + sm -> sm.getAttributes().put(SampleIndexSchema.UNKNOWN_LARGEST_VARIANT_LENGTH, true)); + } + } + } + } + } + } + } +} diff --git a/opencga-storage/opencga-storage-core/src/main/java/org/opencb/opencga/storage/core/metadata/models/SampleMetadata.java b/opencga-storage/opencga-storage-core/src/main/java/org/opencb/opencga/storage/core/metadata/models/SampleMetadata.java index 3c193134518..536d8795d70 100644 --- a/opencga-storage/opencga-storage-core/src/main/java/org/opencb/opencga/storage/core/metadata/models/SampleMetadata.java +++ b/opencga-storage/opencga-storage-core/src/main/java/org/opencb/opencga/storage/core/metadata/models/SampleMetadata.java @@ -18,6 +18,13 @@ */ public class SampleMetadata extends StudyResourceMetadata { + /** + * List of fileIds that contains the sample. + * This list is sorted by the order files were loaded. + * Only files of type {@link FileMetadata.Type#NORMAL} and {@link FileMetadata.Type#VIRTUAL} will be present in this list. + * If the sample was part of a set of {@link FileMetadata.Type#PARTIAL} files, only the + * {@link FileMetadata.Type#VIRTUAL} file will appear in this list. + */ private List files; private Set cohorts; // Prepared to have more than one secondary index per sample. diff --git a/opencga-storage/opencga-storage-core/src/main/java/org/opencb/opencga/storage/core/metadata/models/StudyResourceMetadata.java b/opencga-storage/opencga-storage-core/src/main/java/org/opencb/opencga/storage/core/metadata/models/StudyResourceMetadata.java index 07b111f24bf..75a7c58b1d8 100644 --- a/opencga-storage/opencga-storage-core/src/main/java/org/opencb/opencga/storage/core/metadata/models/StudyResourceMetadata.java +++ b/opencga-storage/opencga-storage-core/src/main/java/org/opencb/opencga/storage/core/metadata/models/StudyResourceMetadata.java @@ -10,7 +10,7 @@ * * @author Jacobo Coll <jacobo167@gmail.com> */ -public abstract class StudyResourceMetadata { +public abstract class StudyResourceMetadata> { private int studyId; private int id; diff --git a/opencga-storage/opencga-storage-core/src/main/java/org/opencb/opencga/storage/core/variant/VariantStorageEngine.java b/opencga-storage/opencga-storage-core/src/main/java/org/opencb/opencga/storage/core/variant/VariantStorageEngine.java index cd6202ebf35..5b3cb60a04f 100644 --- a/opencga-storage/opencga-storage-core/src/main/java/org/opencb/opencga/storage/core/variant/VariantStorageEngine.java +++ b/opencga-storage/opencga-storage-core/src/main/java/org/opencb/opencga/storage/core/variant/VariantStorageEngine.java @@ -140,11 +140,11 @@ public enum SplitData { REGION, MULTI; - public static boolean isPartial(ObjectMap options) { - return isPartial(from(options)); + public static boolean isPartialSplit(ObjectMap options) { + return isPartialSplit(from(options)); } - public static boolean isPartial(SplitData splitData) { + public static boolean isPartialSplit(SplitData splitData) { return splitData == CHROMOSOME || splitData == REGION; } @@ -1025,6 +1025,7 @@ protected void postRemoveFiles(String study, List fileIds, List 1) { - int loadedFiles = 0; - for (Integer fileId : sampleMetadata.getFiles()) { - if (metadataManager.isFileIndexed(getStudyId(), fileId)) { - loadedFiles++; - } - } - if (loadedFiles > 1) { - alreadyLoadedFiles = true; - } - metadataManager.getFileIdsFromSampleId(1, 1, true); - } + boolean isLargestVariantLengthDefined = sampleMetadata.getAttributes() + .containsKey(SampleIndexSchema.LARGEST_VARIANT_LENGTH); + boolean unknownLargestVariantLength = sampleMetadata.getAttributes() + .getBoolean(SampleIndexSchema.UNKNOWN_LARGEST_VARIANT_LENGTH); + boolean updateLargestVariantLength; - if (alreadyLoadedFiles) { - if (actualLargestVariantLength > 0) { - // Already loaded files, with a valid value. Update if needed. - updateLargestVariantLength = largestVariantLength > actualLargestVariantLength; - } else { - // Already loaded files without a valid value. Do not set a value, as it might be smaller than previous files. - updateLargestVariantLength = false; - } + if (isLargestVariantLengthDefined) { + // Update only if the new value is bigger than the current one + updateLargestVariantLength = largestVariantLength > actualLargestVariantLength; + } else if (unknownLargestVariantLength) { + // Already loaded files with unknown largest variant length. Do not update value. + updateLargestVariantLength = false; } else { // First file loaded. Update value updateLargestVariantLength = true; @@ -551,7 +541,8 @@ public URI postLoad(URI input, URI output) throws StorageEngineException { s.setSampleIndexStatus(Status.READY, sampleIndexVersion); } if (updateLargestVariantLength) { - s.getAttributes().put(SampleIndexSchema.LARGEST_VARIANT_LENGTH, largestVariantLength); + int current = s.getAttributes().getInt(SampleIndexSchema.LARGEST_VARIANT_LENGTH, largestVariantLength); + s.getAttributes().put(SampleIndexSchema.LARGEST_VARIANT_LENGTH, Math.max(current, largestVariantLength)); } }); } diff --git a/opencga-storage/opencga-storage-hadoop/opencga-storage-hadoop-core/src/main/java/org/opencb/opencga/storage/hadoop/variant/index/sample/SampleIndexQueryParser.java b/opencga-storage/opencga-storage-hadoop/opencga-storage-hadoop-core/src/main/java/org/opencb/opencga/storage/hadoop/variant/index/sample/SampleIndexQueryParser.java index 3731d3ff6f4..2856385c571 100644 --- a/opencga-storage/opencga-storage-hadoop/opencga-storage-hadoop-core/src/main/java/org/opencb/opencga/storage/hadoop/variant/index/sample/SampleIndexQueryParser.java +++ b/opencga-storage/opencga-storage-hadoop/opencga-storage-hadoop-core/src/main/java/org/opencb/opencga/storage/hadoop/variant/index/sample/SampleIndexQueryParser.java @@ -535,8 +535,12 @@ public SampleIndexQuery parse(Query query) { int extendedFilteringRegion = 0; for (String sample : sampleGenotypeQuery.keySet()) { SampleMetadata sampleMetadata = getSampleMetadata(sampleMetadatas, sample, studyId); - extendedFilteringRegion = Math.max(extendedFilteringRegion, sampleMetadata.getAttributes() - .getInt(SampleIndexSchema.LARGEST_VARIANT_LENGTH, -1)); + if (sampleMetadata.getAttributes().getBoolean(SampleIndexSchema.UNKNOWN_LARGEST_VARIANT_LENGTH)) { + extendedFilteringRegion = extendedFilteringRegionDefault; + } else { + extendedFilteringRegion = Math.max(extendedFilteringRegion, sampleMetadata.getAttributes() + .getInt(SampleIndexSchema.LARGEST_VARIANT_LENGTH, -1)); + } } if (extendedFilteringRegion <= 0) { extendedFilteringRegion = extendedFilteringRegionDefault; diff --git a/opencga-storage/opencga-storage-hadoop/opencga-storage-hadoop-core/src/main/java/org/opencb/opencga/storage/hadoop/variant/index/sample/SampleIndexSchema.java b/opencga-storage/opencga-storage-hadoop/opencga-storage-hadoop-core/src/main/java/org/opencb/opencga/storage/hadoop/variant/index/sample/SampleIndexSchema.java index d050421a160..273ad40ae0d 100644 --- a/opencga-storage/opencga-storage-hadoop/opencga-storage-hadoop-core/src/main/java/org/opencb/opencga/storage/hadoop/variant/index/sample/SampleIndexSchema.java +++ b/opencga-storage/opencga-storage-hadoop/opencga-storage-hadoop-core/src/main/java/org/opencb/opencga/storage/hadoop/variant/index/sample/SampleIndexSchema.java @@ -118,6 +118,12 @@ public final class SampleIndexSchema { static final String ANNOTATION_CLINICAL_PREFIX = META_PREFIX + "CL_"; static final byte[] ANNOTATION_CLINICAL_PREFIX_BYTES = Bytes.toBytes(ANNOTATION_CLINICAL_PREFIX); + /** + * The largestVariantLength might be unknown if the sample was loaded before this field was added. + * In that case, a default value for the largestVariantLength will be used. + * See HadoopVariantStorageOptions.SAMPLE_INDEX_QUERY_EXTENDED_REGION_FILTER + */ + public static final String UNKNOWN_LARGEST_VARIANT_LENGTH = "unknownLargestVariantLength"; public static final String LARGEST_VARIANT_LENGTH = "largestVariantLength"; private final int version; diff --git a/opencga-storage/opencga-storage-hadoop/opencga-storage-hadoop-core/src/test/java/org/opencb/opencga/storage/hadoop/variant/HadoopVariantStorageEngineSplitDataTest.java b/opencga-storage/opencga-storage-hadoop/opencga-storage-hadoop-core/src/test/java/org/opencb/opencga/storage/hadoop/variant/HadoopVariantStorageEngineSplitDataTest.java index 5d77e7dc375..3612a34406b 100644 --- a/opencga-storage/opencga-storage-hadoop/opencga-storage-hadoop-core/src/test/java/org/opencb/opencga/storage/hadoop/variant/HadoopVariantStorageEngineSplitDataTest.java +++ b/opencga-storage/opencga-storage-hadoop/opencga-storage-hadoop-core/src/test/java/org/opencb/opencga/storage/hadoop/variant/HadoopVariantStorageEngineSplitDataTest.java @@ -31,6 +31,7 @@ import org.opencb.opencga.storage.hadoop.variant.adaptors.VariantHadoopDBAdaptor; import org.opencb.opencga.storage.hadoop.variant.index.sample.SampleIndexDBAdaptor; import org.opencb.opencga.storage.hadoop.variant.index.sample.SampleIndexEntry; +import org.opencb.opencga.storage.hadoop.variant.index.sample.SampleIndexSchema; import java.net.URI; import java.nio.file.Paths; @@ -134,16 +135,31 @@ public void testMultiChromosomeSplitDataVirtualFile() throws Exception { variantStorageEngine.getOptions().put(VariantStorageOptions.STUDY.key(), STUDY_NAME); variantStorageEngine.getOptions().put(VariantStorageOptions.LOAD_SPLIT_DATA.key(), VariantStorageEngine.SplitData.CHROMOSOME); variantStorageEngine.getOptions().put(VariantStorageOptions.LOAD_VIRTUAL_FILE.key(), "virtual-variant-test-file.vcf"); + + int studyId = variantStorageEngine.getMetadataManager().createStudy(STUDY_NAME).getId(); + int sampleId = variantStorageEngine.getMetadataManager().registerSamples(studyId, Collections.singletonList("NA19660")).get(0); + // Mark one random sample as having unknown largest variant size + // Ensure that the largest variant size is not updated + variantStorageEngine.getMetadataManager().updateSampleMetadata(studyId, sampleId, sampleMetadata -> { + sampleMetadata.getAttributes().put(SampleIndexSchema.UNKNOWN_LARGEST_VARIANT_LENGTH, true); + }); + variantStorageEngine.index(Collections.singletonList(getResourceUri("by_chr/chr20.variant-test-file.vcf.gz")), outputUri, true, true, true); VariantStorageMetadataManager mm = variantStorageEngine.getMetadataManager(); - int studyId = mm.getStudyId(STUDY_NAME); for (String sample : SAMPLES) { SampleMetadata sampleMetadata = mm.getSampleMetadata(studyId, mm.getSampleId(studyId, sample)); assertEquals(TaskMetadata.Status.READY, sampleMetadata.getIndexStatus()); assertEquals(TaskMetadata.Status.NONE, sampleMetadata.getAnnotationStatus()); assertEquals(TaskMetadata.Status.NONE, sampleMetadata.getSampleIndexAnnotationStatus(1)); + if (sampleId == sampleMetadata.getId()) { + assertFalse(sample, sampleMetadata.getAttributes().containsKey(SampleIndexSchema.LARGEST_VARIANT_LENGTH)); + assertTrue(sample, sampleMetadata.getAttributes().getBoolean(SampleIndexSchema.UNKNOWN_LARGEST_VARIANT_LENGTH)); + } else { + assertNotEquals(sample, -1, sampleMetadata.getAttributes().getInt(SampleIndexSchema.LARGEST_VARIANT_LENGTH, -1)); + assertFalse(sample, sampleMetadata.getAttributes().getBoolean(SampleIndexSchema.UNKNOWN_LARGEST_VARIANT_LENGTH)); + } } variantStorageEngine.annotate(outputUri, new QueryOptions()); @@ -174,6 +190,11 @@ public void testMultiChromosomeSplitDataVirtualFile() throws Exception { assertEquals(TaskMetadata.Status.READY, sampleMetadata.getSampleIndexAnnotationStatus(1)); } + // Revert the unknown largest variant size + // Ensure that the largest variant size is now updated + variantStorageEngine.getMetadataManager().updateSampleMetadata(studyId, sampleId, sampleMetadata -> { + sampleMetadata.getAttributes().put(SampleIndexSchema.UNKNOWN_LARGEST_VARIANT_LENGTH, false); + }); variantStorageEngine.getOptions().put(VariantStorageOptions.STUDY.key(), STUDY_NAME); variantStorageEngine.getOptions().put(VariantStorageOptions.LOAD_SPLIT_DATA.key(), VariantStorageEngine.SplitData.CHROMOSOME); @@ -181,6 +202,16 @@ public void testMultiChromosomeSplitDataVirtualFile() throws Exception { variantStorageEngine.index(Collections.singletonList(getResourceUri("by_chr/chr22.variant-test-file.vcf.gz")), outputUri); + for (String sample : SAMPLES) { + SampleMetadata sampleMetadata = mm.getSampleMetadata(studyId, mm.getSampleId(studyId, sample)); + assertEquals(TaskMetadata.Status.READY, sampleMetadata.getIndexStatus()); + assertEquals(TaskMetadata.Status.NONE, sampleMetadata.getAnnotationStatus()); + assertEquals(TaskMetadata.Status.NONE, sampleMetadata.getSampleIndexAnnotationStatus(1)); + + assertNotEquals(sample, -1, sampleMetadata.getAttributes().getInt(SampleIndexSchema.LARGEST_VARIANT_LENGTH, -1)); + assertFalse(sample, sampleMetadata.getAttributes().getBoolean(SampleIndexSchema.UNKNOWN_LARGEST_VARIANT_LENGTH)); + } + for (Variant variant : variantStorageEngine.iterable(new Query(VariantQueryParam.INCLUDE_SAMPLE.key(), ParamConstants.ALL), null)) { String expectedFile = "virtual-variant-test-file.vcf"; assertEquals(1, variant.getStudies().get(0).getFiles().size()); From aacff15c8bbfbd6169d8b64b06c2b517581789b5 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Joaqu=C3=ADn=20T=C3=A1rraga=20Gim=C3=A9nez?= Date: Thu, 28 Sep 2023 16:20:57 +0200 Subject: [PATCH 20/50] app: update opencga-ext-tools dockerfile, #TASK-5038 --- opencga-app/app/cloud/docker/opencga-ext-tools/Dockerfile | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/opencga-app/app/cloud/docker/opencga-ext-tools/Dockerfile b/opencga-app/app/cloud/docker/opencga-ext-tools/Dockerfile index ab1d4e8d09f..ae19794e7fb 100644 --- a/opencga-app/app/cloud/docker/opencga-ext-tools/Dockerfile +++ b/opencga-app/app/cloud/docker/opencga-ext-tools/Dockerfile @@ -17,8 +17,9 @@ RUN apt-get update -y && DEBIAN_FRONTEND="noninteractive" TZ="Europe/London" apt ## Installation dependencies using R install.packages() is slower than apt-get but final size is 400GB smaller. R -e "install.packages(c('BiocManager', 'RCircos', 'nnls', 'ggplot2', 'jsonlite', 'optparse', 'knitr', 'configr', 'dplyr', 'rmarkdown', 'tidyr', 'httr', 'kinship2', 'limSolve'))" && \ R -e "BiocManager::install('BiocStyle')" && \ + R -e "BiocManager::install('BSgenome.Hsapiens.UCSC.hg38')" && \ ## signature.tools.lib installation \ - R -e 'install.packages(c("devtools", "getopt"), repos="https://www.stats.bris.ac.uk/R/")' && \ + R -e 'install.packages(c("devtools", "getopt"), repos=c("http://cran.rstudio.com/", "https://www.stats.bris.ac.uk/R/"))' && \ git clone https://github.com/Nik-Zainal-Group/signature.tools.lib.git /opt/opencga/signature.tools.lib WORKDIR /opt/opencga/signature.tools.lib From d420a45c6c28671423a621e2e598c31b5004884d Mon Sep 17 00:00:00 2001 From: pfurio Date: Mon, 2 Oct 2023 11:44:51 +0200 Subject: [PATCH 21/50] catalog: fix junit test, #TASK-5083 --- .../opencga/catalog/managers/SampleManagerTest.java | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/opencga-catalog/src/test/java/org/opencb/opencga/catalog/managers/SampleManagerTest.java b/opencga-catalog/src/test/java/org/opencb/opencga/catalog/managers/SampleManagerTest.java index 24c94481fe6..482db523400 100644 --- a/opencga-catalog/src/test/java/org/opencb/opencga/catalog/managers/SampleManagerTest.java +++ b/opencga-catalog/src/test/java/org/opencb/opencga/catalog/managers/SampleManagerTest.java @@ -2777,7 +2777,9 @@ public void deleteInUseInCATest() throws CatalogException { catalogManager.getSampleManager().delete(studyFqn, Collections.singletonList(case1.getProband().getSamples().get(0).getId()), new QueryOptions(ParamConstants.FORCE, true), token); } catch (CatalogException e) { - assertTrue(e.getMessage().contains("in use in 3 cases")); + if (!e.getMessage().contains("in use in 3 cases")) { + fail("Expected CatalogException with message containing 'in use in 3 cases. - Actual error msg: " + e.getMessage()); + } } // unlock case3 @@ -2788,7 +2790,9 @@ public void deleteInUseInCATest() throws CatalogException { catalogManager.getSampleManager().delete(studyFqn, Collections.singletonList(case1.getProband().getSamples().get(0).getId()), new QueryOptions(ParamConstants.FORCE, false), token); } catch (CatalogException e) { - assertTrue(e.getMessage().contains("in use in 3 cases")); + if (!e.getMessage().contains("associated with individual")) { + fail("Expected CatalogException with message containing 'associated with individual'. - Actual error msg: " + e.getMessage()); + } } } From 2d6366bab70f29b067a17c44e90ae12d375438a6 Mon Sep 17 00:00:00 2001 From: pfurio Date: Mon, 2 Oct 2023 11:54:26 +0200 Subject: [PATCH 22/50] catalog: change fail for MatcherAssert, #TASK-5083 --- .../opencga/catalog/managers/SampleManagerTest.java | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) diff --git a/opencga-catalog/src/test/java/org/opencb/opencga/catalog/managers/SampleManagerTest.java b/opencga-catalog/src/test/java/org/opencb/opencga/catalog/managers/SampleManagerTest.java index 482db523400..e9134475dd7 100644 --- a/opencga-catalog/src/test/java/org/opencb/opencga/catalog/managers/SampleManagerTest.java +++ b/opencga-catalog/src/test/java/org/opencb/opencga/catalog/managers/SampleManagerTest.java @@ -20,8 +20,11 @@ import com.fasterxml.jackson.databind.ObjectMapper; import org.apache.commons.lang3.RandomStringUtils; import org.bson.Document; +import org.hamcrest.CoreMatchers; +import org.hamcrest.MatcherAssert; import org.junit.Test; import org.junit.experimental.categories.Category; +import org.junit.internal.matchers.ThrowableMessageMatcher; import org.opencb.biodata.models.clinical.Disorder; import org.opencb.biodata.models.clinical.Phenotype; import org.opencb.biodata.models.clinical.qc.SampleQcVariantStats; @@ -2776,10 +2779,9 @@ public void deleteInUseInCATest() throws CatalogException { try { catalogManager.getSampleManager().delete(studyFqn, Collections.singletonList(case1.getProband().getSamples().get(0).getId()), new QueryOptions(ParamConstants.FORCE, true), token); + fail("Expected CatalogException with message containing 'in use in 3 cases'"); } catch (CatalogException e) { - if (!e.getMessage().contains("in use in 3 cases")) { - fail("Expected CatalogException with message containing 'in use in 3 cases. - Actual error msg: " + e.getMessage()); - } + MatcherAssert.assertThat(e, ThrowableMessageMatcher.hasMessage(CoreMatchers.containsString("in use in 3 cases"))); } // unlock case3 @@ -2789,10 +2791,9 @@ public void deleteInUseInCATest() throws CatalogException { try { catalogManager.getSampleManager().delete(studyFqn, Collections.singletonList(case1.getProband().getSamples().get(0).getId()), new QueryOptions(ParamConstants.FORCE, false), token); + fail("Expected CatalogException with message containing 'associated with individual'."); } catch (CatalogException e) { - if (!e.getMessage().contains("associated with individual")) { - fail("Expected CatalogException with message containing 'associated with individual'. - Actual error msg: " + e.getMessage()); - } + MatcherAssert.assertThat(e, ThrowableMessageMatcher.hasMessage(CoreMatchers.containsString("associated with individual"))); } } From cb4d77b1d97b7d0e729d6812925aecd0be1d29f1 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Joaqu=C3=ADn=20T=C3=A1rraga=20Gim=C3=A9nez?= Date: Mon, 2 Oct 2023 18:43:21 +0200 Subject: [PATCH 23/50] migration: update pedigree graph migration, #TASK-4770 --- .../CalculatePedigreeGraphMigration.java | 23 +++++++++++++++---- 1 file changed, 19 insertions(+), 4 deletions(-) diff --git a/opencga-app/src/main/java/org/opencb/opencga/app/migrations/v2_8_0/catalog/CalculatePedigreeGraphMigration.java b/opencga-app/src/main/java/org/opencb/opencga/app/migrations/v2_8_0/catalog/CalculatePedigreeGraphMigration.java index 7107ae0a919..6ff2cc5bff5 100644 --- a/opencga-app/src/main/java/org/opencb/opencga/app/migrations/v2_8_0/catalog/CalculatePedigreeGraphMigration.java +++ b/opencga-app/src/main/java/org/opencb/opencga/app/migrations/v2_8_0/catalog/CalculatePedigreeGraphMigration.java @@ -34,14 +34,28 @@ public class CalculatePedigreeGraphMigration extends MigrationTool { protected void run() throws Exception { MigrationRun migrationRun = getMigrationRun(); + // Map study studyFqn -> job Map jobs = new HashMap<>(); for (JobReferenceParam jobReference : migrationRun.getJobs()) { Job job = catalogManager.getJobManager().get(jobReference.getStudyId(), jobReference.getId(), new QueryOptions(), token) .first(); - logger.info("Registering job {} for study {} to migrate", job.getId(), job.getStudy().getId()); + logger.info("Reading already executed job '{}' for study '{}' with status '{}'", + job.getId(), + job.getStudy().getId(), + job.getInternal().getStatus().getId()); jobs.put(job.getStudy().getId(), job); } - for (String study : getStudies()) { + + Set studies = new LinkedHashSet<>(getStudies()); + logger.info("Study IDs (num. total = {}) to initialize pedigree graphs: {}", studies.size(), StringUtils.join(studies, ", ")); + + // Ensure that studies with already executed jobs are included in the migration run + getMigrationRun().getJobs().forEach(j -> studies.add(j.getStudyId())); + + logger.info("Study IDs (num. total = {}) after adding studies from migration jobs: {}", studies.size(), + StringUtils.join(studies, ", ")); + + for (String study : studies) { Job job = jobs.get(study); if (job != null) { String status = job.getInternal().getStatus().getId(); @@ -61,8 +75,9 @@ protected void run() throws Exception { logger.info("Adding new job to migrate/initialize pedigree graph for study {}", study); ObjectMap params = new ObjectMap() .append(ParamConstants.STUDY_PARAM, study); - getMigrationRun().addJob(catalogManager.getJobManager().submit(study, PedigreeGraphInitAnalysis.ID, Enums.Priority.MEDIUM, - params, null, null, null, new ArrayList<>(), token).first()); + Job newJob = catalogManager.getJobManager().submit(study, PedigreeGraphInitAnalysis.ID, Enums.Priority.MEDIUM, + params, null, null, null, new ArrayList<>(), token).first(); + getMigrationRun().addJob(newJob); } } From 50dd3512ba3c963f374003b2813d0f6358d044d9 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jacobo=20Coll=20Morag=C3=B3n?= Date: Tue, 3 Oct 2023 11:53:51 +0100 Subject: [PATCH 24/50] app: Fix CLI Generators to correctly call extended commands. #TASK-4889 --- .../custom/CustomFilesCommandExecutor.java | 3 +- .../custom/CustomJobsCommandExecutor.java | 23 ++-- .../custom/CustomStudiesCommandExecutor.java | 24 ++-- .../custom/CustomUsersCommandExecutor.java | 16 ++- .../generator/ClientsGeneratorMain.java | 1 + .../generator/config/CategoryConfig.java | 17 +++ .../writers/ParentClientRestApiWriter.java | 60 +++++++- .../cli/ExecutorsCliRestApiWriter.java | 128 +++++++++--------- .../writers/cli/OptionsCliRestApiWriter.java | 15 +- .../writers/cli/ParserCliRestApiWriter.java | 10 +- .../src/main/resources/cli-config.yaml | 4 + 11 files changed, 186 insertions(+), 115 deletions(-) diff --git a/opencga-app/src/main/java/org/opencb/opencga/app/cli/main/custom/CustomFilesCommandExecutor.java b/opencga-app/src/main/java/org/opencb/opencga/app/cli/main/custom/CustomFilesCommandExecutor.java index 5f245961409..39baa4b29e5 100644 --- a/opencga-app/src/main/java/org/opencb/opencga/app/cli/main/custom/CustomFilesCommandExecutor.java +++ b/opencga-app/src/main/java/org/opencb/opencga/app/cli/main/custom/CustomFilesCommandExecutor.java @@ -17,7 +17,6 @@ import org.opencb.commons.datastore.core.ObjectMap; import org.opencb.opencga.app.cli.session.SessionManager; -import org.opencb.opencga.catalog.utils.ParamUtils; import org.opencb.opencga.client.config.ClientConfiguration; import org.opencb.opencga.client.rest.OpenCGAClient; import org.opencb.opencga.core.models.file.File; @@ -36,7 +35,7 @@ public CustomFilesCommandExecutor(ObjectMap options, String token, ClientConfigu super(options, token, clientConfiguration, session, appHome, logger, openCGAClient); } - public RestResponse upload() throws Exception { + public RestResponse upload(CustomFilesCommandOptions.UploadCommandOptions commandOptions) throws Exception { // ObjectMap params = new ObjectMap() options.append("fileFormat", options.getString("fileFormat", File.Format.UNKNOWN.toString())) .append("bioformat", options.getString("bioformat", File.Bioformat.UNKNOWN.toString())); diff --git a/opencga-app/src/main/java/org/opencb/opencga/app/cli/main/custom/CustomJobsCommandExecutor.java b/opencga-app/src/main/java/org/opencb/opencga/app/cli/main/custom/CustomJobsCommandExecutor.java index 8d5742e09ec..dffedddcab4 100644 --- a/opencga-app/src/main/java/org/opencb/opencga/app/cli/main/custom/CustomJobsCommandExecutor.java +++ b/opencga-app/src/main/java/org/opencb/opencga/app/cli/main/custom/CustomJobsCommandExecutor.java @@ -17,6 +17,8 @@ import org.opencb.commons.datastore.core.ObjectMap; import org.opencb.commons.datastore.core.Query; +import org.opencb.opencga.app.cli.main.options.JobsCommandOptions; +import org.opencb.opencga.app.cli.main.utils.JobsLog; import org.opencb.opencga.app.cli.main.utils.JobsTopManager; import org.opencb.opencga.app.cli.session.SessionManager; import org.opencb.opencga.catalog.db.api.JobDBAdaptor; @@ -40,27 +42,26 @@ public CustomJobsCommandExecutor(ObjectMap options, String token, ClientConfigur super(options, token, clientConfiguration, session, appHome, logger, openCGAClient); } - public RestResponse top() throws Exception { + public RestResponse top(CustomJobsCommandOptions.TopCommandOptions c) throws Exception { Query query = new Query(); - query.putIfNotEmpty(JobDBAdaptor.QueryParams.STUDY.key(), String.valueOf(options.get("study"))); - query.putIfNotEmpty(ParamConstants.JOB_TOOL_ID_PARAM, String.valueOf(options.get("toolId"))); - query.putIfNotEmpty(ParamConstants.INTERNAL_STATUS_PARAM, String.valueOf(options.get("internalStatus"))); - query.putIfNotEmpty(ParamConstants.JOB_USER_PARAM, String.valueOf(options.get("userId"))); - query.putIfNotEmpty(ParamConstants.JOB_PRIORITY_PARAM, String.valueOf(options.get("priority"))); - query.putAll(options); + query.putIfNotEmpty(JobDBAdaptor.QueryParams.STUDY.key(), c.study); + query.putIfNotEmpty(ParamConstants.JOB_TOOL_ID_PARAM, c.toolId); + query.putIfNotEmpty(ParamConstants.INTERNAL_STATUS_PARAM, c.internalStatus); + query.putIfNotEmpty(ParamConstants.JOB_USER_PARAM, c.userId); + query.putIfNotEmpty(ParamConstants.JOB_PRIORITY_PARAM, c.priority); + query.putAll(c.commonOptions.params); - new JobsTopManager(openCGAClient, query, 2, 20, 2, false).run(); + new JobsTopManager(openCGAClient, query, c.iterations, c.jobsLimit, c.delay, c.plain, c.columns).run(); RestResponse res = new RestResponse<>(); res.setType(QueryType.VOID); return res; } -/* + public RestResponse log(JobsCommandOptions.LogCommandOptions c) throws Exception { - // JobsCommandOptions.LogCommandOptions c = jobsCommandOptions.logCommandOptions; new JobsLog(openCGAClient, c, System.out).run(); RestResponse res = new RestResponse<>(); res.setType(QueryType.VOID); return res; } -*/ + } diff --git a/opencga-app/src/main/java/org/opencb/opencga/app/cli/main/custom/CustomStudiesCommandExecutor.java b/opencga-app/src/main/java/org/opencb/opencga/app/cli/main/custom/CustomStudiesCommandExecutor.java index 102a2b99255..a7ffdc3633b 100644 --- a/opencga-app/src/main/java/org/opencb/opencga/app/cli/main/custom/CustomStudiesCommandExecutor.java +++ b/opencga-app/src/main/java/org/opencb/opencga/app/cli/main/custom/CustomStudiesCommandExecutor.java @@ -51,29 +51,25 @@ public CustomStudiesCommandExecutor(ObjectMap options, String token, ClientConfi super(options, token, clientConfiguration, session, appHome, logger, openCGAClient); } - public RestResponse runTemplates() throws Exception { + public RestResponse runTemplates(CustomStudiesCommandOptions.RunTemplatesCommandOptions c) throws Exception { logger.debug("Run template"); - // StudiesCommandOptions.RunTemplatesCommandOptions c = studiesCommandOptions.runTemplatesCommandOptions; - String study = getSingleValidStudy(String.valueOf(options.get("study"))); - TemplateParams templateParams = new TemplateParams(String.valueOf(options.get("id")), - Boolean.parseBoolean(String.valueOf(options.get("overwrite"))), - Boolean.parseBoolean(String.valueOf(options.get("resume")))); + String study = getSingleValidStudy(c.study); + TemplateParams templateParams = new TemplateParams(c.id, c.overwrite, c.resume); ObjectMap params = new ObjectMap(); return openCGAClient.getStudyClient().runTemplates(study, templateParams, params); } - public RestResponse uploadTemplates() throws Exception { + public RestResponse uploadTemplates(CustomStudiesCommandOptions.UploadTemplatesCommandOptions c) throws Exception { logger.debug("Upload template file"); - // StudiesCommandOptions.UploadTemplatesCommandOptions c = studiesCommandOptions.uploadTemplatesCommandOptions; ObjectMap params = new ObjectMap(); - String study = getSingleValidStudy(String.valueOf(options.get("study"))); - Path path = Paths.get(String.valueOf(options.get("inputFile"))); + String study = c.study = getSingleValidStudy(c.study); + Path path = Paths.get(c.file); if (!path.toFile().exists()) { - throw new CatalogException("File '" + options.get("inputFile") + "' not found"); + throw new CatalogException("File '" + path + "' not found"); } IOManagerFactory ioManagerFactory = new IOManagerFactory(); IOManager ioManager = ioManagerFactory.get(path.toUri()); @@ -106,10 +102,10 @@ public FileVisitResult visitFile(URI fileUri, BasicFileAttributes attrs) throws logger.debug("Compressing file in '" + manifestPath + "' before uploading"); ioManager.zip(fileList, manifestPath.toFile()); params.put("file", manifestPath.toString()); - } else if (String.valueOf(options.get("inputFile")).endsWith("zip")) { - params.put("file", String.valueOf(options.get("inputFile"))); + } else if (c.file.endsWith("zip")) { + params.put("file", c.file); } else { - throw new CatalogException("File '" + options.get("inputFile") + "' is not a zip file"); + throw new CatalogException("File '" + c.file + "' is not a zip file"); } RestResponse uploadResponse = openCGAClient.getStudyClient().uploadTemplates(study, params); diff --git a/opencga-app/src/main/java/org/opencb/opencga/app/cli/main/custom/CustomUsersCommandExecutor.java b/opencga-app/src/main/java/org/opencb/opencga/app/cli/main/custom/CustomUsersCommandExecutor.java index eab222ebc45..7cac620fdc3 100644 --- a/opencga-app/src/main/java/org/opencb/opencga/app/cli/main/custom/CustomUsersCommandExecutor.java +++ b/opencga-app/src/main/java/org/opencb/opencga/app/cli/main/custom/CustomUsersCommandExecutor.java @@ -50,18 +50,19 @@ public CustomUsersCommandExecutor(ObjectMap options, String token, ClientConfigu super(options, token, clientConfiguration, session, appHome, logger, openCGAClient); } - public RestResponse login() throws Exception { + public RestResponse login(CustomUsersCommandOptions.LoginCommandOptions commandOptions) throws Exception { logger.debug("Login"); RestResponse res = new RestResponse<>(); try { - String user = String.valueOf(options.get("user")); - String password = String.valueOf(options.get("password")); + String user = commandOptions.user; + String password = commandOptions.password; if (StringUtils.isNotEmpty(user) && StringUtils.isNotEmpty(password)) { AuthenticationResponse response = null; try { response = openCGAClient.login(user, password); } catch (Exception e) { + logger.debug("Login error", e); Event event = new Event(); event.setMessage(e.getMessage()); event.setType(Event.Type.ERROR); @@ -73,16 +74,16 @@ public RestResponse login() throws Exception { res = session.saveSession(user, response, openCGAClient); println(getKeyValueAsFormattedString(LOGIN_OK, user)); } else { - String sessionId = String.valueOf(options.get("token")); + String token = session.getSession().getToken(); String errorMsg = "Missing password. "; - if (StringUtils.isNotEmpty(sessionId)) { + if (StringUtils.isNotEmpty(token)) { errorMsg += "Active token detected "; } CommandLineUtils.error(errorMsg); } } catch (Exception e) { CommandLineUtils.error(LOGIN_ERROR, e); - e.printStackTrace(); + logger.debug("Login error", e); Event event = new Event(); event.setMessage(LOGIN_ERROR + e.getMessage()); res.setType(QueryType.VOID); @@ -93,7 +94,7 @@ public RestResponse login() throws Exception { } - public RestResponse logout() throws IOException { + public RestResponse logout(CustomUsersCommandOptions.LogoutCommandOptions commandOptions) throws IOException { logger.debug("Logout"); RestResponse res = new RestResponse<>(); try { @@ -106,6 +107,7 @@ public RestResponse logout() throws IOException { res.setType(QueryType.VOID); } catch (Exception e) { CommandLineUtils.error("Logout fail", e); + logger.debug("Logout error", e); } return res; } diff --git a/opencga-server/src/main/java/org/opencb/opencga/server/generator/ClientsGeneratorMain.java b/opencga-server/src/main/java/org/opencb/opencga/server/generator/ClientsGeneratorMain.java index d814ac76f1b..74874049837 100644 --- a/opencga-server/src/main/java/org/opencb/opencga/server/generator/ClientsGeneratorMain.java +++ b/opencga-server/src/main/java/org/opencb/opencga/server/generator/ClientsGeneratorMain.java @@ -70,6 +70,7 @@ public static void main(String[] args) throws URISyntaxException { clientsGenerator.cli(flatRestApi); } catch (Exception e) { logger.error(e.getMessage(), e); + System.exit(1); } } diff --git a/opencga-server/src/main/java/org/opencb/opencga/server/generator/config/CategoryConfig.java b/opencga-server/src/main/java/org/opencb/opencga/server/generator/config/CategoryConfig.java index 96b13ca4292..ea7f6fe917b 100644 --- a/opencga-server/src/main/java/org/opencb/opencga/server/generator/config/CategoryConfig.java +++ b/opencga-server/src/main/java/org/opencb/opencga/server/generator/config/CategoryConfig.java @@ -1,6 +1,8 @@ package org.opencb.opencga.server.generator.config; +import java.util.Collections; import java.util.List; +import java.util.stream.Collectors; public class CategoryConfig { @@ -186,6 +188,21 @@ public boolean isAvailableCommand(String commandName) { return true; } + public Command getCommandOrFail(String commandName) { + Command command = getCommand(commandName); + if (command == null) { + List availableCommands; + if (commands == null) { + availableCommands = Collections.emptyList(); + } else { + availableCommands = commands.stream().map(Command::getName).collect(Collectors.toList()); + } + throw new IllegalArgumentException("Command '" + commandName + "' not found. Given category '" + name + "'" + + ", available sub-commands are: " + availableCommands + "."); + } + return command; + } + public Command getCommand(String commandName) { if (commands != null) { for (Command cmd : commands) { diff --git a/opencga-server/src/main/java/org/opencb/opencga/server/generator/writers/ParentClientRestApiWriter.java b/opencga-server/src/main/java/org/opencb/opencga/server/generator/writers/ParentClientRestApiWriter.java index 2ac80dfd288..51620ee3d15 100644 --- a/opencga-server/src/main/java/org/opencb/opencga/server/generator/writers/ParentClientRestApiWriter.java +++ b/opencga-server/src/main/java/org/opencb/opencga/server/generator/writers/ParentClientRestApiWriter.java @@ -18,6 +18,7 @@ import org.apache.commons.lang3.StringUtils; import org.opencb.opencga.server.generator.config.CategoryConfig; +import org.opencb.opencga.server.generator.config.Command; import org.opencb.opencga.server.generator.config.CommandLineConfiguration; import org.opencb.opencga.server.generator.models.RestApi; import org.opencb.opencga.server.generator.models.RestCategory; @@ -186,8 +187,6 @@ public static String getCommandName(RestCategory restCategory, RestEndpoint rest } protected static String getMethodName(RestCategory restCategory, RestEndpoint restEndpoint) { - - String methodName = ""; String subpath = restEndpoint.getPath().replace(restCategory.getPath() + "/", ""); return getMethodName(subpath); } @@ -296,4 +295,61 @@ public boolean isValidMap(RestParameter bodyRestParameter) { || "java.util.Map".equals(bodyRestParameter.getGenericType()) || "java.util.Map".equals(bodyRestParameter.getGenericType()); } + + protected String getExecutorVarName(RestCategory restCategory) { + return "custom" + getAsClassName(restCategory.getName()) + "CommandExecutor"; + } + + protected String getExecutorClassName(RestCategory restCategory, CategoryConfig categoryConfig, String commandName) { + String executorClassName; + Command command = categoryConfig.getCommandOrFail(commandName); + if (StringUtils.isNotEmpty(command.getExecutorExtendedClassName())) { + executorClassName = command.getExecutorExtendedClassName(); + } else { + executorClassName = "Custom" + getAsClassName(restCategory.getName()) + "CommandExecutor"; + } + return executorClassName; + } + + protected String getCommandOptionsClassName(RestCategory restCategory, CategoryConfig categoryConfig, String commandName) { + String commandOptionsClassName; + if (categoryConfig.isExtendedOptionCommand(commandName)) { + commandOptionsClassName = "Custom" + getAsClassName(restCategory.getName()) + "CommandOptions"; + } else { + commandOptionsClassName = getAsClassName(restCategory.getName()) + "CommandOptions"; + } + return commandOptionsClassName; + } + + protected String getCommandOptionsClassName(RestCategory restCategory) { + return getAsClassName(restCategory.getName()) + "CommandOptions"; + } + + protected String getSubCommandOptionsClassName(CategoryConfig categoryConfig, String commandName) { +// String methodName = getJavaMethodName(categoryConfig, commandName); + String methodName = getAsCamelCase(commandName); + String subCommandOptionsClassName = getAsClassName(methodName + "CommandOptions"); + return subCommandOptionsClassName; + } + + protected String getCommandOptionsVarName(RestCategory restCategory) { + return getAsVariableName(getAsCamelCase(restCategory.getName())) + "CommandOptions"; + } + + protected String getSubCommandOptionsVarName(CategoryConfig categoryConfig, String commandName) { +// String methodName = getJavaMethodName(categoryConfig, commandName); + String methodName = getAsCamelCase(commandName); + return methodName + "CommandOptions"; + } + + protected String getJavaMethodName(CategoryConfig config, String commandName) { + Command command = config.getCommand(commandName); + String commandMethod; + if (command != null && StringUtils.isNotEmpty(command.getRename())) { + commandMethod = command.getRename(); + } else { + commandMethod = getAsCamelCase(commandName); + } + return commandMethod; + } } diff --git a/opencga-server/src/main/java/org/opencb/opencga/server/generator/writers/cli/ExecutorsCliRestApiWriter.java b/opencga-server/src/main/java/org/opencb/opencga/server/generator/writers/cli/ExecutorsCliRestApiWriter.java index f75776a7dfa..d0c830abd3d 100644 --- a/opencga-server/src/main/java/org/opencb/opencga/server/generator/writers/cli/ExecutorsCliRestApiWriter.java +++ b/opencga-server/src/main/java/org/opencb/opencga/server/generator/writers/cli/ExecutorsCliRestApiWriter.java @@ -31,7 +31,6 @@ import org.slf4j.Logger; import org.slf4j.LoggerFactory; -import java.text.SimpleDateFormat; import java.util.*; public class ExecutorsCliRestApiWriter extends ParentClientRestApiWriter { @@ -44,48 +43,48 @@ public ExecutorsCliRestApiWriter(RestApi restApi, CommandLineConfiguration confi @Override protected String getClassImports(String key) { - StringBuilder sb = new StringBuilder(); RestCategory restCategory = availableCategories.get(key); CategoryConfig categoryConfig = availableCategoryConfigs.get(key); - SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd"); - sb.append("package ").append(config.getOptions().getExecutorsPackage()).append(";\n\n"); - sb.append("import com.fasterxml.jackson.databind.DeserializationFeature;\n"); +// SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd"); + Set imports = new TreeSet<>(); + imports.add("com.fasterxml.jackson.databind.DeserializationFeature"); if (StringUtils.isEmpty(config.getApiConfig().getExecutorsParentClass())) { - sb.append("import org.opencb.opencga.app.cli.main.executors.OpencgaCommandExecutor;\n"); + imports.add("org.opencb.opencga.app.cli.main.executors.OpencgaCommandExecutor"); } else { - sb.append("import " + config.getApiConfig().getExecutorsParentClass() + ";\n"); + imports.add(config.getApiConfig().getExecutorsParentClass()); } - sb.append("import org.opencb.opencga.app.cli.main.*;\n"); - sb.append("import org.opencb.opencga.core.response.RestResponse;\n"); - sb.append("import org.opencb.opencga.client.exceptions.ClientException;\n"); - sb.append("import org.opencb.commons.datastore.core.ObjectMap;\n\n"); - sb.append("import org.opencb.opencga.catalog.exceptions.CatalogAuthenticationException;\n"); - sb.append("import org.opencb.opencga.core.common.JacksonUtils;\n\n"); - sb.append("import com.fasterxml.jackson.databind.ObjectMapper;\n"); - sb.append("import java.util.List;\n"); - sb.append("import java.util.HashMap;\n"); - sb.append("import org.opencb.opencga.core.response.QueryType;\n"); - sb.append("import org.opencb.commons.utils.PrintUtils;\n\n"); + imports.add("com.fasterxml.jackson.databind.DeserializationFeature"); + imports.add("org.opencb.opencga.app.cli.main.*"); + imports.add("org.opencb.opencga.core.response.RestResponse"); + imports.add("org.opencb.opencga.client.exceptions.ClientException"); + imports.add("org.opencb.commons.datastore.core.ObjectMap"); + imports.add("org.opencb.opencga.catalog.exceptions.CatalogAuthenticationException"); + imports.add("org.opencb.opencga.core.common.JacksonUtils"); + imports.add("com.fasterxml.jackson.databind.ObjectMapper"); + imports.add("java.util.List"); + imports.add("java.util.HashMap"); + imports.add("org.opencb.opencga.core.response.QueryType"); + imports.add("org.opencb.commons.utils.PrintUtils"); + // Add custom parent class - sb.append("import " + config.getOptions().getOptionsPackage() + "." + getAsClassName(restCategory.getName()) + "CommandOptions;\n\n"); + imports.add(config.getOptions().getOptionsPackage() + "." + getCommandOptionsClassName(restCategory)); if (categoryConfig.isExecutorExtended()) { for (RestEndpoint restEndpoint : restCategory.getEndpoints()) { String commandName = getCommandName(restCategory, restEndpoint); - if (categoryConfig.getCommand(commandName) != null && StringUtils.isNotEmpty(categoryConfig.getCommand(commandName).getExecutorExtendedClassName())) { - sb.append("import " + categoryConfig.getCommand(commandName).getExecutorExtendedClassName() + ";\n"); + Command command = categoryConfig.getCommand(commandName); + if (command != null && StringUtils.isNotEmpty(command.getExecutorExtendedClassName())) { + imports.add(command.getExecutorExtendedClassName()); } else { - sb.append("import org.opencb.opencga.app.cli.main.custom.Custom" + getAsClassName(restCategory.getName()) + "CommandExecutor;\n"); + imports.add("org.opencb.opencga.app.cli.main.custom.Custom" + getAsClassName(restCategory.getName()) + "CommandExecutor"); } if (categoryConfig.isExtendedOptionCommand(commandName)) { - sb.append("import org.opencb.opencga.app.cli.main.custom.Custom" + getAsClassName(restCategory.getName()) + "CommandOptions;\n"); - + imports.add("org.opencb.opencga.app.cli.main.custom.Custom" + getAsClassName(restCategory.getName()) + "CommandOptions"); } } } - Set imports = new TreeSet<>(); for (RestEndpoint restEndpoint : restCategory.getEndpoints()) { if (isValidImport(restEndpoint.getResponseClass())) { imports.add(restEndpoint.getResponseClass().replaceAll("\\$", "\\.")); @@ -99,7 +98,7 @@ protected String getClassImports(String key) { if (bodyParam.isComplex() && !bodyParam.isCollection()) { if (bodyParam.getTypeClass() != null) { if (bodyParam.getTypeClass().contains("$")) { - imports.add(bodyParam.getTypeClass().substring(0, bodyParam.getTypeClass().lastIndexOf("$")) + ";"); + imports.add(bodyParam.getTypeClass().substring(0, bodyParam.getTypeClass().lastIndexOf("$"))); } else { imports.add(bodyParam.getTypeClass().replaceAll("\\$", "\\.")); } @@ -115,8 +114,17 @@ protected String getClassImports(String key) { } } + StringBuilder sb = new StringBuilder(); + sb.append("package ").append(config.getOptions().getExecutorsPackage()).append(";\n\n"); + for (String string : imports) { - sb.append("import ").append(string).append("\n"); + if (string.endsWith(";")) { + string = string.substring(0, string.length() - 1); + if (imports.contains(string)) { + continue; + } + } + sb.append("import ").append(string).append(";\n"); } sb.append("\n"); @@ -170,8 +178,7 @@ protected String getClassHeader(String key) { CategoryConfig config = availableCategoryConfigs.get(key); sb.append("public class " + getAsClassName(restCategory.getName()) + "CommandExecutor extends " + getExtendedClass() + " {\n\n"); - sb.append(" public " + getAsClassName(restCategory.getName()) + "CommandOptions " - + getAsVariableName(getAsCamelCase(restCategory.getName())) + "CommandOptions;\n\n"); + sb.append(" public " + getCommandOptionsClassName(restCategory) + " " + getCommandOptionsVarName(restCategory) + ";\n\n"); sb.append(" public " + getAsClassName(restCategory.getName()) + "CommandExecutor(" + getAsClassName(restCategory.getName()) + "CommandOptions " + getAsVariableName(getAsCamelCase(restCategory.getName())) + "CommandOptions) throws CatalogAuthenticationException {\n"); @@ -203,19 +210,24 @@ private String methodExecute(RestCategory restCategory, CategoryConfig categoryC } // } } - /* if (CollectionUtils.isNotEmpty(categoryConfig.getAddedMethods())) { - for (String methodName : categoryConfig.getAddedMethods()) { - sb.append(" case \"" + methodName + "\":\n"); - if (categoryConfig.getCommand(methodName) != null && StringUtils.isNotEmpty(categoryConfig.getCommand(methodName).getExecutorExtendedClassName())) { - sb.append(" " + categoryConfig.getCommand(methodName).getExecutorExtendedClassName() + " custom" + getAsClassName(restCategory.getName()) + "CommandExecutor = new " + categoryConfig.getCommand(methodName).getExecutorExtendedClassName() + "();\n"); - } else { - sb.append(" Parent" + getAsClassName(restCategory.getName()) + "CommandExecutor custom" + getAsClassName(restCategory.getName()) + "CommandExecutor = new Parent" + getAsClassName(restCategory.getName()) + "CommandExecutor();\n"); + if (CollectionUtils.isNotEmpty(categoryConfig.getAddedMethods())) { + for (String commandName : categoryConfig.getAddedMethods()) { - } - sb.append(" queryResponse = custom" + getAsClassName(restCategory.getName()) + "CommandExecutor." + getAsCamelCase(methodName) + "();\n"); + String executorClassName = getExecutorClassName(restCategory, categoryConfig, commandName); + String executorVarName = getExecutorVarName(restCategory); + String javaMethodName = getJavaMethodName(categoryConfig, commandName); + + String commandOptions = getCommandOptionsVarName(restCategory) + "." + getSubCommandOptionsVarName(categoryConfig, commandName); + String commonOptionsParams = getCommandOptionsVarName(restCategory) + ".commonCommandOptions.params"; + + sb.append(" case \"" + commandName + "\":\n"); + sb.append(" " + executorClassName + " " + executorVarName + " = new " + executorClassName + "(\n"); + sb.append(" new ObjectMap(" + commonOptionsParams + "), token,\n"); + sb.append(" clientConfiguration, getSessionManager(), appHome, getLogger());\n"); + sb.append(" queryResponse = " + executorVarName + "." + javaMethodName + "(" + commandOptions + ");\n"); sb.append(" break;\n"); } - }*/ + } sb.append(" default:\n"); sb.append(" logger.error(\"Subcommand not valid\");\n"); sb.append(" break;\n"); @@ -243,19 +255,14 @@ protected String getClassMethods(String key) { sb.append("\n"); sb.append(" private RestResponse<" + getValidResponseNames(restEndpoint.getResponse()) + "> " + getJavaMethodName(categoryConfig, commandName) + "() throws Exception {\n"); - sb.append(" logger.debug(\"Executing " + getAsCamelCase(commandName) + " in " + sb.append(" logger.debug(\"Executing " + getJavaMethodName(categoryConfig, commandName) + " in " + restCategory.getName() + " command line\");\n\n"); - if (categoryConfig.isExtendedOptionCommand(commandName)) { - sb.append(" Custom" + getAsClassName(restCategory.getName()) + "CommandOptions." + getAsClassName(getAsCamelCase(commandName)) - + "CommandOptions commandOptions = " + getAsVariableName(getAsCamelCase(restCategory.getName())) + - "CommandOptions." - + getAsCamelCase(commandName) + "CommandOptions;\n"); - } else { - sb.append(" " + getAsClassName(restCategory.getName()) + "CommandOptions." + getAsClassName(getAsCamelCase(commandName)) - + "CommandOptions commandOptions = " + getAsVariableName(getAsCamelCase(restCategory.getName())) + - "CommandOptions." - + getAsCamelCase(commandName) + "CommandOptions;\n"); - } + + String commandOptionsClassName = getCommandOptionsClassName(restCategory, categoryConfig, commandName) + "." + getSubCommandOptionsClassName(categoryConfig, commandName); + String commandOptionsLocalVarName = "commandOptions"; + String commandOptionsVarName = getCommandOptionsVarName(restCategory) + "." + getSubCommandOptionsVarName(categoryConfig, commandName); + + sb.append(" " + commandOptionsClassName + " " + commandOptionsLocalVarName + " = " + commandOptionsVarName + ";\n"); if (categoryConfig.isExecutorExtendedCommand(commandName)) { List body = new ArrayList<>(); for (RestParameter restParameter : restEndpoint.getParameters()) { @@ -306,13 +313,11 @@ protected String getClassMethods(String key) { } } - if (StringUtils.isNotEmpty(categoryConfig.getCommand(commandName).getExecutorExtendedClassName())) { - sb.append(" " + categoryConfig.getCommand(commandName).getExecutorExtendedClassName() + " custom" + getAsClassName(restCategory.getName()) + "CommandExecutor = new " + categoryConfig.getCommand(commandName).getExecutorExtendedClassName() + "(queryParams, token, clientConfiguration, getSessionManager(), appHome, getLogger());\n"); - } else { - sb.append(" Custom" + getAsClassName(restCategory.getName()) + "CommandExecutor custom" + getAsClassName(restCategory.getName()) + "CommandExecutor = new Custom" + getAsClassName(restCategory.getName()) + "CommandExecutor(queryParams, token, clientConfiguration, getSessionManager(), appHome, getLogger());\n"); - } + String executorClassName = getExecutorClassName(restCategory, categoryConfig, commandName); + String executorVarName = getExecutorVarName(restCategory); - sb.append(" return custom" + getAsClassName(restCategory.getName()) + "CommandExecutor." + getAsCamelCase(commandName) + "();\n"); + sb.append(" " + executorClassName + " " + executorVarName + " = new " + executorClassName + "(queryParams, token, clientConfiguration, getSessionManager(), appHome, getLogger());\n"); + sb.append(" return " + executorVarName + "." + getJavaMethodName(categoryConfig, commandName) + "(commandOptions);\n"); } else { sb.append(getQueryParams(restEndpoint, categoryConfig, commandName)); sb.append(getBodyParams(restCategory, restEndpoint, categoryConfig, commandName)); @@ -351,15 +356,6 @@ private String getReturn(RestCategory restCategory, RestEndpoint restEndpoint, C return res; } - private String getJavaMethodName(CategoryConfig config, String commandName) { - Command command = config.getCommand(commandName); - String commandMethod = getAsCamelCase(commandName); - if (command != null && StringUtils.isNotEmpty(command.getRename())) { - commandMethod = command.getRename(); - } - return commandMethod; - } - private String getBodyParams(RestCategory restCategory, RestEndpoint restEndpoint, CategoryConfig config, String commandName) { StringBuilder sb = new StringBuilder(); String bodyClassName = restEndpoint.getBodyClassName(); diff --git a/opencga-server/src/main/java/org/opencb/opencga/server/generator/writers/cli/OptionsCliRestApiWriter.java b/opencga-server/src/main/java/org/opencb/opencga/server/generator/writers/cli/OptionsCliRestApiWriter.java index 80c9a5fcdd7..bfa784319b7 100644 --- a/opencga-server/src/main/java/org/opencb/opencga/server/generator/writers/cli/OptionsCliRestApiWriter.java +++ b/opencga-server/src/main/java/org/opencb/opencga/server/generator/writers/cli/OptionsCliRestApiWriter.java @@ -114,15 +114,16 @@ protected String getClassHeader(String key) { String commandName = getCommandName(restCategory, restEndpoint); // if ("POST".equals(restEndpoint.getMethod()) || restEndpoint.hasParameters()) { if (config.isAvailableCommand(commandName)) { - sb.append(" public " + getAsClassName(getAsCamelCase(getMethodName(restCategory, restEndpoint))) + "CommandOptions " - + getAsVariableName(getAsCamelCase(getMethodName(restCategory, restEndpoint))) + "CommandOptions;\n"); + String className = getSubCommandOptionsClassName(config, commandName); + String varName = getSubCommandOptionsVarName(config, commandName); + sb.append(" public " + className + " " + varName + ";\n"); } // } } sb.append("\n"); sb.append("\n"); - sb.append(" public " + getAsClassName(restCategory.getName()) + "CommandOptions(CommonCommandOptions commonCommandOptions, " + + sb.append(" public " + getCommandOptionsClassName(restCategory) + "(CommonCommandOptions commonCommandOptions, " + "JCommander jCommander) {\n"); sb.append(" \n"); if (config.isOptionExtended()) { @@ -135,9 +136,9 @@ protected String getClassHeader(String key) { String commandName = getCommandName(restCategory, restEndpoint); // if ("POST".equals(restEndpoint.getMethod()) || restEndpoint.hasParameters()) { if (config.isAvailableCommand(commandName)) { - sb.append(" this." + getAsVariableName(getAsCamelCase(getMethodName(restCategory, restEndpoint))) + "CommandOptions = " + - "new " - + getAsClassName(getAsCamelCase(getMethodName(restCategory, restEndpoint))) + "CommandOptions();\n"); + String varName = getSubCommandOptionsVarName(config, commandName); + String className = getSubCommandOptionsClassName(config, commandName); + sb.append(" this." + varName + " = " + "new " + className + "();\n"); } // } } @@ -158,7 +159,7 @@ protected String getClassMethods(String key) { if (config.isAvailableCommand(commandName) && !config.isExtendedOptionCommand(commandName)) { sb.append(" @Parameters(commandNames = {\"" + reverseCommandName(commandName) + "\"}, commandDescription =\"" + restEndpoint.getDescription().replaceAll("\"", "'") + "\")\n"); - sb.append(" public class " + getAsClassName(getAsCamelCase(getMethodName(restCategory, restEndpoint))) + "CommandOptions " + + sb.append(" public class " + getSubCommandOptionsClassName(config, commandName) + " " + "{\n"); sb.append(" \n"); sb.append(" @ParametersDelegate\n"); diff --git a/opencga-server/src/main/java/org/opencb/opencga/server/generator/writers/cli/ParserCliRestApiWriter.java b/opencga-server/src/main/java/org/opencb/opencga/server/generator/writers/cli/ParserCliRestApiWriter.java index 828d12be889..dd4717b0fee 100644 --- a/opencga-server/src/main/java/org/opencb/opencga/server/generator/writers/cli/ParserCliRestApiWriter.java +++ b/opencga-server/src/main/java/org/opencb/opencga/server/generator/writers/cli/ParserCliRestApiWriter.java @@ -116,17 +116,15 @@ protected String getClassHeader(String key) { // if ("POST".equals(restEndpoint.getMethod()) || restEndpoint.hasParameters()) { if (config.isAvailableCommand(commandName)) { sb.append(" " + getAsVariableName(restCategory.getName()) + "SubCommands.addCommand(\"" + reverseCommandName(commandName) + "\", " - + getAsVariableName(restCategory.getName()) + "CommandOptions." + getAsCamelCase(commandName) + - "CommandOptions);\n"); + + getCommandOptionsVarName(restCategory) + "." + getSubCommandOptionsVarName(config, commandName) + ");\n"); } // } } if (CollectionUtils.isNotEmpty(config.getAddedMethods())) { - for (String methodName : config.getAddedMethods()) { - sb.append(" " + getAsVariableName(restCategory.getName()) + "SubCommands.addCommand(\"" + methodName + "\", " - + getAsVariableName(restCategory.getName()) + "CommandOptions." + getAsCamelCase(methodName) + - "CommandOptions);\n"); + for (String commandName : config.getAddedMethods()) { + sb.append(" " + getAsVariableName(restCategory.getName()) + "SubCommands.addCommand(\"" + commandName + "\", " + + getCommandOptionsVarName(restCategory) + "." + getSubCommandOptionsVarName(config, commandName) + ");\n"); } } } diff --git a/opencga-server/src/main/resources/cli-config.yaml b/opencga-server/src/main/resources/cli-config.yaml index b3a3c302120..4e5c24c5e9d 100644 --- a/opencga-server/src/main/resources/cli-config.yaml +++ b/opencga-server/src/main/resources/cli-config.yaml @@ -97,6 +97,9 @@ apiConfig: - name: top executorExtended: True optionExtended: True + - name: log + executorExtended: True + optionExtended: True addedMethods: - log - name: samples @@ -147,6 +150,7 @@ apiConfig: key: DiseasePanel commands: - name: import + ## Rename needed as `import` is a reserved word in Java rename: importPanels - name: analysisAlignment commandName: alignments From d693a3ba065bdd3d2d5871824155997a61e9b139 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jacobo=20Coll=20Morag=C3=B3n?= Date: Tue, 3 Oct 2023 11:55:03 +0100 Subject: [PATCH 25/50] app: Regenerate clients #TASK-4889 --- .../app/cli/main/OpenCgaCompleter.java | 2 +- .../app/cli/main/OpencgaCliOptionsParser.java | 2 +- .../main/executors/AdminCommandExecutor.java | 24 +++---- .../AnalysisAlignmentCommandExecutor.java | 26 ++++---- .../AnalysisClinicalCommandExecutor.java | 25 +++----- .../AnalysisVariantCommandExecutor.java | 26 ++++---- .../executors/CohortsCommandExecutor.java | 26 ++++---- .../DiseasePanelsCommandExecutor.java | 26 ++++---- .../executors/FamiliesCommandExecutor.java | 26 ++++---- .../main/executors/FilesCommandExecutor.java | 62 +++++-------------- .../executors/IndividualsCommandExecutor.java | 26 ++++---- .../main/executors/JobsCommandExecutor.java | 49 ++++++--------- .../main/executors/MetaCommandExecutor.java | 25 +++----- ...erationsVariantStorageCommandExecutor.java | 25 +++----- .../executors/ProjectsCommandExecutor.java | 24 +++---- .../executors/SamplesCommandExecutor.java | 26 ++++---- .../executors/StudiesCommandExecutor.java | 55 +++++----------- .../main/executors/UsersCommandExecutor.java | 48 ++++++-------- .../AnalysisVariantCommandOptions.java | 2 +- ...perationsVariantStorageCommandOptions.java | 4 +- opencga-client/src/main/R/R/Admin-methods.R | 2 +- .../src/main/R/R/Alignment-methods.R | 2 +- opencga-client/src/main/R/R/AllGenerics.R | 20 +++--- .../src/main/R/R/Clinical-methods.R | 4 +- opencga-client/src/main/R/R/Cohort-methods.R | 4 +- opencga-client/src/main/R/R/Family-methods.R | 4 +- opencga-client/src/main/R/R/File-methods.R | 4 +- opencga-client/src/main/R/R/GA4GH-methods.R | 2 +- .../src/main/R/R/Individual-methods.R | 4 +- opencga-client/src/main/R/R/Job-methods.R | 4 +- opencga-client/src/main/R/R/Meta-methods.R | 2 +- .../src/main/R/R/Operation-methods.R | 2 +- opencga-client/src/main/R/R/Panel-methods.R | 4 +- opencga-client/src/main/R/R/Project-methods.R | 2 +- opencga-client/src/main/R/R/Sample-methods.R | 4 +- opencga-client/src/main/R/R/Study-methods.R | 4 +- opencga-client/src/main/R/R/User-methods.R | 4 +- opencga-client/src/main/R/R/Variant-methods.R | 2 +- .../client/rest/clients/AdminClient.java | 4 +- .../client/rest/clients/AlignmentClient.java | 4 +- .../rest/clients/ClinicalAnalysisClient.java | 4 +- .../client/rest/clients/CohortClient.java | 4 +- .../rest/clients/DiseasePanelClient.java | 4 +- .../client/rest/clients/FamilyClient.java | 4 +- .../client/rest/clients/FileClient.java | 4 +- .../client/rest/clients/GA4GHClient.java | 4 +- .../client/rest/clients/IndividualClient.java | 4 +- .../client/rest/clients/JobClient.java | 4 +- .../client/rest/clients/MetaClient.java | 4 +- .../client/rest/clients/ProjectClient.java | 4 +- .../client/rest/clients/SampleClient.java | 4 +- .../client/rest/clients/StudyClient.java | 4 +- .../client/rest/clients/UserClient.java | 4 +- .../client/rest/clients/VariantClient.java | 4 +- .../rest/clients/VariantOperationClient.java | 4 +- opencga-client/src/main/javascript/Admin.js | 2 +- .../src/main/javascript/Alignment.js | 2 +- .../src/main/javascript/ClinicalAnalysis.js | 2 +- opencga-client/src/main/javascript/Cohort.js | 2 +- .../src/main/javascript/DiseasePanel.js | 2 +- opencga-client/src/main/javascript/Family.js | 2 +- opencga-client/src/main/javascript/File.js | 2 +- opencga-client/src/main/javascript/GA4GH.js | 2 +- .../src/main/javascript/Individual.js | 2 +- opencga-client/src/main/javascript/Job.js | 2 +- opencga-client/src/main/javascript/Meta.js | 2 +- opencga-client/src/main/javascript/Project.js | 2 +- opencga-client/src/main/javascript/Sample.js | 2 +- opencga-client/src/main/javascript/Study.js | 2 +- opencga-client/src/main/javascript/User.js | 2 +- opencga-client/src/main/javascript/Variant.js | 2 +- .../src/main/javascript/VariantOperation.js | 2 +- .../pyopencga/rest_clients/admin_client.py | 4 +- .../rest_clients/alignment_client.py | 4 +- .../rest_clients/clinical_analysis_client.py | 4 +- .../pyopencga/rest_clients/cohort_client.py | 4 +- .../rest_clients/disease_panel_client.py | 4 +- .../pyopencga/rest_clients/family_client.py | 4 +- .../pyopencga/rest_clients/file_client.py | 4 +- .../pyopencga/rest_clients/ga4gh_client.py | 4 +- .../rest_clients/individual_client.py | 4 +- .../pyopencga/rest_clients/job_client.py | 4 +- .../pyopencga/rest_clients/meta_client.py | 4 +- .../pyopencga/rest_clients/project_client.py | 4 +- .../pyopencga/rest_clients/sample_client.py | 4 +- .../pyopencga/rest_clients/study_client.py | 4 +- .../pyopencga/rest_clients/user_client.py | 4 +- .../pyopencga/rest_clients/variant_client.py | 4 +- .../rest_clients/variant_operation_client.py | 4 +- 89 files changed, 325 insertions(+), 448 deletions(-) diff --git a/opencga-app/src/main/java/org/opencb/opencga/app/cli/main/OpenCgaCompleter.java b/opencga-app/src/main/java/org/opencb/opencga/app/cli/main/OpenCgaCompleter.java index 85ed58cd595..ae29118873c 100644 --- a/opencga-app/src/main/java/org/opencb/opencga/app/cli/main/OpenCgaCompleter.java +++ b/opencga-app/src/main/java/org/opencb/opencga/app/cli/main/OpenCgaCompleter.java @@ -1,5 +1,5 @@ /* -* Copyright 2015-2023-07-28 OpenCB +* Copyright 2015-2023-10-03 OpenCB * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/opencga-app/src/main/java/org/opencb/opencga/app/cli/main/OpencgaCliOptionsParser.java b/opencga-app/src/main/java/org/opencb/opencga/app/cli/main/OpencgaCliOptionsParser.java index 67c39990330..6f1a04be7b6 100644 --- a/opencga-app/src/main/java/org/opencb/opencga/app/cli/main/OpencgaCliOptionsParser.java +++ b/opencga-app/src/main/java/org/opencb/opencga/app/cli/main/OpencgaCliOptionsParser.java @@ -1,5 +1,5 @@ /* -* Copyright 2015-2023-07-28 OpenCB +* Copyright 2015-2023-10-03 OpenCB * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/opencga-app/src/main/java/org/opencb/opencga/app/cli/main/executors/AdminCommandExecutor.java b/opencga-app/src/main/java/org/opencb/opencga/app/cli/main/executors/AdminCommandExecutor.java index 9ab6c51ed00..0f049086703 100644 --- a/opencga-app/src/main/java/org/opencb/opencga/app/cli/main/executors/AdminCommandExecutor.java +++ b/opencga-app/src/main/java/org/opencb/opencga/app/cli/main/executors/AdminCommandExecutor.java @@ -1,24 +1,18 @@ package org.opencb.opencga.app.cli.main.executors; import com.fasterxml.jackson.databind.DeserializationFeature; -import org.opencb.opencga.app.cli.main.executors.OpencgaCommandExecutor; -import org.opencb.opencga.app.cli.main.*; -import org.opencb.opencga.core.response.RestResponse; -import org.opencb.opencga.client.exceptions.ClientException; -import org.opencb.commons.datastore.core.ObjectMap; - -import org.opencb.opencga.catalog.exceptions.CatalogAuthenticationException; -import org.opencb.opencga.core.common.JacksonUtils; - import com.fasterxml.jackson.databind.ObjectMapper; -import java.util.List; import java.util.HashMap; -import org.opencb.opencga.core.response.QueryType; +import java.util.List; +import java.util.Map; +import org.opencb.commons.datastore.core.ObjectMap; import org.opencb.commons.utils.PrintUtils; - +import org.opencb.opencga.app.cli.main.*; +import org.opencb.opencga.app.cli.main.executors.OpencgaCommandExecutor; import org.opencb.opencga.app.cli.main.options.AdminCommandOptions; - -import java.util.Map; +import org.opencb.opencga.catalog.exceptions.CatalogAuthenticationException; +import org.opencb.opencga.client.exceptions.ClientException; +import org.opencb.opencga.core.common.JacksonUtils; import org.opencb.opencga.core.models.admin.GroupSyncParams; import org.opencb.opencga.core.models.admin.InstallationParams; import org.opencb.opencga.core.models.admin.JWTParams; @@ -29,6 +23,8 @@ import org.opencb.opencga.core.models.study.Group; import org.opencb.opencga.core.models.user.Account; import org.opencb.opencga.core.models.user.User; +import org.opencb.opencga.core.response.QueryType; +import org.opencb.opencga.core.response.RestResponse; /* diff --git a/opencga-app/src/main/java/org/opencb/opencga/app/cli/main/executors/AnalysisAlignmentCommandExecutor.java b/opencga-app/src/main/java/org/opencb/opencga/app/cli/main/executors/AnalysisAlignmentCommandExecutor.java index 328a83daeb4..c1e5a5e0b7c 100644 --- a/opencga-app/src/main/java/org/opencb/opencga/app/cli/main/executors/AnalysisAlignmentCommandExecutor.java +++ b/opencga-app/src/main/java/org/opencb/opencga/app/cli/main/executors/AnalysisAlignmentCommandExecutor.java @@ -1,26 +1,20 @@ package org.opencb.opencga.app.cli.main.executors; import com.fasterxml.jackson.databind.DeserializationFeature; -import org.opencb.opencga.app.cli.main.executors.OpencgaCommandExecutor; -import org.opencb.opencga.app.cli.main.*; -import org.opencb.opencga.core.response.RestResponse; -import org.opencb.opencga.client.exceptions.ClientException; -import org.opencb.commons.datastore.core.ObjectMap; - -import org.opencb.opencga.catalog.exceptions.CatalogAuthenticationException; -import org.opencb.opencga.core.common.JacksonUtils; - import com.fasterxml.jackson.databind.ObjectMapper; -import java.util.List; import java.util.HashMap; -import org.opencb.opencga.core.response.QueryType; -import org.opencb.commons.utils.PrintUtils; - -import org.opencb.opencga.app.cli.main.options.AnalysisAlignmentCommandOptions; - +import java.util.List; import org.ga4gh.models.ReadAlignment; import org.opencb.biodata.models.alignment.GeneCoverageStats; import org.opencb.biodata.models.alignment.RegionCoverage; +import org.opencb.commons.datastore.core.ObjectMap; +import org.opencb.commons.utils.PrintUtils; +import org.opencb.opencga.app.cli.main.*; +import org.opencb.opencga.app.cli.main.executors.OpencgaCommandExecutor; +import org.opencb.opencga.app.cli.main.options.AnalysisAlignmentCommandOptions; +import org.opencb.opencga.catalog.exceptions.CatalogAuthenticationException; +import org.opencb.opencga.client.exceptions.ClientException; +import org.opencb.opencga.core.common.JacksonUtils; import org.opencb.opencga.core.models.alignment.AlignmentGeneCoverageStatsParams; import org.opencb.opencga.core.models.alignment.AlignmentIndexParams; import org.opencb.opencga.core.models.alignment.AlignmentQcParams; @@ -31,6 +25,8 @@ import org.opencb.opencga.core.models.alignment.PicardWrapperParams; import org.opencb.opencga.core.models.alignment.SamtoolsWrapperParams; import org.opencb.opencga.core.models.job.Job; +import org.opencb.opencga.core.response.QueryType; +import org.opencb.opencga.core.response.RestResponse; /* diff --git a/opencga-app/src/main/java/org/opencb/opencga/app/cli/main/executors/AnalysisClinicalCommandExecutor.java b/opencga-app/src/main/java/org/opencb/opencga/app/cli/main/executors/AnalysisClinicalCommandExecutor.java index 3039ab1cc68..ff9f4431ca4 100644 --- a/opencga-app/src/main/java/org/opencb/opencga/app/cli/main/executors/AnalysisClinicalCommandExecutor.java +++ b/opencga-app/src/main/java/org/opencb/opencga/app/cli/main/executors/AnalysisClinicalCommandExecutor.java @@ -1,34 +1,27 @@ package org.opencb.opencga.app.cli.main.executors; import com.fasterxml.jackson.databind.DeserializationFeature; -import org.opencb.opencga.app.cli.main.executors.OpencgaCommandExecutor; -import org.opencb.opencga.app.cli.main.*; -import org.opencb.opencga.core.response.RestResponse; -import org.opencb.opencga.client.exceptions.ClientException; -import org.opencb.commons.datastore.core.ObjectMap; - -import org.opencb.opencga.catalog.exceptions.CatalogAuthenticationException; -import org.opencb.opencga.core.common.JacksonUtils; - import com.fasterxml.jackson.databind.ObjectMapper; -import java.util.List; import java.util.HashMap; -import org.opencb.opencga.core.response.QueryType; -import org.opencb.commons.utils.PrintUtils; - -import org.opencb.opencga.app.cli.main.options.AnalysisClinicalCommandOptions; - +import java.util.List; import org.opencb.biodata.models.clinical.ClinicalDiscussion; import org.opencb.biodata.models.clinical.ClinicalProperty; import org.opencb.biodata.models.clinical.interpretation.ClinicalVariant; import org.opencb.biodata.models.clinical.interpretation.InterpretationMethod; import org.opencb.commons.datastore.core.FacetField; import org.opencb.commons.datastore.core.ObjectMap; +import org.opencb.commons.utils.PrintUtils; +import org.opencb.opencga.app.cli.main.*; +import org.opencb.opencga.app.cli.main.executors.OpencgaCommandExecutor; +import org.opencb.opencga.app.cli.main.options.AnalysisClinicalCommandOptions; +import org.opencb.opencga.catalog.exceptions.CatalogAuthenticationException; import org.opencb.opencga.catalog.utils.ParamUtils.AclAction; import org.opencb.opencga.catalog.utils.ParamUtils.AddRemoveReplaceAction; import org.opencb.opencga.catalog.utils.ParamUtils.BasicUpdateAction; import org.opencb.opencga.catalog.utils.ParamUtils.SaveInterpretationAs; import org.opencb.opencga.catalog.utils.ParamUtils.UpdateAction; +import org.opencb.opencga.client.exceptions.ClientException; +import org.opencb.opencga.core.common.JacksonUtils; import org.opencb.opencga.core.models.analysis.knockout.KnockoutByGeneSummary; import org.opencb.opencga.core.models.analysis.knockout.KnockoutByIndividual; import org.opencb.opencga.core.models.analysis.knockout.KnockoutByIndividualSummary; @@ -63,6 +56,8 @@ import org.opencb.opencga.core.models.study.configuration.ClinicalConsentAnnotationParam; import org.opencb.opencga.core.models.study.configuration.ClinicalConsentConfiguration; import org.opencb.opencga.core.models.study.configuration.InterpretationStudyConfiguration; +import org.opencb.opencga.core.response.QueryType; +import org.opencb.opencga.core.response.RestResponse; /* diff --git a/opencga-app/src/main/java/org/opencb/opencga/app/cli/main/executors/AnalysisVariantCommandExecutor.java b/opencga-app/src/main/java/org/opencb/opencga/app/cli/main/executors/AnalysisVariantCommandExecutor.java index 0bee10fa238..2f670f539e8 100644 --- a/opencga-app/src/main/java/org/opencb/opencga/app/cli/main/executors/AnalysisVariantCommandExecutor.java +++ b/opencga-app/src/main/java/org/opencb/opencga/app/cli/main/executors/AnalysisVariantCommandExecutor.java @@ -1,23 +1,9 @@ package org.opencb.opencga.app.cli.main.executors; import com.fasterxml.jackson.databind.DeserializationFeature; -import org.opencb.opencga.app.cli.main.executors.OpencgaCommandExecutor; -import org.opencb.opencga.app.cli.main.*; -import org.opencb.opencga.core.response.RestResponse; -import org.opencb.opencga.client.exceptions.ClientException; -import org.opencb.commons.datastore.core.ObjectMap; - -import org.opencb.opencga.catalog.exceptions.CatalogAuthenticationException; -import org.opencb.opencga.core.common.JacksonUtils; - import com.fasterxml.jackson.databind.ObjectMapper; -import java.util.List; import java.util.HashMap; -import org.opencb.opencga.core.response.QueryType; -import org.opencb.commons.utils.PrintUtils; - -import org.opencb.opencga.app.cli.main.options.AnalysisVariantCommandOptions; - +import java.util.List; import java.util.Map; import org.opencb.biodata.models.clinical.ClinicalProperty.ModeOfInheritance; import org.opencb.biodata.models.clinical.ClinicalProperty.Penetrance; @@ -29,7 +15,15 @@ import org.opencb.biodata.models.variant.metadata.VariantMetadata; import org.opencb.biodata.models.variant.metadata.VariantSetStats; import org.opencb.commons.datastore.core.FacetField; +import org.opencb.commons.datastore.core.ObjectMap; import org.opencb.commons.datastore.core.QueryResponse; +import org.opencb.commons.utils.PrintUtils; +import org.opencb.opencga.app.cli.main.*; +import org.opencb.opencga.app.cli.main.executors.OpencgaCommandExecutor; +import org.opencb.opencga.app.cli.main.options.AnalysisVariantCommandOptions; +import org.opencb.opencga.catalog.exceptions.CatalogAuthenticationException; +import org.opencb.opencga.client.exceptions.ClientException; +import org.opencb.opencga.core.common.JacksonUtils; import org.opencb.opencga.core.models.analysis.knockout.KnockoutByGene; import org.opencb.opencga.core.models.analysis.knockout.KnockoutByIndividual; import org.opencb.opencga.core.models.clinical.ExomiserWrapperParams; @@ -58,6 +52,8 @@ import org.opencb.opencga.core.models.variant.VariantExportParams; import org.opencb.opencga.core.models.variant.VariantIndexParams; import org.opencb.opencga.core.models.variant.VariantStatsAnalysisParams; +import org.opencb.opencga.core.response.QueryType; +import org.opencb.opencga.core.response.RestResponse; import org.opencb.oskar.analysis.variant.gwas.GwasConfiguration; diff --git a/opencga-app/src/main/java/org/opencb/opencga/app/cli/main/executors/CohortsCommandExecutor.java b/opencga-app/src/main/java/org/opencb/opencga/app/cli/main/executors/CohortsCommandExecutor.java index 92677f27fa4..54d3c8c3704 100644 --- a/opencga-app/src/main/java/org/opencb/opencga/app/cli/main/executors/CohortsCommandExecutor.java +++ b/opencga-app/src/main/java/org/opencb/opencga/app/cli/main/executors/CohortsCommandExecutor.java @@ -1,28 +1,22 @@ package org.opencb.opencga.app.cli.main.executors; import com.fasterxml.jackson.databind.DeserializationFeature; -import org.opencb.opencga.app.cli.main.executors.OpencgaCommandExecutor; -import org.opencb.opencga.app.cli.main.*; -import org.opencb.opencga.core.response.RestResponse; -import org.opencb.opencga.client.exceptions.ClientException; -import org.opencb.commons.datastore.core.ObjectMap; - -import org.opencb.opencga.catalog.exceptions.CatalogAuthenticationException; -import org.opencb.opencga.core.common.JacksonUtils; - import com.fasterxml.jackson.databind.ObjectMapper; -import java.util.List; import java.util.HashMap; -import org.opencb.opencga.core.response.QueryType; -import org.opencb.commons.utils.PrintUtils; - -import org.opencb.opencga.app.cli.main.options.CohortsCommandOptions; - +import java.util.List; import java.util.Map; import org.opencb.commons.datastore.core.FacetField; +import org.opencb.commons.datastore.core.ObjectMap; +import org.opencb.commons.utils.PrintUtils; +import org.opencb.opencga.app.cli.main.*; +import org.opencb.opencga.app.cli.main.executors.OpencgaCommandExecutor; +import org.opencb.opencga.app.cli.main.options.CohortsCommandOptions; +import org.opencb.opencga.catalog.exceptions.CatalogAuthenticationException; import org.opencb.opencga.catalog.utils.ParamUtils.AclAction; import org.opencb.opencga.catalog.utils.ParamUtils.BasicUpdateAction; import org.opencb.opencga.catalog.utils.ParamUtils.CompleteUpdateAction; +import org.opencb.opencga.client.exceptions.ClientException; +import org.opencb.opencga.core.common.JacksonUtils; import org.opencb.opencga.core.models.cohort.Cohort; import org.opencb.opencga.core.models.cohort.CohortAclEntryList; import org.opencb.opencga.core.models.cohort.CohortAclUpdateParams; @@ -33,6 +27,8 @@ import org.opencb.opencga.core.models.common.StatusParams; import org.opencb.opencga.core.models.common.TsvAnnotationParams; import org.opencb.opencga.core.models.job.Job; +import org.opencb.opencga.core.response.QueryType; +import org.opencb.opencga.core.response.RestResponse; /* diff --git a/opencga-app/src/main/java/org/opencb/opencga/app/cli/main/executors/DiseasePanelsCommandExecutor.java b/opencga-app/src/main/java/org/opencb/opencga/app/cli/main/executors/DiseasePanelsCommandExecutor.java index 3e05c22aa5f..fcac8b23c88 100644 --- a/opencga-app/src/main/java/org/opencb/opencga/app/cli/main/executors/DiseasePanelsCommandExecutor.java +++ b/opencga-app/src/main/java/org/opencb/opencga/app/cli/main/executors/DiseasePanelsCommandExecutor.java @@ -1,25 +1,19 @@ package org.opencb.opencga.app.cli.main.executors; import com.fasterxml.jackson.databind.DeserializationFeature; -import org.opencb.opencga.app.cli.main.executors.OpencgaCommandExecutor; -import org.opencb.opencga.app.cli.main.*; -import org.opencb.opencga.core.response.RestResponse; -import org.opencb.opencga.client.exceptions.ClientException; -import org.opencb.commons.datastore.core.ObjectMap; - -import org.opencb.opencga.catalog.exceptions.CatalogAuthenticationException; -import org.opencb.opencga.core.common.JacksonUtils; - import com.fasterxml.jackson.databind.ObjectMapper; -import java.util.List; import java.util.HashMap; -import org.opencb.opencga.core.response.QueryType; +import java.util.List; +import org.opencb.biodata.models.clinical.interpretation.DiseasePanel; +import org.opencb.commons.datastore.core.ObjectMap; import org.opencb.commons.utils.PrintUtils; - +import org.opencb.opencga.app.cli.main.*; +import org.opencb.opencga.app.cli.main.executors.OpencgaCommandExecutor; import org.opencb.opencga.app.cli.main.options.DiseasePanelsCommandOptions; - -import org.opencb.biodata.models.clinical.interpretation.DiseasePanel; +import org.opencb.opencga.catalog.exceptions.CatalogAuthenticationException; import org.opencb.opencga.catalog.utils.ParamUtils.AclAction; +import org.opencb.opencga.client.exceptions.ClientException; +import org.opencb.opencga.core.common.JacksonUtils; import org.opencb.opencga.core.models.job.Job; import org.opencb.opencga.core.models.panel.Panel; import org.opencb.opencga.core.models.panel.PanelAclEntryList; @@ -27,6 +21,8 @@ import org.opencb.opencga.core.models.panel.PanelCreateParams; import org.opencb.opencga.core.models.panel.PanelImportParams; import org.opencb.opencga.core.models.panel.PanelUpdateParams; +import org.opencb.opencga.core.response.QueryType; +import org.opencb.opencga.core.response.RestResponse; /* @@ -210,7 +206,7 @@ private RestResponse distinct() throws Exception { } private RestResponse importPanels() throws Exception { - logger.debug("Executing import in Disease Panels command line"); + logger.debug("Executing importPanels in Disease Panels command line"); DiseasePanelsCommandOptions.ImportCommandOptions commandOptions = diseasePanelsCommandOptions.importCommandOptions; diff --git a/opencga-app/src/main/java/org/opencb/opencga/app/cli/main/executors/FamiliesCommandExecutor.java b/opencga-app/src/main/java/org/opencb/opencga/app/cli/main/executors/FamiliesCommandExecutor.java index 35e1596aba4..b7521c2c790 100644 --- a/opencga-app/src/main/java/org/opencb/opencga/app/cli/main/executors/FamiliesCommandExecutor.java +++ b/opencga-app/src/main/java/org/opencb/opencga/app/cli/main/executors/FamiliesCommandExecutor.java @@ -1,28 +1,22 @@ package org.opencb.opencga.app.cli.main.executors; import com.fasterxml.jackson.databind.DeserializationFeature; -import org.opencb.opencga.app.cli.main.executors.OpencgaCommandExecutor; -import org.opencb.opencga.app.cli.main.*; -import org.opencb.opencga.core.response.RestResponse; -import org.opencb.opencga.client.exceptions.ClientException; -import org.opencb.commons.datastore.core.ObjectMap; - -import org.opencb.opencga.catalog.exceptions.CatalogAuthenticationException; -import org.opencb.opencga.core.common.JacksonUtils; - import com.fasterxml.jackson.databind.ObjectMapper; -import java.util.List; import java.util.HashMap; -import org.opencb.opencga.core.response.QueryType; -import org.opencb.commons.utils.PrintUtils; - -import org.opencb.opencga.app.cli.main.options.FamiliesCommandOptions; - +import java.util.List; import java.util.Map; import org.opencb.commons.datastore.core.FacetField; +import org.opencb.commons.datastore.core.ObjectMap; +import org.opencb.commons.utils.PrintUtils; +import org.opencb.opencga.app.cli.main.*; +import org.opencb.opencga.app.cli.main.executors.OpencgaCommandExecutor; +import org.opencb.opencga.app.cli.main.options.FamiliesCommandOptions; +import org.opencb.opencga.catalog.exceptions.CatalogAuthenticationException; import org.opencb.opencga.catalog.utils.ParamUtils.AclAction; import org.opencb.opencga.catalog.utils.ParamUtils.BasicUpdateAction; import org.opencb.opencga.catalog.utils.ParamUtils.CompleteUpdateAction; +import org.opencb.opencga.client.exceptions.ClientException; +import org.opencb.opencga.core.common.JacksonUtils; import org.opencb.opencga.core.models.common.StatusParams; import org.opencb.opencga.core.models.common.TsvAnnotationParams; import org.opencb.opencga.core.models.family.Family; @@ -33,6 +27,8 @@ import org.opencb.opencga.core.models.family.FamilyQualityControl; import org.opencb.opencga.core.models.family.FamilyUpdateParams; import org.opencb.opencga.core.models.job.Job; +import org.opencb.opencga.core.response.QueryType; +import org.opencb.opencga.core.response.RestResponse; /* diff --git a/opencga-app/src/main/java/org/opencb/opencga/app/cli/main/executors/FilesCommandExecutor.java b/opencga-app/src/main/java/org/opencb/opencga/app/cli/main/executors/FilesCommandExecutor.java index 039e0d536e3..62796417c62 100644 --- a/opencga-app/src/main/java/org/opencb/opencga/app/cli/main/executors/FilesCommandExecutor.java +++ b/opencga-app/src/main/java/org/opencb/opencga/app/cli/main/executors/FilesCommandExecutor.java @@ -1,66 +1,34 @@ package org.opencb.opencga.app.cli.main.executors; import com.fasterxml.jackson.databind.DeserializationFeature; -import org.opencb.opencga.app.cli.main.executors.OpencgaCommandExecutor; -import org.opencb.opencga.app.cli.main.*; -import org.opencb.opencga.core.response.RestResponse; -import org.opencb.opencga.client.exceptions.ClientException; -import org.opencb.commons.datastore.core.ObjectMap; - -import org.opencb.opencga.catalog.exceptions.CatalogAuthenticationException; -import org.opencb.opencga.core.common.JacksonUtils; - import com.fasterxml.jackson.databind.ObjectMapper; -import java.util.List; -import java.util.HashMap; -import org.opencb.opencga.core.response.QueryType; -import org.opencb.commons.utils.PrintUtils; - -import org.opencb.opencga.app.cli.main.options.FilesCommandOptions; - -import org.opencb.opencga.app.cli.main.custom.CustomFilesCommandExecutor; -import org.opencb.opencga.app.cli.main.custom.CustomFilesCommandExecutor; -import org.opencb.opencga.app.cli.main.custom.CustomFilesCommandExecutor; -import org.opencb.opencga.app.cli.main.custom.CustomFilesCommandExecutor; -import org.opencb.opencga.app.cli.main.custom.CustomFilesCommandExecutor; -import org.opencb.opencga.app.cli.main.custom.CustomFilesCommandExecutor; -import org.opencb.opencga.app.cli.main.custom.CustomFilesCommandExecutor; -import org.opencb.opencga.app.cli.main.custom.CustomFilesCommandExecutor; -import org.opencb.opencga.app.cli.main.custom.CustomFilesCommandExecutor; -import org.opencb.opencga.app.cli.main.custom.CustomFilesCommandExecutor; -import org.opencb.opencga.app.cli.main.custom.CustomFilesCommandExecutor; -import org.opencb.opencga.app.cli.main.custom.CustomFilesCommandExecutor; -import org.opencb.opencga.app.cli.main.custom.CustomFilesCommandExecutor; -import org.opencb.opencga.app.cli.main.custom.CustomFilesCommandOptions; -import org.opencb.opencga.app.cli.main.custom.CustomFilesCommandExecutor; -import org.opencb.opencga.app.cli.main.custom.CustomFilesCommandExecutor; -import org.opencb.opencga.app.cli.main.custom.CustomFilesCommandExecutor; -import org.opencb.opencga.app.cli.main.custom.CustomFilesCommandExecutor; -import org.opencb.opencga.app.cli.main.custom.CustomFilesCommandExecutor; -import org.opencb.opencga.app.cli.main.custom.CustomFilesCommandExecutor; -import org.opencb.opencga.app.cli.main.custom.CustomFilesCommandExecutor; -import org.opencb.opencga.app.cli.main.custom.CustomFilesCommandExecutor; -import org.opencb.opencga.app.cli.main.custom.CustomFilesCommandExecutor; -import org.opencb.opencga.app.cli.main.custom.CustomFilesCommandExecutor; -import org.opencb.opencga.app.cli.main.custom.CustomFilesCommandExecutor; -import org.opencb.opencga.app.cli.main.custom.CustomFilesCommandExecutor; -import org.opencb.opencga.app.cli.main.custom.CustomFilesCommandExecutor; -import org.opencb.opencga.app.cli.main.custom.CustomFilesCommandExecutor; import java.io.DataInputStream; import java.io.InputStream; +import java.util.HashMap; +import java.util.List; import java.util.Map; import org.opencb.biodata.models.clinical.interpretation.Software; import org.opencb.commons.datastore.core.FacetField; +import org.opencb.commons.datastore.core.ObjectMap; +import org.opencb.commons.utils.PrintUtils; +import org.opencb.opencga.app.cli.main.*; +import org.opencb.opencga.app.cli.main.custom.CustomFilesCommandExecutor; +import org.opencb.opencga.app.cli.main.custom.CustomFilesCommandOptions; +import org.opencb.opencga.app.cli.main.executors.OpencgaCommandExecutor; +import org.opencb.opencga.app.cli.main.options.FilesCommandOptions; +import org.opencb.opencga.catalog.exceptions.CatalogAuthenticationException; import org.opencb.opencga.catalog.utils.ParamUtils.AclAction; import org.opencb.opencga.catalog.utils.ParamUtils.BasicUpdateAction; import org.opencb.opencga.catalog.utils.ParamUtils.CompleteUpdateAction; +import org.opencb.opencga.client.exceptions.ClientException; +import org.opencb.opencga.core.common.JacksonUtils; import org.opencb.opencga.core.models.alignment.AlignmentFileQualityControl; import org.opencb.opencga.core.models.alignment.CoverageFileQualityControl; import org.opencb.opencga.core.models.common.StatusParams; import org.opencb.opencga.core.models.common.TsvAnnotationParams; +import org.opencb.opencga.core.models.file.File; import org.opencb.opencga.core.models.file.File.Bioformat; import org.opencb.opencga.core.models.file.File.Format; -import org.opencb.opencga.core.models.file.File; import org.opencb.opencga.core.models.file.FileAclEntryList; import org.opencb.opencga.core.models.file.FileAclUpdateParams; import org.opencb.opencga.core.models.file.FileContent; @@ -79,6 +47,8 @@ import org.opencb.opencga.core.models.file.SmallFileInternal; import org.opencb.opencga.core.models.job.Job; import org.opencb.opencga.core.models.variant.VariantFileQualityControl; +import org.opencb.opencga.core.response.QueryType; +import org.opencb.opencga.core.response.RestResponse; /* @@ -637,7 +607,7 @@ private RestResponse upload() throws Exception { queryParams.putIfNotEmpty("study", sessionManager.getSession().getCurrentStudy()); } CustomFilesCommandExecutor customFilesCommandExecutor = new CustomFilesCommandExecutor(queryParams, token, clientConfiguration, getSessionManager(), appHome, getLogger()); - return customFilesCommandExecutor.upload(); + return customFilesCommandExecutor.upload(commandOptions); } private RestResponse acl() throws Exception { diff --git a/opencga-app/src/main/java/org/opencb/opencga/app/cli/main/executors/IndividualsCommandExecutor.java b/opencga-app/src/main/java/org/opencb/opencga/app/cli/main/executors/IndividualsCommandExecutor.java index 86fcc2f8d58..1516be90a6c 100644 --- a/opencga-app/src/main/java/org/opencb/opencga/app/cli/main/executors/IndividualsCommandExecutor.java +++ b/opencga-app/src/main/java/org/opencb/opencga/app/cli/main/executors/IndividualsCommandExecutor.java @@ -1,32 +1,26 @@ package org.opencb.opencga.app.cli.main.executors; import com.fasterxml.jackson.databind.DeserializationFeature; -import org.opencb.opencga.app.cli.main.executors.OpencgaCommandExecutor; -import org.opencb.opencga.app.cli.main.*; -import org.opencb.opencga.core.response.RestResponse; -import org.opencb.opencga.client.exceptions.ClientException; -import org.opencb.commons.datastore.core.ObjectMap; - -import org.opencb.opencga.catalog.exceptions.CatalogAuthenticationException; -import org.opencb.opencga.core.common.JacksonUtils; - import com.fasterxml.jackson.databind.ObjectMapper; -import java.util.List; import java.util.HashMap; -import org.opencb.opencga.core.response.QueryType; -import org.opencb.commons.utils.PrintUtils; - -import org.opencb.opencga.app.cli.main.options.IndividualsCommandOptions; - +import java.util.List; import java.util.Map; import org.opencb.biodata.models.clinical.qc.SampleRelatednessReport; import org.opencb.biodata.models.core.OntologyTermAnnotation; import org.opencb.biodata.models.core.SexOntologyTermAnnotation; import org.opencb.biodata.models.pedigree.IndividualProperty; import org.opencb.commons.datastore.core.FacetField; +import org.opencb.commons.datastore.core.ObjectMap; +import org.opencb.commons.utils.PrintUtils; +import org.opencb.opencga.app.cli.main.*; +import org.opencb.opencga.app.cli.main.executors.OpencgaCommandExecutor; +import org.opencb.opencga.app.cli.main.options.IndividualsCommandOptions; +import org.opencb.opencga.catalog.exceptions.CatalogAuthenticationException; import org.opencb.opencga.catalog.utils.ParamUtils.AclAction; import org.opencb.opencga.catalog.utils.ParamUtils.BasicUpdateAction; import org.opencb.opencga.catalog.utils.ParamUtils.CompleteUpdateAction; +import org.opencb.opencga.client.exceptions.ClientException; +import org.opencb.opencga.core.common.JacksonUtils; import org.opencb.opencga.core.models.common.StatusParams; import org.opencb.opencga.core.models.common.TsvAnnotationParams; import org.opencb.opencga.core.models.individual.Individual; @@ -39,6 +33,8 @@ import org.opencb.opencga.core.models.individual.IndividualUpdateParams; import org.opencb.opencga.core.models.individual.Location; import org.opencb.opencga.core.models.job.Job; +import org.opencb.opencga.core.response.QueryType; +import org.opencb.opencga.core.response.RestResponse; /* diff --git a/opencga-app/src/main/java/org/opencb/opencga/app/cli/main/executors/JobsCommandExecutor.java b/opencga-app/src/main/java/org/opencb/opencga/app/cli/main/executors/JobsCommandExecutor.java index 93723bdc05e..17b78b206b7 100644 --- a/opencga-app/src/main/java/org/opencb/opencga/app/cli/main/executors/JobsCommandExecutor.java +++ b/opencga-app/src/main/java/org/opencb/opencga/app/cli/main/executors/JobsCommandExecutor.java @@ -1,41 +1,22 @@ package org.opencb.opencga.app.cli.main.executors; import com.fasterxml.jackson.databind.DeserializationFeature; -import org.opencb.opencga.app.cli.main.executors.OpencgaCommandExecutor; -import org.opencb.opencga.app.cli.main.*; -import org.opencb.opencga.core.response.RestResponse; -import org.opencb.opencga.client.exceptions.ClientException; -import org.opencb.commons.datastore.core.ObjectMap; - -import org.opencb.opencga.catalog.exceptions.CatalogAuthenticationException; -import org.opencb.opencga.core.common.JacksonUtils; - import com.fasterxml.jackson.databind.ObjectMapper; -import java.util.List; +import java.util.Date; import java.util.HashMap; -import org.opencb.opencga.core.response.QueryType; +import java.util.List; +import org.opencb.commons.datastore.core.FacetField; +import org.opencb.commons.datastore.core.ObjectMap; import org.opencb.commons.utils.PrintUtils; - -import org.opencb.opencga.app.cli.main.options.JobsCommandOptions; - -import org.opencb.opencga.app.cli.main.custom.CustomJobsCommandExecutor; -import org.opencb.opencga.app.cli.main.custom.CustomJobsCommandExecutor; -import org.opencb.opencga.app.cli.main.custom.CustomJobsCommandExecutor; -import org.opencb.opencga.app.cli.main.custom.CustomJobsCommandExecutor; -import org.opencb.opencga.app.cli.main.custom.CustomJobsCommandExecutor; -import org.opencb.opencga.app.cli.main.custom.CustomJobsCommandExecutor; +import org.opencb.opencga.app.cli.main.*; import org.opencb.opencga.app.cli.main.custom.CustomJobsCommandExecutor; import org.opencb.opencga.app.cli.main.custom.CustomJobsCommandOptions; -import org.opencb.opencga.app.cli.main.custom.CustomJobsCommandExecutor; -import org.opencb.opencga.app.cli.main.custom.CustomJobsCommandExecutor; -import org.opencb.opencga.app.cli.main.custom.CustomJobsCommandExecutor; -import org.opencb.opencga.app.cli.main.custom.CustomJobsCommandExecutor; -import org.opencb.opencga.app.cli.main.custom.CustomJobsCommandExecutor; -import org.opencb.opencga.app.cli.main.custom.CustomJobsCommandExecutor; -import java.util.Date; -import org.opencb.commons.datastore.core.FacetField; -import org.opencb.commons.datastore.core.ObjectMap; +import org.opencb.opencga.app.cli.main.executors.OpencgaCommandExecutor; +import org.opencb.opencga.app.cli.main.options.JobsCommandOptions; +import org.opencb.opencga.catalog.exceptions.CatalogAuthenticationException; import org.opencb.opencga.catalog.utils.ParamUtils.AclAction; +import org.opencb.opencga.client.exceptions.ClientException; +import org.opencb.opencga.core.common.JacksonUtils; import org.opencb.opencga.core.models.common.Enums; import org.opencb.opencga.core.models.file.FileContent; import org.opencb.opencga.core.models.job.Job; @@ -46,6 +27,8 @@ import org.opencb.opencga.core.models.job.JobTop; import org.opencb.opencga.core.models.job.JobUpdateParams; import org.opencb.opencga.core.models.job.ToolInfo; +import org.opencb.opencga.core.response.QueryType; +import org.opencb.opencga.core.response.RestResponse; import org.opencb.opencga.core.tools.annotations.Tool; import org.opencb.opencga.core.tools.result.ExecutionResult; import org.opencb.opencga.core.tools.result.ExecutorInfo; @@ -123,6 +106,12 @@ public void execute() throws Exception { case "log-tail": queryResponse = tailLog(); break; + case "log": + CustomJobsCommandExecutor customJobsCommandExecutor = new CustomJobsCommandExecutor( + new ObjectMap(jobsCommandOptions.commonCommandOptions.params), token, + clientConfiguration, getSessionManager(), appHome, getLogger()); + queryResponse = customJobsCommandExecutor.log(jobsCommandOptions.logCommandOptions); + break; default: logger.error("Subcommand not valid"); break; @@ -364,7 +353,7 @@ private RestResponse top() throws Exception { queryParams.putIfNotEmpty("study", sessionManager.getSession().getCurrentStudy()); } CustomJobsCommandExecutor customJobsCommandExecutor = new CustomJobsCommandExecutor(queryParams, token, clientConfiguration, getSessionManager(), appHome, getLogger()); - return customJobsCommandExecutor.top(); + return customJobsCommandExecutor.top(commandOptions); } private RestResponse acl() throws Exception { diff --git a/opencga-app/src/main/java/org/opencb/opencga/app/cli/main/executors/MetaCommandExecutor.java b/opencga-app/src/main/java/org/opencb/opencga/app/cli/main/executors/MetaCommandExecutor.java index 3f8448898be..e1d64ae2d4a 100644 --- a/opencga-app/src/main/java/org/opencb/opencga/app/cli/main/executors/MetaCommandExecutor.java +++ b/opencga-app/src/main/java/org/opencb/opencga/app/cli/main/executors/MetaCommandExecutor.java @@ -1,25 +1,20 @@ package org.opencb.opencga.app.cli.main.executors; import com.fasterxml.jackson.databind.DeserializationFeature; -import org.opencb.opencga.app.cli.main.executors.OpencgaCommandExecutor; -import org.opencb.opencga.app.cli.main.*; -import org.opencb.opencga.core.response.RestResponse; -import org.opencb.opencga.client.exceptions.ClientException; -import org.opencb.commons.datastore.core.ObjectMap; - -import org.opencb.opencga.catalog.exceptions.CatalogAuthenticationException; -import org.opencb.opencga.core.common.JacksonUtils; - import com.fasterxml.jackson.databind.ObjectMapper; -import java.util.List; import java.util.HashMap; -import org.opencb.opencga.core.response.QueryType; -import org.opencb.commons.utils.PrintUtils; - -import org.opencb.opencga.app.cli.main.options.MetaCommandOptions; - import java.util.List; import java.util.Map; +import org.opencb.commons.datastore.core.ObjectMap; +import org.opencb.commons.utils.PrintUtils; +import org.opencb.opencga.app.cli.main.*; +import org.opencb.opencga.app.cli.main.executors.OpencgaCommandExecutor; +import org.opencb.opencga.app.cli.main.options.MetaCommandOptions; +import org.opencb.opencga.catalog.exceptions.CatalogAuthenticationException; +import org.opencb.opencga.client.exceptions.ClientException; +import org.opencb.opencga.core.common.JacksonUtils; +import org.opencb.opencga.core.response.QueryType; +import org.opencb.opencga.core.response.RestResponse; /* diff --git a/opencga-app/src/main/java/org/opencb/opencga/app/cli/main/executors/OperationsVariantStorageCommandExecutor.java b/opencga-app/src/main/java/org/opencb/opencga/app/cli/main/executors/OperationsVariantStorageCommandExecutor.java index 1c0b3cb7d13..b9cd3f00190 100644 --- a/opencga-app/src/main/java/org/opencb/opencga/app/cli/main/executors/OperationsVariantStorageCommandExecutor.java +++ b/opencga-app/src/main/java/org/opencb/opencga/app/cli/main/executors/OperationsVariantStorageCommandExecutor.java @@ -1,25 +1,18 @@ package org.opencb.opencga.app.cli.main.executors; import com.fasterxml.jackson.databind.DeserializationFeature; -import org.opencb.opencga.app.cli.main.executors.OpencgaCommandExecutor; -import org.opencb.opencga.app.cli.main.*; -import org.opencb.opencga.core.response.RestResponse; -import org.opencb.opencga.client.exceptions.ClientException; -import org.opencb.commons.datastore.core.ObjectMap; - -import org.opencb.opencga.catalog.exceptions.CatalogAuthenticationException; -import org.opencb.opencga.core.common.JacksonUtils; - import com.fasterxml.jackson.databind.ObjectMapper; -import java.util.List; import java.util.HashMap; -import org.opencb.opencga.core.response.QueryType; -import org.opencb.commons.utils.PrintUtils; - -import org.opencb.opencga.app.cli.main.options.OperationsVariantStorageCommandOptions; - +import java.util.List; import org.opencb.biodata.models.variant.metadata.Aggregation; import org.opencb.commons.datastore.core.ObjectMap; +import org.opencb.commons.utils.PrintUtils; +import org.opencb.opencga.app.cli.main.*; +import org.opencb.opencga.app.cli.main.executors.OpencgaCommandExecutor; +import org.opencb.opencga.app.cli.main.options.OperationsVariantStorageCommandOptions; +import org.opencb.opencga.catalog.exceptions.CatalogAuthenticationException; +import org.opencb.opencga.client.exceptions.ClientException; +import org.opencb.opencga.core.common.JacksonUtils; import org.opencb.opencga.core.common.YesNoAuto; import org.opencb.opencga.core.config.storage.CellBaseConfiguration; import org.opencb.opencga.core.config.storage.SampleIndexConfiguration; @@ -44,6 +37,8 @@ import org.opencb.opencga.core.models.variant.VariantSampleDeleteParams; import org.opencb.opencga.core.models.variant.VariantStorageMetadataSynchronizeParams; import org.opencb.opencga.core.models.variant.VariantStudyDeleteParams; +import org.opencb.opencga.core.response.QueryType; +import org.opencb.opencga.core.response.RestResponse; /* diff --git a/opencga-app/src/main/java/org/opencb/opencga/app/cli/main/executors/ProjectsCommandExecutor.java b/opencga-app/src/main/java/org/opencb/opencga/app/cli/main/executors/ProjectsCommandExecutor.java index 7facd50d4d6..fe49490a5f6 100644 --- a/opencga-app/src/main/java/org/opencb/opencga/app/cli/main/executors/ProjectsCommandExecutor.java +++ b/opencga-app/src/main/java/org/opencb/opencga/app/cli/main/executors/ProjectsCommandExecutor.java @@ -1,30 +1,26 @@ package org.opencb.opencga.app.cli.main.executors; import com.fasterxml.jackson.databind.DeserializationFeature; -import org.opencb.opencga.app.cli.main.executors.OpencgaCommandExecutor; -import org.opencb.opencga.app.cli.main.*; -import org.opencb.opencga.core.response.RestResponse; -import org.opencb.opencga.client.exceptions.ClientException; -import org.opencb.commons.datastore.core.ObjectMap; - -import org.opencb.opencga.catalog.exceptions.CatalogAuthenticationException; -import org.opencb.opencga.core.common.JacksonUtils; - import com.fasterxml.jackson.databind.ObjectMapper; -import java.util.List; import java.util.HashMap; -import org.opencb.opencga.core.response.QueryType; +import java.util.List; +import org.opencb.commons.datastore.core.FacetField; +import org.opencb.commons.datastore.core.ObjectMap; import org.opencb.commons.utils.PrintUtils; - +import org.opencb.opencga.app.cli.main.*; +import org.opencb.opencga.app.cli.main.executors.OpencgaCommandExecutor; import org.opencb.opencga.app.cli.main.options.ProjectsCommandOptions; - -import org.opencb.commons.datastore.core.FacetField; +import org.opencb.opencga.catalog.exceptions.CatalogAuthenticationException; +import org.opencb.opencga.client.exceptions.ClientException; +import org.opencb.opencga.core.common.JacksonUtils; import org.opencb.opencga.core.config.storage.CellBaseConfiguration; import org.opencb.opencga.core.models.project.Project; import org.opencb.opencga.core.models.project.ProjectCreateParams; import org.opencb.opencga.core.models.project.ProjectOrganism; import org.opencb.opencga.core.models.project.ProjectUpdateParams; import org.opencb.opencga.core.models.study.Study; +import org.opencb.opencga.core.response.QueryType; +import org.opencb.opencga.core.response.RestResponse; /* diff --git a/opencga-app/src/main/java/org/opencb/opencga/app/cli/main/executors/SamplesCommandExecutor.java b/opencga-app/src/main/java/org/opencb/opencga/app/cli/main/executors/SamplesCommandExecutor.java index a88c8330a26..e3bd0666741 100644 --- a/opencga-app/src/main/java/org/opencb/opencga/app/cli/main/executors/SamplesCommandExecutor.java +++ b/opencga-app/src/main/java/org/opencb/opencga/app/cli/main/executors/SamplesCommandExecutor.java @@ -1,29 +1,23 @@ package org.opencb.opencga.app.cli.main.executors; import com.fasterxml.jackson.databind.DeserializationFeature; -import org.opencb.opencga.app.cli.main.executors.OpencgaCommandExecutor; -import org.opencb.opencga.app.cli.main.*; -import org.opencb.opencga.core.response.RestResponse; -import org.opencb.opencga.client.exceptions.ClientException; -import org.opencb.commons.datastore.core.ObjectMap; - -import org.opencb.opencga.catalog.exceptions.CatalogAuthenticationException; -import org.opencb.opencga.core.common.JacksonUtils; - import com.fasterxml.jackson.databind.ObjectMapper; -import java.util.List; import java.util.HashMap; -import org.opencb.opencga.core.response.QueryType; -import org.opencb.commons.utils.PrintUtils; - -import org.opencb.opencga.app.cli.main.options.SamplesCommandOptions; - +import java.util.List; import java.util.Map; import org.opencb.biodata.models.core.OntologyTermAnnotation; import org.opencb.commons.datastore.core.FacetField; +import org.opencb.commons.datastore.core.ObjectMap; +import org.opencb.commons.utils.PrintUtils; +import org.opencb.opencga.app.cli.main.*; +import org.opencb.opencga.app.cli.main.executors.OpencgaCommandExecutor; +import org.opencb.opencga.app.cli.main.options.SamplesCommandOptions; +import org.opencb.opencga.catalog.exceptions.CatalogAuthenticationException; import org.opencb.opencga.catalog.utils.ParamUtils.AclAction; import org.opencb.opencga.catalog.utils.ParamUtils.BasicUpdateAction; import org.opencb.opencga.catalog.utils.ParamUtils.CompleteUpdateAction; +import org.opencb.opencga.client.exceptions.ClientException; +import org.opencb.opencga.core.common.JacksonUtils; import org.opencb.opencga.core.models.common.ExternalSource; import org.opencb.opencga.core.models.common.RgaIndex.Status; import org.opencb.opencga.core.models.common.StatusParams; @@ -38,6 +32,8 @@ import org.opencb.opencga.core.models.sample.SampleQualityControl; import org.opencb.opencga.core.models.sample.SampleUpdateParams; import org.opencb.opencga.core.models.sample.SampleVariantQualityControlMetrics; +import org.opencb.opencga.core.response.QueryType; +import org.opencb.opencga.core.response.RestResponse; /* diff --git a/opencga-app/src/main/java/org/opencb/opencga/app/cli/main/executors/StudiesCommandExecutor.java b/opencga-app/src/main/java/org/opencb/opencga/app/cli/main/executors/StudiesCommandExecutor.java index 944262e77f1..e183fcae20d 100644 --- a/opencga-app/src/main/java/org/opencb/opencga/app/cli/main/executors/StudiesCommandExecutor.java +++ b/opencga-app/src/main/java/org/opencb/opencga/app/cli/main/executors/StudiesCommandExecutor.java @@ -1,54 +1,29 @@ package org.opencb.opencga.app.cli.main.executors; import com.fasterxml.jackson.databind.DeserializationFeature; -import org.opencb.opencga.app.cli.main.executors.OpencgaCommandExecutor; -import org.opencb.opencga.app.cli.main.*; -import org.opencb.opencga.core.response.RestResponse; -import org.opencb.opencga.client.exceptions.ClientException; -import org.opencb.commons.datastore.core.ObjectMap; - -import org.opencb.opencga.catalog.exceptions.CatalogAuthenticationException; -import org.opencb.opencga.core.common.JacksonUtils; - import com.fasterxml.jackson.databind.ObjectMapper; -import java.util.List; -import java.util.HashMap; -import org.opencb.opencga.core.response.QueryType; -import org.opencb.commons.utils.PrintUtils; - -import org.opencb.opencga.app.cli.main.options.StudiesCommandOptions; - -import org.opencb.opencga.app.cli.main.custom.CustomStudiesCommandExecutor; -import org.opencb.opencga.app.cli.main.custom.CustomStudiesCommandExecutor; -import org.opencb.opencga.app.cli.main.custom.CustomStudiesCommandExecutor; -import org.opencb.opencga.app.cli.main.custom.CustomStudiesCommandExecutor; -import org.opencb.opencga.app.cli.main.custom.CustomStudiesCommandExecutor; -import org.opencb.opencga.app.cli.main.custom.CustomStudiesCommandExecutor; -import org.opencb.opencga.app.cli.main.custom.CustomStudiesCommandExecutor; -import org.opencb.opencga.app.cli.main.custom.CustomStudiesCommandExecutor; -import org.opencb.opencga.app.cli.main.custom.CustomStudiesCommandExecutor; -import org.opencb.opencga.app.cli.main.custom.CustomStudiesCommandExecutor; -import org.opencb.opencga.app.cli.main.custom.CustomStudiesCommandExecutor; -import org.opencb.opencga.app.cli.main.custom.CustomStudiesCommandExecutor; -import org.opencb.opencga.app.cli.main.custom.CustomStudiesCommandExecutor; -import org.opencb.opencga.app.cli.main.custom.CustomStudiesCommandOptions; -import org.opencb.opencga.app.cli.main.custom.CustomStudiesCommandExecutor; -import org.opencb.opencga.app.cli.main.custom.CustomStudiesCommandOptions; -import org.opencb.opencga.app.cli.main.custom.CustomStudiesCommandExecutor; -import org.opencb.opencga.app.cli.main.custom.CustomStudiesCommandExecutor; -import org.opencb.opencga.app.cli.main.custom.CustomStudiesCommandExecutor; -import org.opencb.opencga.app.cli.main.custom.CustomStudiesCommandExecutor; -import org.opencb.opencga.app.cli.main.custom.CustomStudiesCommandExecutor; import java.io.InputStream; import java.lang.Object; import java.net.URL; +import java.util.HashMap; +import java.util.List; import java.util.Set; import org.opencb.commons.datastore.core.FacetField; +import org.opencb.commons.datastore.core.ObjectMap; import org.opencb.commons.datastore.core.Query; +import org.opencb.commons.utils.PrintUtils; +import org.opencb.opencga.app.cli.main.*; +import org.opencb.opencga.app.cli.main.custom.CustomStudiesCommandExecutor; +import org.opencb.opencga.app.cli.main.custom.CustomStudiesCommandOptions; +import org.opencb.opencga.app.cli.main.executors.OpencgaCommandExecutor; +import org.opencb.opencga.app.cli.main.options.StudiesCommandOptions; +import org.opencb.opencga.catalog.exceptions.CatalogAuthenticationException; import org.opencb.opencga.catalog.utils.ParamUtils.AclAction; import org.opencb.opencga.catalog.utils.ParamUtils.AddRemoveAction; import org.opencb.opencga.catalog.utils.ParamUtils.AddRemoveForceRemoveAction; import org.opencb.opencga.catalog.utils.ParamUtils.BasicUpdateAction; +import org.opencb.opencga.client.exceptions.ClientException; +import org.opencb.opencga.core.common.JacksonUtils; import org.opencb.opencga.core.models.AclEntryList; import org.opencb.opencga.core.models.audit.AuditRecord.Status.Result; import org.opencb.opencga.core.models.audit.AuditRecord; @@ -73,6 +48,8 @@ import org.opencb.opencga.core.models.study.Variable; import org.opencb.opencga.core.models.study.VariableSet; import org.opencb.opencga.core.models.study.VariableSetCreateParams; +import org.opencb.opencga.core.response.QueryType; +import org.opencb.opencga.core.response.RestResponse; /* @@ -464,7 +441,7 @@ private RestResponse runTemplates() throws Exception { queryParams.putIfNotEmpty("study", sessionManager.getSession().getCurrentStudy()); } CustomStudiesCommandExecutor customStudiesCommandExecutor = new CustomStudiesCommandExecutor(queryParams, token, clientConfiguration, getSessionManager(), appHome, getLogger()); - return customStudiesCommandExecutor.runTemplates(); + return customStudiesCommandExecutor.runTemplates(commandOptions); } private RestResponse uploadTemplates() throws Exception { @@ -478,7 +455,7 @@ private RestResponse uploadTemplates() throws Exception { queryParams.putIfNotEmpty("study", sessionManager.getSession().getCurrentStudy()); } CustomStudiesCommandExecutor customStudiesCommandExecutor = new CustomStudiesCommandExecutor(queryParams, token, clientConfiguration, getSessionManager(), appHome, getLogger()); - return customStudiesCommandExecutor.uploadTemplates(); + return customStudiesCommandExecutor.uploadTemplates(commandOptions); } private RestResponse deleteTemplates() throws Exception { diff --git a/opencga-app/src/main/java/org/opencb/opencga/app/cli/main/executors/UsersCommandExecutor.java b/opencga-app/src/main/java/org/opencb/opencga/app/cli/main/executors/UsersCommandExecutor.java index b2cca1037ba..0c19edfe709 100644 --- a/opencga-app/src/main/java/org/opencb/opencga/app/cli/main/executors/UsersCommandExecutor.java +++ b/opencga-app/src/main/java/org/opencb/opencga/app/cli/main/executors/UsersCommandExecutor.java @@ -1,39 +1,23 @@ package org.opencb.opencga.app.cli.main.executors; import com.fasterxml.jackson.databind.DeserializationFeature; -import org.opencb.opencga.app.cli.main.executors.OpencgaCommandExecutor; -import org.opencb.opencga.app.cli.main.*; -import org.opencb.opencga.core.response.RestResponse; -import org.opencb.opencga.client.exceptions.ClientException; -import org.opencb.commons.datastore.core.ObjectMap; - -import org.opencb.opencga.catalog.exceptions.CatalogAuthenticationException; -import org.opencb.opencga.core.common.JacksonUtils; - import com.fasterxml.jackson.databind.ObjectMapper; -import java.util.List; import java.util.HashMap; -import org.opencb.opencga.core.response.QueryType; -import org.opencb.commons.utils.PrintUtils; - -import org.opencb.opencga.app.cli.main.options.UsersCommandOptions; - -import org.opencb.opencga.app.cli.main.custom.CustomUsersCommandExecutor; -import org.opencb.opencga.app.cli.main.custom.CustomUsersCommandOptions; -import org.opencb.opencga.app.cli.main.custom.CustomUsersCommandExecutor; -import org.opencb.opencga.app.cli.main.custom.CustomUsersCommandExecutor; -import org.opencb.opencga.app.cli.main.custom.CustomUsersCommandExecutor; -import org.opencb.opencga.app.cli.main.custom.CustomUsersCommandExecutor; -import org.opencb.opencga.app.cli.main.custom.CustomUsersCommandExecutor; -import org.opencb.opencga.app.cli.main.custom.CustomUsersCommandExecutor; -import org.opencb.opencga.app.cli.main.custom.CustomUsersCommandExecutor; -import org.opencb.opencga.app.cli.main.custom.CustomUsersCommandExecutor; -import org.opencb.opencga.app.cli.main.custom.CustomUsersCommandExecutor; -import org.opencb.opencga.app.cli.main.custom.CustomUsersCommandExecutor; +import java.util.List; import java.util.Map; +import org.opencb.commons.datastore.core.ObjectMap; import org.opencb.commons.datastore.core.Query; import org.opencb.commons.datastore.core.QueryOptions; +import org.opencb.commons.utils.PrintUtils; +import org.opencb.opencga.app.cli.main.*; +import org.opencb.opencga.app.cli.main.custom.CustomUsersCommandExecutor; +import org.opencb.opencga.app.cli.main.custom.CustomUsersCommandOptions; +import org.opencb.opencga.app.cli.main.executors.OpencgaCommandExecutor; +import org.opencb.opencga.app.cli.main.options.UsersCommandOptions; +import org.opencb.opencga.catalog.exceptions.CatalogAuthenticationException; import org.opencb.opencga.catalog.utils.ParamUtils.AddRemoveAction; +import org.opencb.opencga.client.exceptions.ClientException; +import org.opencb.opencga.core.common.JacksonUtils; import org.opencb.opencga.core.models.common.Enums; import org.opencb.opencga.core.models.project.Project; import org.opencb.opencga.core.models.user.AuthenticationResponse; @@ -44,6 +28,8 @@ import org.opencb.opencga.core.models.user.User; import org.opencb.opencga.core.models.user.UserFilter; import org.opencb.opencga.core.models.user.UserUpdateParams; +import org.opencb.opencga.core.response.QueryType; +import org.opencb.opencga.core.response.RestResponse; /* @@ -105,6 +91,12 @@ public void execute() throws Exception { case "update": queryResponse = update(); break; + case "logout": + CustomUsersCommandExecutor customUsersCommandExecutor = new CustomUsersCommandExecutor( + new ObjectMap(usersCommandOptions.commonCommandOptions.params), token, + clientConfiguration, getSessionManager(), appHome, getLogger()); + queryResponse = customUsersCommandExecutor.logout(usersCommandOptions.logoutCommandOptions); + break; default: logger.error("Subcommand not valid"); break; @@ -123,7 +115,7 @@ private RestResponse login() throws Exception { queryParams.putIfNotEmpty("password", commandOptions.password); queryParams.putIfNotEmpty("refreshToken", commandOptions.refreshToken); CustomUsersCommandExecutor customUsersCommandExecutor = new CustomUsersCommandExecutor(queryParams, token, clientConfiguration, getSessionManager(), appHome, getLogger()); - return customUsersCommandExecutor.login(); + return customUsersCommandExecutor.login(commandOptions); } private RestResponse password() throws Exception { diff --git a/opencga-app/src/main/java/org/opencb/opencga/app/cli/main/options/AnalysisVariantCommandOptions.java b/opencga-app/src/main/java/org/opencb/opencga/app/cli/main/options/AnalysisVariantCommandOptions.java index e8a55bf7981..c69a1700845 100644 --- a/opencga-app/src/main/java/org/opencb/opencga/app/cli/main/options/AnalysisVariantCommandOptions.java +++ b/opencga-app/src/main/java/org/opencb/opencga/app/cli/main/options/AnalysisVariantCommandOptions.java @@ -1058,7 +1058,7 @@ public class RunIndexCommandOptions { @Parameter(names = {"--file"}, description = "List of files to be indexed.", required = false, arity = 1) public String file; - @Parameter(names = {"--resume"}, description = "Resume a previously failed indexation", required = false, help = true, arity = 0) + @Parameter(names = {"--resume"}, description = "Resume a previously failed index operation", required = false, help = true, arity = 0) public boolean resume = false; @Parameter(names = {"--outdir"}, description = "Output directory", required = false, arity = 1) diff --git a/opencga-app/src/main/java/org/opencb/opencga/app/cli/main/options/OperationsVariantStorageCommandOptions.java b/opencga-app/src/main/java/org/opencb/opencga/app/cli/main/options/OperationsVariantStorageCommandOptions.java index 8d94148fac3..5639d0dfed8 100644 --- a/opencga-app/src/main/java/org/opencb/opencga/app/cli/main/options/OperationsVariantStorageCommandOptions.java +++ b/opencga-app/src/main/java/org/opencb/opencga/app/cli/main/options/OperationsVariantStorageCommandOptions.java @@ -452,7 +452,7 @@ public class IndexVariantCommandOptions { @Parameter(names = {"--file"}, description = "List of files to be indexed.", required = false, arity = 1) public String file; - @Parameter(names = {"--resume"}, description = "Resume a previously failed indexation", required = false, help = true, arity = 0) + @Parameter(names = {"--resume"}, description = "Resume a previously failed index operation", required = false, help = true, arity = 0) public boolean resume = false; @Parameter(names = {"--outdir"}, description = "Output directory", required = false, arity = 1) @@ -586,7 +586,7 @@ public class LauncherVariantIndexCommandOptions { @Parameter(names = {"--index-params-file"}, description = "List of files to be indexed.", required = false, arity = 1) public String indexParamsFile; - @Parameter(names = {"--index-params-resume"}, description = "Resume a previously failed indexation", required = false, help = true, arity = 0) + @Parameter(names = {"--index-params-resume"}, description = "Resume a previously failed index operation", required = false, help = true, arity = 0) public boolean indexParamsResume = false; @Parameter(names = {"--index-params-outdir"}, description = "Output directory", required = false, arity = 1) diff --git a/opencga-client/src/main/R/R/Admin-methods.R b/opencga-client/src/main/R/R/Admin-methods.R index d3e67c50d4a..7d670ddf6c4 100644 --- a/opencga-client/src/main/R/R/Admin-methods.R +++ b/opencga-client/src/main/R/R/Admin-methods.R @@ -2,7 +2,7 @@ # WARNING: AUTOGENERATED CODE # # This code was generated by a tool. -# Autogenerated on: 2023-07-28 +# Autogenerated on: 2023-10-03 # # Manual changes to this file may cause unexpected behavior in your application. # Manual changes to this file will be overwritten if the code is regenerated. diff --git a/opencga-client/src/main/R/R/Alignment-methods.R b/opencga-client/src/main/R/R/Alignment-methods.R index ea404509c2e..70913d20917 100644 --- a/opencga-client/src/main/R/R/Alignment-methods.R +++ b/opencga-client/src/main/R/R/Alignment-methods.R @@ -2,7 +2,7 @@ # WARNING: AUTOGENERATED CODE # # This code was generated by a tool. -# Autogenerated on: 2023-07-28 +# Autogenerated on: 2023-10-03 # # Manual changes to this file may cause unexpected behavior in your application. # Manual changes to this file will be overwritten if the code is regenerated. diff --git a/opencga-client/src/main/R/R/AllGenerics.R b/opencga-client/src/main/R/R/AllGenerics.R index a40c6414d76..946f98a375e 100644 --- a/opencga-client/src/main/R/R/AllGenerics.R +++ b/opencga-client/src/main/R/R/AllGenerics.R @@ -1,6 +1,6 @@ # ############################################################################## ## UserClient -setGeneric("userClient", function(OpencgaR, filterId, users, user, endpointName, params=NULL, ...) +setGeneric("userClient", function(OpencgaR, filterId, user, users, endpointName, params=NULL, ...) standardGeneric("userClient")) # ############################################################################## @@ -10,42 +10,42 @@ setGeneric("projectClient", function(OpencgaR, projects, project, endpointName, # ############################################################################## ## StudyClient -setGeneric("studyClient", function(OpencgaR, group, study, members, templateId, variableSet, studies, endpointName, params=NULL, ...) +setGeneric("studyClient", function(OpencgaR, templateId, studies, members, study, variableSet, group, endpointName, params=NULL, ...) standardGeneric("studyClient")) # ############################################################################## ## FileClient -setGeneric("fileClient", function(OpencgaR, folder, file, files, annotationSet, members, endpointName, params=NULL, ...) +setGeneric("fileClient", function(OpencgaR, annotationSet, file, folder, files, members, endpointName, params=NULL, ...) standardGeneric("fileClient")) # ############################################################################## ## JobClient -setGeneric("jobClient", function(OpencgaR, job, jobs, members, endpointName, params=NULL, ...) +setGeneric("jobClient", function(OpencgaR, members, job, jobs, endpointName, params=NULL, ...) standardGeneric("jobClient")) # ############################################################################## ## SampleClient -setGeneric("sampleClient", function(OpencgaR, sample, annotationSet, samples, members, endpointName, params=NULL, ...) +setGeneric("sampleClient", function(OpencgaR, sample, members, annotationSet, samples, endpointName, params=NULL, ...) standardGeneric("sampleClient")) # ############################################################################## ## IndividualClient -setGeneric("individualClient", function(OpencgaR, annotationSet, individuals, individual, members, endpointName, params=NULL, ...) +setGeneric("individualClient", function(OpencgaR, individual, members, annotationSet, individuals, endpointName, params=NULL, ...) standardGeneric("individualClient")) # ############################################################################## ## FamilyClient -setGeneric("familyClient", function(OpencgaR, annotationSet, families, family, members, endpointName, params=NULL, ...) +setGeneric("familyClient", function(OpencgaR, families, family, members, annotationSet, endpointName, params=NULL, ...) standardGeneric("familyClient")) # ############################################################################## ## CohortClient -setGeneric("cohortClient", function(OpencgaR, cohorts, cohort, annotationSet, members, endpointName, params=NULL, ...) +setGeneric("cohortClient", function(OpencgaR, cohort, annotationSet, members, cohorts, endpointName, params=NULL, ...) standardGeneric("cohortClient")) # ############################################################################## ## PanelClient -setGeneric("panelClient", function(OpencgaR, panels, members, endpointName, params=NULL, ...) +setGeneric("panelClient", function(OpencgaR, members, panels, endpointName, params=NULL, ...) standardGeneric("panelClient")) # ############################################################################## @@ -60,7 +60,7 @@ setGeneric("variantClient", function(OpencgaR, endpointName, params=NULL, ...) # ############################################################################## ## ClinicalClient -setGeneric("clinicalClient", function(OpencgaR, clinicalAnalyses, clinicalAnalysis, interpretation, members, interpretations, endpointName, params=NULL, ...) +setGeneric("clinicalClient", function(OpencgaR, interpretation, members, interpretations, clinicalAnalysis, clinicalAnalyses, endpointName, params=NULL, ...) standardGeneric("clinicalClient")) # ############################################################################## diff --git a/opencga-client/src/main/R/R/Clinical-methods.R b/opencga-client/src/main/R/R/Clinical-methods.R index 7866e702032..9dc8deaa39e 100644 --- a/opencga-client/src/main/R/R/Clinical-methods.R +++ b/opencga-client/src/main/R/R/Clinical-methods.R @@ -2,7 +2,7 @@ # WARNING: AUTOGENERATED CODE # # This code was generated by a tool. -# Autogenerated on: 2023-07-28 +# Autogenerated on: 2023-10-03 # # Manual changes to this file may cause unexpected behavior in your application. # Manual changes to this file will be overwritten if the code is regenerated. @@ -58,7 +58,7 @@ #' [*]: Required parameter #' @export -setMethod("clinicalClient", "OpencgaR", function(OpencgaR, clinicalAnalyses, clinicalAnalysis, interpretation, members, interpretations, endpointName, params=NULL, ...) { +setMethod("clinicalClient", "OpencgaR", function(OpencgaR, interpretation, members, interpretations, clinicalAnalysis, clinicalAnalyses, endpointName, params=NULL, ...) { switch(endpointName, #' @section Endpoint /{apiVersion}/analysis/clinical/acl/{members}/update: diff --git a/opencga-client/src/main/R/R/Cohort-methods.R b/opencga-client/src/main/R/R/Cohort-methods.R index 9dd4ad2e6d6..e19b802b087 100644 --- a/opencga-client/src/main/R/R/Cohort-methods.R +++ b/opencga-client/src/main/R/R/Cohort-methods.R @@ -2,7 +2,7 @@ # WARNING: AUTOGENERATED CODE # # This code was generated by a tool. -# Autogenerated on: 2023-07-28 +# Autogenerated on: 2023-10-03 # # Manual changes to this file may cause unexpected behavior in your application. # Manual changes to this file will be overwritten if the code is regenerated. @@ -39,7 +39,7 @@ #' [*]: Required parameter #' @export -setMethod("cohortClient", "OpencgaR", function(OpencgaR, cohorts, cohort, annotationSet, members, endpointName, params=NULL, ...) { +setMethod("cohortClient", "OpencgaR", function(OpencgaR, cohort, annotationSet, members, cohorts, endpointName, params=NULL, ...) { switch(endpointName, #' @section Endpoint /{apiVersion}/cohorts/acl/{members}/update: diff --git a/opencga-client/src/main/R/R/Family-methods.R b/opencga-client/src/main/R/R/Family-methods.R index 6ca0bd513b6..efebddd578f 100644 --- a/opencga-client/src/main/R/R/Family-methods.R +++ b/opencga-client/src/main/R/R/Family-methods.R @@ -2,7 +2,7 @@ # WARNING: AUTOGENERATED CODE # # This code was generated by a tool. -# Autogenerated on: 2023-07-28 +# Autogenerated on: 2023-10-03 # # Manual changes to this file may cause unexpected behavior in your application. # Manual changes to this file will be overwritten if the code is regenerated. @@ -38,7 +38,7 @@ #' [*]: Required parameter #' @export -setMethod("familyClient", "OpencgaR", function(OpencgaR, annotationSet, families, family, members, endpointName, params=NULL, ...) { +setMethod("familyClient", "OpencgaR", function(OpencgaR, families, family, members, annotationSet, endpointName, params=NULL, ...) { switch(endpointName, #' @section Endpoint /{apiVersion}/families/acl/{members}/update: diff --git a/opencga-client/src/main/R/R/File-methods.R b/opencga-client/src/main/R/R/File-methods.R index 7549cd691e3..bcae2ba06ea 100644 --- a/opencga-client/src/main/R/R/File-methods.R +++ b/opencga-client/src/main/R/R/File-methods.R @@ -2,7 +2,7 @@ # WARNING: AUTOGENERATED CODE # # This code was generated by a tool. -# Autogenerated on: 2023-07-28 +# Autogenerated on: 2023-10-03 # # Manual changes to this file may cause unexpected behavior in your application. # Manual changes to this file will be overwritten if the code is regenerated. @@ -54,7 +54,7 @@ #' [*]: Required parameter #' @export -setMethod("fileClient", "OpencgaR", function(OpencgaR, folder, file, files, annotationSet, members, endpointName, params=NULL, ...) { +setMethod("fileClient", "OpencgaR", function(OpencgaR, annotationSet, file, folder, files, members, endpointName, params=NULL, ...) { switch(endpointName, #' @section Endpoint /{apiVersion}/files/acl/{members}/update: diff --git a/opencga-client/src/main/R/R/GA4GH-methods.R b/opencga-client/src/main/R/R/GA4GH-methods.R index 27034fe69dd..bfbdcb0cf45 100644 --- a/opencga-client/src/main/R/R/GA4GH-methods.R +++ b/opencga-client/src/main/R/R/GA4GH-methods.R @@ -2,7 +2,7 @@ # WARNING: AUTOGENERATED CODE # # This code was generated by a tool. -# Autogenerated on: 2023-07-28 +# Autogenerated on: 2023-10-03 # # Manual changes to this file may cause unexpected behavior in your application. # Manual changes to this file will be overwritten if the code is regenerated. diff --git a/opencga-client/src/main/R/R/Individual-methods.R b/opencga-client/src/main/R/R/Individual-methods.R index 7f555edc455..4f88ed1e303 100644 --- a/opencga-client/src/main/R/R/Individual-methods.R +++ b/opencga-client/src/main/R/R/Individual-methods.R @@ -2,7 +2,7 @@ # WARNING: AUTOGENERATED CODE # # This code was generated by a tool. -# Autogenerated on: 2023-07-28 +# Autogenerated on: 2023-10-03 # # Manual changes to this file may cause unexpected behavior in your application. # Manual changes to this file will be overwritten if the code is regenerated. @@ -39,7 +39,7 @@ #' [*]: Required parameter #' @export -setMethod("individualClient", "OpencgaR", function(OpencgaR, annotationSet, individuals, individual, members, endpointName, params=NULL, ...) { +setMethod("individualClient", "OpencgaR", function(OpencgaR, individual, members, annotationSet, individuals, endpointName, params=NULL, ...) { switch(endpointName, #' @section Endpoint /{apiVersion}/individuals/acl/{members}/update: diff --git a/opencga-client/src/main/R/R/Job-methods.R b/opencga-client/src/main/R/R/Job-methods.R index 9384517c9f9..19824efaa1b 100644 --- a/opencga-client/src/main/R/R/Job-methods.R +++ b/opencga-client/src/main/R/R/Job-methods.R @@ -2,7 +2,7 @@ # WARNING: AUTOGENERATED CODE # # This code was generated by a tool. -# Autogenerated on: 2023-07-28 +# Autogenerated on: 2023-10-03 # # Manual changes to this file may cause unexpected behavior in your application. # Manual changes to this file will be overwritten if the code is regenerated. @@ -40,7 +40,7 @@ #' [*]: Required parameter #' @export -setMethod("jobClient", "OpencgaR", function(OpencgaR, job, jobs, members, endpointName, params=NULL, ...) { +setMethod("jobClient", "OpencgaR", function(OpencgaR, members, job, jobs, endpointName, params=NULL, ...) { switch(endpointName, #' @section Endpoint /{apiVersion}/jobs/acl/{members}/update: diff --git a/opencga-client/src/main/R/R/Meta-methods.R b/opencga-client/src/main/R/R/Meta-methods.R index 19b287d5b2f..df7b6c5822a 100644 --- a/opencga-client/src/main/R/R/Meta-methods.R +++ b/opencga-client/src/main/R/R/Meta-methods.R @@ -2,7 +2,7 @@ # WARNING: AUTOGENERATED CODE # # This code was generated by a tool. -# Autogenerated on: 2023-07-28 +# Autogenerated on: 2023-10-03 # # Manual changes to this file may cause unexpected behavior in your application. # Manual changes to this file will be overwritten if the code is regenerated. diff --git a/opencga-client/src/main/R/R/Operation-methods.R b/opencga-client/src/main/R/R/Operation-methods.R index a0b91ca9d3d..67aa8ef6e74 100644 --- a/opencga-client/src/main/R/R/Operation-methods.R +++ b/opencga-client/src/main/R/R/Operation-methods.R @@ -2,7 +2,7 @@ # WARNING: AUTOGENERATED CODE # # This code was generated by a tool. -# Autogenerated on: 2023-07-28 +# Autogenerated on: 2023-10-03 # # Manual changes to this file may cause unexpected behavior in your application. # Manual changes to this file will be overwritten if the code is regenerated. diff --git a/opencga-client/src/main/R/R/Panel-methods.R b/opencga-client/src/main/R/R/Panel-methods.R index 632307c3855..6bddf64659d 100644 --- a/opencga-client/src/main/R/R/Panel-methods.R +++ b/opencga-client/src/main/R/R/Panel-methods.R @@ -2,7 +2,7 @@ # WARNING: AUTOGENERATED CODE # # This code was generated by a tool. -# Autogenerated on: 2023-07-28 +# Autogenerated on: 2023-10-03 # # Manual changes to this file may cause unexpected behavior in your application. # Manual changes to this file will be overwritten if the code is regenerated. @@ -36,7 +36,7 @@ #' [*]: Required parameter #' @export -setMethod("panelClient", "OpencgaR", function(OpencgaR, panels, members, endpointName, params=NULL, ...) { +setMethod("panelClient", "OpencgaR", function(OpencgaR, members, panels, endpointName, params=NULL, ...) { switch(endpointName, #' @section Endpoint /{apiVersion}/panels/acl/{members}/update: diff --git a/opencga-client/src/main/R/R/Project-methods.R b/opencga-client/src/main/R/R/Project-methods.R index 920696ba716..e5926f1db30 100644 --- a/opencga-client/src/main/R/R/Project-methods.R +++ b/opencga-client/src/main/R/R/Project-methods.R @@ -2,7 +2,7 @@ # WARNING: AUTOGENERATED CODE # # This code was generated by a tool. -# Autogenerated on: 2023-07-28 +# Autogenerated on: 2023-10-03 # # Manual changes to this file may cause unexpected behavior in your application. # Manual changes to this file will be overwritten if the code is regenerated. diff --git a/opencga-client/src/main/R/R/Sample-methods.R b/opencga-client/src/main/R/R/Sample-methods.R index cf89f9d20e4..b4fe9c16cce 100644 --- a/opencga-client/src/main/R/R/Sample-methods.R +++ b/opencga-client/src/main/R/R/Sample-methods.R @@ -2,7 +2,7 @@ # WARNING: AUTOGENERATED CODE # # This code was generated by a tool. -# Autogenerated on: 2023-07-28 +# Autogenerated on: 2023-10-03 # # Manual changes to this file may cause unexpected behavior in your application. # Manual changes to this file will be overwritten if the code is regenerated. @@ -39,7 +39,7 @@ #' [*]: Required parameter #' @export -setMethod("sampleClient", "OpencgaR", function(OpencgaR, sample, annotationSet, samples, members, endpointName, params=NULL, ...) { +setMethod("sampleClient", "OpencgaR", function(OpencgaR, sample, members, annotationSet, samples, endpointName, params=NULL, ...) { switch(endpointName, #' @section Endpoint /{apiVersion}/samples/acl/{members}/update: diff --git a/opencga-client/src/main/R/R/Study-methods.R b/opencga-client/src/main/R/R/Study-methods.R index eb488c2dc93..e46586b6735 100644 --- a/opencga-client/src/main/R/R/Study-methods.R +++ b/opencga-client/src/main/R/R/Study-methods.R @@ -2,7 +2,7 @@ # WARNING: AUTOGENERATED CODE # # This code was generated by a tool. -# Autogenerated on: 2023-07-28 +# Autogenerated on: 2023-10-03 # # Manual changes to this file may cause unexpected behavior in your application. # Manual changes to this file will be overwritten if the code is regenerated. @@ -46,7 +46,7 @@ #' [*]: Required parameter #' @export -setMethod("studyClient", "OpencgaR", function(OpencgaR, group, study, members, templateId, variableSet, studies, endpointName, params=NULL, ...) { +setMethod("studyClient", "OpencgaR", function(OpencgaR, templateId, studies, members, study, variableSet, group, endpointName, params=NULL, ...) { switch(endpointName, #' @section Endpoint /{apiVersion}/studies/acl/{members}/update: diff --git a/opencga-client/src/main/R/R/User-methods.R b/opencga-client/src/main/R/R/User-methods.R index bc35c83200f..bfe2644b4bd 100644 --- a/opencga-client/src/main/R/R/User-methods.R +++ b/opencga-client/src/main/R/R/User-methods.R @@ -2,7 +2,7 @@ # WARNING: AUTOGENERATED CODE # # This code was generated by a tool. -# Autogenerated on: 2023-07-28 +# Autogenerated on: 2023-10-03 # # Manual changes to this file may cause unexpected behavior in your application. # Manual changes to this file will be overwritten if the code is regenerated. @@ -38,7 +38,7 @@ #' [*]: Required parameter #' @export -setMethod("userClient", "OpencgaR", function(OpencgaR, filterId, users, user, endpointName, params=NULL, ...) { +setMethod("userClient", "OpencgaR", function(OpencgaR, filterId, user, users, endpointName, params=NULL, ...) { switch(endpointName, #' @section Endpoint /{apiVersion}/users/login: diff --git a/opencga-client/src/main/R/R/Variant-methods.R b/opencga-client/src/main/R/R/Variant-methods.R index f2a6e83c060..b353405561b 100644 --- a/opencga-client/src/main/R/R/Variant-methods.R +++ b/opencga-client/src/main/R/R/Variant-methods.R @@ -2,7 +2,7 @@ # WARNING: AUTOGENERATED CODE # # This code was generated by a tool. -# Autogenerated on: 2023-07-28 +# Autogenerated on: 2023-10-03 # # Manual changes to this file may cause unexpected behavior in your application. # Manual changes to this file will be overwritten if the code is regenerated. diff --git a/opencga-client/src/main/java/org/opencb/opencga/client/rest/clients/AdminClient.java b/opencga-client/src/main/java/org/opencb/opencga/client/rest/clients/AdminClient.java index 9f10cef3b6d..1ea397641b7 100644 --- a/opencga-client/src/main/java/org/opencb/opencga/client/rest/clients/AdminClient.java +++ b/opencga-client/src/main/java/org/opencb/opencga/client/rest/clients/AdminClient.java @@ -35,7 +35,7 @@ * WARNING: AUTOGENERATED CODE * * This code was generated by a tool. -* Autogenerated on: 2023-07-28 +* Autogenerated on: 2023-10-03 * * Manual changes to this file may cause unexpected behavior in your application. * Manual changes to this file will be overwritten if the code is regenerated. @@ -44,7 +44,7 @@ /** * This class contains methods for the Admin webservices. - * Client version: 2.8.3-SNAPSHOT + * Client version: 2.8.4-SNAPSHOT * PATH: admin */ public class AdminClient extends AbstractParentClient { diff --git a/opencga-client/src/main/java/org/opencb/opencga/client/rest/clients/AlignmentClient.java b/opencga-client/src/main/java/org/opencb/opencga/client/rest/clients/AlignmentClient.java index 6e7a1d2abd8..8871d357daa 100644 --- a/opencga-client/src/main/java/org/opencb/opencga/client/rest/clients/AlignmentClient.java +++ b/opencga-client/src/main/java/org/opencb/opencga/client/rest/clients/AlignmentClient.java @@ -40,7 +40,7 @@ * WARNING: AUTOGENERATED CODE * * This code was generated by a tool. -* Autogenerated on: 2023-07-28 +* Autogenerated on: 2023-10-03 * * Manual changes to this file may cause unexpected behavior in your application. * Manual changes to this file will be overwritten if the code is regenerated. @@ -49,7 +49,7 @@ /** * This class contains methods for the Alignment webservices. - * Client version: 2.8.3-SNAPSHOT + * Client version: 2.8.4-SNAPSHOT * PATH: analysis/alignment */ public class AlignmentClient extends AbstractParentClient { diff --git a/opencga-client/src/main/java/org/opencb/opencga/client/rest/clients/ClinicalAnalysisClient.java b/opencga-client/src/main/java/org/opencb/opencga/client/rest/clients/ClinicalAnalysisClient.java index f365c9d3306..5a4510b273f 100644 --- a/opencga-client/src/main/java/org/opencb/opencga/client/rest/clients/ClinicalAnalysisClient.java +++ b/opencga-client/src/main/java/org/opencb/opencga/client/rest/clients/ClinicalAnalysisClient.java @@ -51,7 +51,7 @@ * WARNING: AUTOGENERATED CODE * * This code was generated by a tool. -* Autogenerated on: 2023-07-28 +* Autogenerated on: 2023-10-03 * * Manual changes to this file may cause unexpected behavior in your application. * Manual changes to this file will be overwritten if the code is regenerated. @@ -60,7 +60,7 @@ /** * This class contains methods for the ClinicalAnalysis webservices. - * Client version: 2.8.3-SNAPSHOT + * Client version: 2.8.4-SNAPSHOT * PATH: analysis/clinical */ public class ClinicalAnalysisClient extends AbstractParentClient { diff --git a/opencga-client/src/main/java/org/opencb/opencga/client/rest/clients/CohortClient.java b/opencga-client/src/main/java/org/opencb/opencga/client/rest/clients/CohortClient.java index c1df8e2a1df..2f9c36cc46e 100644 --- a/opencga-client/src/main/java/org/opencb/opencga/client/rest/clients/CohortClient.java +++ b/opencga-client/src/main/java/org/opencb/opencga/client/rest/clients/CohortClient.java @@ -37,7 +37,7 @@ * WARNING: AUTOGENERATED CODE * * This code was generated by a tool. -* Autogenerated on: 2023-07-28 +* Autogenerated on: 2023-10-03 * * Manual changes to this file may cause unexpected behavior in your application. * Manual changes to this file will be overwritten if the code is regenerated. @@ -46,7 +46,7 @@ /** * This class contains methods for the Cohort webservices. - * Client version: 2.8.3-SNAPSHOT + * Client version: 2.8.4-SNAPSHOT * PATH: cohorts */ public class CohortClient extends AbstractParentClient { diff --git a/opencga-client/src/main/java/org/opencb/opencga/client/rest/clients/DiseasePanelClient.java b/opencga-client/src/main/java/org/opencb/opencga/client/rest/clients/DiseasePanelClient.java index fd9a2aa9367..1a89a88064d 100644 --- a/opencga-client/src/main/java/org/opencb/opencga/client/rest/clients/DiseasePanelClient.java +++ b/opencga-client/src/main/java/org/opencb/opencga/client/rest/clients/DiseasePanelClient.java @@ -35,7 +35,7 @@ * WARNING: AUTOGENERATED CODE * * This code was generated by a tool. -* Autogenerated on: 2023-07-28 +* Autogenerated on: 2023-10-03 * * Manual changes to this file may cause unexpected behavior in your application. * Manual changes to this file will be overwritten if the code is regenerated. @@ -44,7 +44,7 @@ /** * This class contains methods for the DiseasePanel webservices. - * Client version: 2.8.3-SNAPSHOT + * Client version: 2.8.4-SNAPSHOT * PATH: panels */ public class DiseasePanelClient extends AbstractParentClient { diff --git a/opencga-client/src/main/java/org/opencb/opencga/client/rest/clients/FamilyClient.java b/opencga-client/src/main/java/org/opencb/opencga/client/rest/clients/FamilyClient.java index 1d35c038da5..533347c7453 100644 --- a/opencga-client/src/main/java/org/opencb/opencga/client/rest/clients/FamilyClient.java +++ b/opencga-client/src/main/java/org/opencb/opencga/client/rest/clients/FamilyClient.java @@ -36,7 +36,7 @@ * WARNING: AUTOGENERATED CODE * * This code was generated by a tool. -* Autogenerated on: 2023-07-28 +* Autogenerated on: 2023-10-03 * * Manual changes to this file may cause unexpected behavior in your application. * Manual changes to this file will be overwritten if the code is regenerated. @@ -45,7 +45,7 @@ /** * This class contains methods for the Family webservices. - * Client version: 2.8.3-SNAPSHOT + * Client version: 2.8.4-SNAPSHOT * PATH: families */ public class FamilyClient extends AbstractParentClient { diff --git a/opencga-client/src/main/java/org/opencb/opencga/client/rest/clients/FileClient.java b/opencga-client/src/main/java/org/opencb/opencga/client/rest/clients/FileClient.java index 189b2000caa..ed15cbb0a45 100644 --- a/opencga-client/src/main/java/org/opencb/opencga/client/rest/clients/FileClient.java +++ b/opencga-client/src/main/java/org/opencb/opencga/client/rest/clients/FileClient.java @@ -43,7 +43,7 @@ * WARNING: AUTOGENERATED CODE * * This code was generated by a tool. -* Autogenerated on: 2023-07-28 +* Autogenerated on: 2023-10-03 * * Manual changes to this file may cause unexpected behavior in your application. * Manual changes to this file will be overwritten if the code is regenerated. @@ -52,7 +52,7 @@ /** * This class contains methods for the File webservices. - * Client version: 2.8.3-SNAPSHOT + * Client version: 2.8.4-SNAPSHOT * PATH: files */ public class FileClient extends AbstractParentClient { diff --git a/opencga-client/src/main/java/org/opencb/opencga/client/rest/clients/GA4GHClient.java b/opencga-client/src/main/java/org/opencb/opencga/client/rest/clients/GA4GHClient.java index cca31f9e791..bbe26f5b2a1 100644 --- a/opencga-client/src/main/java/org/opencb/opencga/client/rest/clients/GA4GHClient.java +++ b/opencga-client/src/main/java/org/opencb/opencga/client/rest/clients/GA4GHClient.java @@ -27,7 +27,7 @@ * WARNING: AUTOGENERATED CODE * * This code was generated by a tool. -* Autogenerated on: 2023-07-28 +* Autogenerated on: 2023-10-03 * * Manual changes to this file may cause unexpected behavior in your application. * Manual changes to this file will be overwritten if the code is regenerated. @@ -36,7 +36,7 @@ /** * This class contains methods for the GA4GH webservices. - * Client version: 2.8.3-SNAPSHOT + * Client version: 2.8.4-SNAPSHOT * PATH: ga4gh */ public class GA4GHClient extends AbstractParentClient { diff --git a/opencga-client/src/main/java/org/opencb/opencga/client/rest/clients/IndividualClient.java b/opencga-client/src/main/java/org/opencb/opencga/client/rest/clients/IndividualClient.java index f5c8219fe2d..b3f4900d0e4 100644 --- a/opencga-client/src/main/java/org/opencb/opencga/client/rest/clients/IndividualClient.java +++ b/opencga-client/src/main/java/org/opencb/opencga/client/rest/clients/IndividualClient.java @@ -36,7 +36,7 @@ * WARNING: AUTOGENERATED CODE * * This code was generated by a tool. -* Autogenerated on: 2023-07-28 +* Autogenerated on: 2023-10-03 * * Manual changes to this file may cause unexpected behavior in your application. * Manual changes to this file will be overwritten if the code is regenerated. @@ -45,7 +45,7 @@ /** * This class contains methods for the Individual webservices. - * Client version: 2.8.3-SNAPSHOT + * Client version: 2.8.4-SNAPSHOT * PATH: individuals */ public class IndividualClient extends AbstractParentClient { diff --git a/opencga-client/src/main/java/org/opencb/opencga/client/rest/clients/JobClient.java b/opencga-client/src/main/java/org/opencb/opencga/client/rest/clients/JobClient.java index f5d60864be5..4090e8decd2 100644 --- a/opencga-client/src/main/java/org/opencb/opencga/client/rest/clients/JobClient.java +++ b/opencga-client/src/main/java/org/opencb/opencga/client/rest/clients/JobClient.java @@ -37,7 +37,7 @@ * WARNING: AUTOGENERATED CODE * * This code was generated by a tool. -* Autogenerated on: 2023-07-28 +* Autogenerated on: 2023-10-03 * * Manual changes to this file may cause unexpected behavior in your application. * Manual changes to this file will be overwritten if the code is regenerated. @@ -46,7 +46,7 @@ /** * This class contains methods for the Job webservices. - * Client version: 2.8.3-SNAPSHOT + * Client version: 2.8.4-SNAPSHOT * PATH: jobs */ public class JobClient extends AbstractParentClient { diff --git a/opencga-client/src/main/java/org/opencb/opencga/client/rest/clients/MetaClient.java b/opencga-client/src/main/java/org/opencb/opencga/client/rest/clients/MetaClient.java index a2511aa7eb0..b1171fb6f09 100644 --- a/opencga-client/src/main/java/org/opencb/opencga/client/rest/clients/MetaClient.java +++ b/opencga-client/src/main/java/org/opencb/opencga/client/rest/clients/MetaClient.java @@ -28,7 +28,7 @@ * WARNING: AUTOGENERATED CODE * * This code was generated by a tool. -* Autogenerated on: 2023-07-28 +* Autogenerated on: 2023-10-03 * * Manual changes to this file may cause unexpected behavior in your application. * Manual changes to this file will be overwritten if the code is regenerated. @@ -37,7 +37,7 @@ /** * This class contains methods for the Meta webservices. - * Client version: 2.8.3-SNAPSHOT + * Client version: 2.8.4-SNAPSHOT * PATH: meta */ public class MetaClient extends AbstractParentClient { diff --git a/opencga-client/src/main/java/org/opencb/opencga/client/rest/clients/ProjectClient.java b/opencga-client/src/main/java/org/opencb/opencga/client/rest/clients/ProjectClient.java index 4f25299d77f..6ca8fbe712f 100644 --- a/opencga-client/src/main/java/org/opencb/opencga/client/rest/clients/ProjectClient.java +++ b/opencga-client/src/main/java/org/opencb/opencga/client/rest/clients/ProjectClient.java @@ -32,7 +32,7 @@ * WARNING: AUTOGENERATED CODE * * This code was generated by a tool. -* Autogenerated on: 2023-07-28 +* Autogenerated on: 2023-10-03 * * Manual changes to this file may cause unexpected behavior in your application. * Manual changes to this file will be overwritten if the code is regenerated. @@ -41,7 +41,7 @@ /** * This class contains methods for the Project webservices. - * Client version: 2.8.3-SNAPSHOT + * Client version: 2.8.4-SNAPSHOT * PATH: projects */ public class ProjectClient extends AbstractParentClient { diff --git a/opencga-client/src/main/java/org/opencb/opencga/client/rest/clients/SampleClient.java b/opencga-client/src/main/java/org/opencb/opencga/client/rest/clients/SampleClient.java index b75d1c759fb..d2893d1fbd8 100644 --- a/opencga-client/src/main/java/org/opencb/opencga/client/rest/clients/SampleClient.java +++ b/opencga-client/src/main/java/org/opencb/opencga/client/rest/clients/SampleClient.java @@ -36,7 +36,7 @@ * WARNING: AUTOGENERATED CODE * * This code was generated by a tool. -* Autogenerated on: 2023-07-28 +* Autogenerated on: 2023-10-03 * * Manual changes to this file may cause unexpected behavior in your application. * Manual changes to this file will be overwritten if the code is regenerated. @@ -45,7 +45,7 @@ /** * This class contains methods for the Sample webservices. - * Client version: 2.8.3-SNAPSHOT + * Client version: 2.8.4-SNAPSHOT * PATH: samples */ public class SampleClient extends AbstractParentClient { diff --git a/opencga-client/src/main/java/org/opencb/opencga/client/rest/clients/StudyClient.java b/opencga-client/src/main/java/org/opencb/opencga/client/rest/clients/StudyClient.java index a8b5678c5ae..490fa7965f4 100644 --- a/opencga-client/src/main/java/org/opencb/opencga/client/rest/clients/StudyClient.java +++ b/opencga-client/src/main/java/org/opencb/opencga/client/rest/clients/StudyClient.java @@ -45,7 +45,7 @@ * WARNING: AUTOGENERATED CODE * * This code was generated by a tool. -* Autogenerated on: 2023-07-28 +* Autogenerated on: 2023-10-03 * * Manual changes to this file may cause unexpected behavior in your application. * Manual changes to this file will be overwritten if the code is regenerated. @@ -54,7 +54,7 @@ /** * This class contains methods for the Study webservices. - * Client version: 2.8.3-SNAPSHOT + * Client version: 2.8.4-SNAPSHOT * PATH: studies */ public class StudyClient extends AbstractParentClient { diff --git a/opencga-client/src/main/java/org/opencb/opencga/client/rest/clients/UserClient.java b/opencga-client/src/main/java/org/opencb/opencga/client/rest/clients/UserClient.java index 8ca08bbd7e0..0f236e8ce14 100644 --- a/opencga-client/src/main/java/org/opencb/opencga/client/rest/clients/UserClient.java +++ b/opencga-client/src/main/java/org/opencb/opencga/client/rest/clients/UserClient.java @@ -36,7 +36,7 @@ * WARNING: AUTOGENERATED CODE * * This code was generated by a tool. -* Autogenerated on: 2023-07-28 +* Autogenerated on: 2023-10-03 * * Manual changes to this file may cause unexpected behavior in your application. * Manual changes to this file will be overwritten if the code is regenerated. @@ -45,7 +45,7 @@ /** * This class contains methods for the User webservices. - * Client version: 2.8.3-SNAPSHOT + * Client version: 2.8.4-SNAPSHOT * PATH: users */ public class UserClient extends AbstractParentClient { diff --git a/opencga-client/src/main/java/org/opencb/opencga/client/rest/clients/VariantClient.java b/opencga-client/src/main/java/org/opencb/opencga/client/rest/clients/VariantClient.java index 812474e898f..a9981fb6b89 100644 --- a/opencga-client/src/main/java/org/opencb/opencga/client/rest/clients/VariantClient.java +++ b/opencga-client/src/main/java/org/opencb/opencga/client/rest/clients/VariantClient.java @@ -62,7 +62,7 @@ * WARNING: AUTOGENERATED CODE * * This code was generated by a tool. -* Autogenerated on: 2023-07-28 +* Autogenerated on: 2023-10-03 * * Manual changes to this file may cause unexpected behavior in your application. * Manual changes to this file will be overwritten if the code is regenerated. @@ -71,7 +71,7 @@ /** * This class contains methods for the Variant webservices. - * Client version: 2.8.3-SNAPSHOT + * Client version: 2.8.4-SNAPSHOT * PATH: analysis/variant */ public class VariantClient extends AbstractParentClient { diff --git a/opencga-client/src/main/java/org/opencb/opencga/client/rest/clients/VariantOperationClient.java b/opencga-client/src/main/java/org/opencb/opencga/client/rest/clients/VariantOperationClient.java index 7a32525c569..9d1077d3d29 100644 --- a/opencga-client/src/main/java/org/opencb/opencga/client/rest/clients/VariantOperationClient.java +++ b/opencga-client/src/main/java/org/opencb/opencga/client/rest/clients/VariantOperationClient.java @@ -50,7 +50,7 @@ * WARNING: AUTOGENERATED CODE * * This code was generated by a tool. -* Autogenerated on: 2023-07-28 +* Autogenerated on: 2023-10-03 * * Manual changes to this file may cause unexpected behavior in your application. * Manual changes to this file will be overwritten if the code is regenerated. @@ -59,7 +59,7 @@ /** * This class contains methods for the VariantOperation webservices. - * Client version: 2.8.3-SNAPSHOT + * Client version: 2.8.4-SNAPSHOT * PATH: operation */ public class VariantOperationClient extends AbstractParentClient { diff --git a/opencga-client/src/main/javascript/Admin.js b/opencga-client/src/main/javascript/Admin.js index b0766ce818c..d1626ce9144 100644 --- a/opencga-client/src/main/javascript/Admin.js +++ b/opencga-client/src/main/javascript/Admin.js @@ -12,7 +12,7 @@ * WARNING: AUTOGENERATED CODE * * This code was generated by a tool. - * Autogenerated on: 2023-07-28 + * Autogenerated on: 2023-10-03 * * Manual changes to this file may cause unexpected behavior in your application. * Manual changes to this file will be overwritten if the code is regenerated. diff --git a/opencga-client/src/main/javascript/Alignment.js b/opencga-client/src/main/javascript/Alignment.js index 28d04b2b7b0..1df01ab72ae 100644 --- a/opencga-client/src/main/javascript/Alignment.js +++ b/opencga-client/src/main/javascript/Alignment.js @@ -12,7 +12,7 @@ * WARNING: AUTOGENERATED CODE * * This code was generated by a tool. - * Autogenerated on: 2023-07-28 + * Autogenerated on: 2023-10-03 * * Manual changes to this file may cause unexpected behavior in your application. * Manual changes to this file will be overwritten if the code is regenerated. diff --git a/opencga-client/src/main/javascript/ClinicalAnalysis.js b/opencga-client/src/main/javascript/ClinicalAnalysis.js index a575404e2a1..e4afce6009a 100644 --- a/opencga-client/src/main/javascript/ClinicalAnalysis.js +++ b/opencga-client/src/main/javascript/ClinicalAnalysis.js @@ -12,7 +12,7 @@ * WARNING: AUTOGENERATED CODE * * This code was generated by a tool. - * Autogenerated on: 2023-07-28 + * Autogenerated on: 2023-10-03 * * Manual changes to this file may cause unexpected behavior in your application. * Manual changes to this file will be overwritten if the code is regenerated. diff --git a/opencga-client/src/main/javascript/Cohort.js b/opencga-client/src/main/javascript/Cohort.js index 648bf8180d5..ef1f0e981a8 100644 --- a/opencga-client/src/main/javascript/Cohort.js +++ b/opencga-client/src/main/javascript/Cohort.js @@ -12,7 +12,7 @@ * WARNING: AUTOGENERATED CODE * * This code was generated by a tool. - * Autogenerated on: 2023-07-28 + * Autogenerated on: 2023-10-03 * * Manual changes to this file may cause unexpected behavior in your application. * Manual changes to this file will be overwritten if the code is regenerated. diff --git a/opencga-client/src/main/javascript/DiseasePanel.js b/opencga-client/src/main/javascript/DiseasePanel.js index b5050972e8b..bc46764ac7b 100644 --- a/opencga-client/src/main/javascript/DiseasePanel.js +++ b/opencga-client/src/main/javascript/DiseasePanel.js @@ -12,7 +12,7 @@ * WARNING: AUTOGENERATED CODE * * This code was generated by a tool. - * Autogenerated on: 2023-07-28 + * Autogenerated on: 2023-10-03 * * Manual changes to this file may cause unexpected behavior in your application. * Manual changes to this file will be overwritten if the code is regenerated. diff --git a/opencga-client/src/main/javascript/Family.js b/opencga-client/src/main/javascript/Family.js index cc25019b2ff..7490b5420f8 100644 --- a/opencga-client/src/main/javascript/Family.js +++ b/opencga-client/src/main/javascript/Family.js @@ -12,7 +12,7 @@ * WARNING: AUTOGENERATED CODE * * This code was generated by a tool. - * Autogenerated on: 2023-07-28 + * Autogenerated on: 2023-10-03 * * Manual changes to this file may cause unexpected behavior in your application. * Manual changes to this file will be overwritten if the code is regenerated. diff --git a/opencga-client/src/main/javascript/File.js b/opencga-client/src/main/javascript/File.js index db267764fcd..39704df1101 100644 --- a/opencga-client/src/main/javascript/File.js +++ b/opencga-client/src/main/javascript/File.js @@ -12,7 +12,7 @@ * WARNING: AUTOGENERATED CODE * * This code was generated by a tool. - * Autogenerated on: 2023-07-28 + * Autogenerated on: 2023-10-03 * * Manual changes to this file may cause unexpected behavior in your application. * Manual changes to this file will be overwritten if the code is regenerated. diff --git a/opencga-client/src/main/javascript/GA4GH.js b/opencga-client/src/main/javascript/GA4GH.js index a7c03ec5c97..e46b47b8979 100644 --- a/opencga-client/src/main/javascript/GA4GH.js +++ b/opencga-client/src/main/javascript/GA4GH.js @@ -12,7 +12,7 @@ * WARNING: AUTOGENERATED CODE * * This code was generated by a tool. - * Autogenerated on: 2023-07-28 + * Autogenerated on: 2023-10-03 * * Manual changes to this file may cause unexpected behavior in your application. * Manual changes to this file will be overwritten if the code is regenerated. diff --git a/opencga-client/src/main/javascript/Individual.js b/opencga-client/src/main/javascript/Individual.js index af67213f129..897f8432e7a 100644 --- a/opencga-client/src/main/javascript/Individual.js +++ b/opencga-client/src/main/javascript/Individual.js @@ -12,7 +12,7 @@ * WARNING: AUTOGENERATED CODE * * This code was generated by a tool. - * Autogenerated on: 2023-07-28 + * Autogenerated on: 2023-10-03 * * Manual changes to this file may cause unexpected behavior in your application. * Manual changes to this file will be overwritten if the code is regenerated. diff --git a/opencga-client/src/main/javascript/Job.js b/opencga-client/src/main/javascript/Job.js index 95dd1ecb855..d17bb08beab 100644 --- a/opencga-client/src/main/javascript/Job.js +++ b/opencga-client/src/main/javascript/Job.js @@ -12,7 +12,7 @@ * WARNING: AUTOGENERATED CODE * * This code was generated by a tool. - * Autogenerated on: 2023-07-28 + * Autogenerated on: 2023-10-03 * * Manual changes to this file may cause unexpected behavior in your application. * Manual changes to this file will be overwritten if the code is regenerated. diff --git a/opencga-client/src/main/javascript/Meta.js b/opencga-client/src/main/javascript/Meta.js index e59cac86214..c69d26182d6 100644 --- a/opencga-client/src/main/javascript/Meta.js +++ b/opencga-client/src/main/javascript/Meta.js @@ -12,7 +12,7 @@ * WARNING: AUTOGENERATED CODE * * This code was generated by a tool. - * Autogenerated on: 2023-07-28 + * Autogenerated on: 2023-10-03 * * Manual changes to this file may cause unexpected behavior in your application. * Manual changes to this file will be overwritten if the code is regenerated. diff --git a/opencga-client/src/main/javascript/Project.js b/opencga-client/src/main/javascript/Project.js index 24f6d0500b4..e4cb1219c46 100644 --- a/opencga-client/src/main/javascript/Project.js +++ b/opencga-client/src/main/javascript/Project.js @@ -12,7 +12,7 @@ * WARNING: AUTOGENERATED CODE * * This code was generated by a tool. - * Autogenerated on: 2023-07-28 + * Autogenerated on: 2023-10-03 * * Manual changes to this file may cause unexpected behavior in your application. * Manual changes to this file will be overwritten if the code is regenerated. diff --git a/opencga-client/src/main/javascript/Sample.js b/opencga-client/src/main/javascript/Sample.js index d932f90ee6a..b0f3da58e07 100644 --- a/opencga-client/src/main/javascript/Sample.js +++ b/opencga-client/src/main/javascript/Sample.js @@ -12,7 +12,7 @@ * WARNING: AUTOGENERATED CODE * * This code was generated by a tool. - * Autogenerated on: 2023-07-28 + * Autogenerated on: 2023-10-03 * * Manual changes to this file may cause unexpected behavior in your application. * Manual changes to this file will be overwritten if the code is regenerated. diff --git a/opencga-client/src/main/javascript/Study.js b/opencga-client/src/main/javascript/Study.js index 51c9fbad1b9..4e2ad088916 100644 --- a/opencga-client/src/main/javascript/Study.js +++ b/opencga-client/src/main/javascript/Study.js @@ -12,7 +12,7 @@ * WARNING: AUTOGENERATED CODE * * This code was generated by a tool. - * Autogenerated on: 2023-07-28 + * Autogenerated on: 2023-10-03 * * Manual changes to this file may cause unexpected behavior in your application. * Manual changes to this file will be overwritten if the code is regenerated. diff --git a/opencga-client/src/main/javascript/User.js b/opencga-client/src/main/javascript/User.js index 101fe7beda7..db70e5012ae 100644 --- a/opencga-client/src/main/javascript/User.js +++ b/opencga-client/src/main/javascript/User.js @@ -12,7 +12,7 @@ * WARNING: AUTOGENERATED CODE * * This code was generated by a tool. - * Autogenerated on: 2023-07-28 + * Autogenerated on: 2023-10-03 * * Manual changes to this file may cause unexpected behavior in your application. * Manual changes to this file will be overwritten if the code is regenerated. diff --git a/opencga-client/src/main/javascript/Variant.js b/opencga-client/src/main/javascript/Variant.js index 7baf84d27ef..e41869a11a3 100644 --- a/opencga-client/src/main/javascript/Variant.js +++ b/opencga-client/src/main/javascript/Variant.js @@ -12,7 +12,7 @@ * WARNING: AUTOGENERATED CODE * * This code was generated by a tool. - * Autogenerated on: 2023-07-28 + * Autogenerated on: 2023-10-03 * * Manual changes to this file may cause unexpected behavior in your application. * Manual changes to this file will be overwritten if the code is regenerated. diff --git a/opencga-client/src/main/javascript/VariantOperation.js b/opencga-client/src/main/javascript/VariantOperation.js index 4883b0065a7..f82503aa516 100644 --- a/opencga-client/src/main/javascript/VariantOperation.js +++ b/opencga-client/src/main/javascript/VariantOperation.js @@ -12,7 +12,7 @@ * WARNING: AUTOGENERATED CODE * * This code was generated by a tool. - * Autogenerated on: 2023-07-28 + * Autogenerated on: 2023-10-03 * * Manual changes to this file may cause unexpected behavior in your application. * Manual changes to this file will be overwritten if the code is regenerated. diff --git a/opencga-client/src/main/python/pyopencga/rest_clients/admin_client.py b/opencga-client/src/main/python/pyopencga/rest_clients/admin_client.py index 74db25099bd..1b28df5bf18 100644 --- a/opencga-client/src/main/python/pyopencga/rest_clients/admin_client.py +++ b/opencga-client/src/main/python/pyopencga/rest_clients/admin_client.py @@ -2,7 +2,7 @@ WARNING: AUTOGENERATED CODE This code was generated by a tool. - Autogenerated on: 2023-07-28 + Autogenerated on: 2023-10-03 Manual changes to this file may cause unexpected behavior in your application. Manual changes to this file will be overwritten if the code is regenerated. @@ -14,7 +14,7 @@ class Admin(_ParentRestClient): """ This class contains methods for the 'Admin' webservices - Client version: 2.8.3-SNAPSHOT + Client version: 2.8.4-SNAPSHOT PATH: /{apiVersion}/admin """ diff --git a/opencga-client/src/main/python/pyopencga/rest_clients/alignment_client.py b/opencga-client/src/main/python/pyopencga/rest_clients/alignment_client.py index 7618077ceaa..c3db8524f0f 100644 --- a/opencga-client/src/main/python/pyopencga/rest_clients/alignment_client.py +++ b/opencga-client/src/main/python/pyopencga/rest_clients/alignment_client.py @@ -2,7 +2,7 @@ WARNING: AUTOGENERATED CODE This code was generated by a tool. - Autogenerated on: 2023-07-28 + Autogenerated on: 2023-10-03 Manual changes to this file may cause unexpected behavior in your application. Manual changes to this file will be overwritten if the code is regenerated. @@ -14,7 +14,7 @@ class Alignment(_ParentRestClient): """ This class contains methods for the 'Analysis - Alignment' webservices - Client version: 2.8.3-SNAPSHOT + Client version: 2.8.4-SNAPSHOT PATH: /{apiVersion}/analysis/alignment """ diff --git a/opencga-client/src/main/python/pyopencga/rest_clients/clinical_analysis_client.py b/opencga-client/src/main/python/pyopencga/rest_clients/clinical_analysis_client.py index 2eae0068cd3..68fe9c1b1a9 100644 --- a/opencga-client/src/main/python/pyopencga/rest_clients/clinical_analysis_client.py +++ b/opencga-client/src/main/python/pyopencga/rest_clients/clinical_analysis_client.py @@ -2,7 +2,7 @@ WARNING: AUTOGENERATED CODE This code was generated by a tool. - Autogenerated on: 2023-07-28 + Autogenerated on: 2023-10-03 Manual changes to this file may cause unexpected behavior in your application. Manual changes to this file will be overwritten if the code is regenerated. @@ -14,7 +14,7 @@ class ClinicalAnalysis(_ParentRestClient): """ This class contains methods for the 'Analysis - Clinical' webservices - Client version: 2.8.3-SNAPSHOT + Client version: 2.8.4-SNAPSHOT PATH: /{apiVersion}/analysis/clinical """ diff --git a/opencga-client/src/main/python/pyopencga/rest_clients/cohort_client.py b/opencga-client/src/main/python/pyopencga/rest_clients/cohort_client.py index 84c65af11d1..00ba54caae5 100644 --- a/opencga-client/src/main/python/pyopencga/rest_clients/cohort_client.py +++ b/opencga-client/src/main/python/pyopencga/rest_clients/cohort_client.py @@ -2,7 +2,7 @@ WARNING: AUTOGENERATED CODE This code was generated by a tool. - Autogenerated on: 2023-07-28 + Autogenerated on: 2023-10-03 Manual changes to this file may cause unexpected behavior in your application. Manual changes to this file will be overwritten if the code is regenerated. @@ -14,7 +14,7 @@ class Cohort(_ParentRestClient): """ This class contains methods for the 'Cohorts' webservices - Client version: 2.8.3-SNAPSHOT + Client version: 2.8.4-SNAPSHOT PATH: /{apiVersion}/cohorts """ diff --git a/opencga-client/src/main/python/pyopencga/rest_clients/disease_panel_client.py b/opencga-client/src/main/python/pyopencga/rest_clients/disease_panel_client.py index 867dd915d0f..124b422375d 100644 --- a/opencga-client/src/main/python/pyopencga/rest_clients/disease_panel_client.py +++ b/opencga-client/src/main/python/pyopencga/rest_clients/disease_panel_client.py @@ -2,7 +2,7 @@ WARNING: AUTOGENERATED CODE This code was generated by a tool. - Autogenerated on: 2023-07-28 + Autogenerated on: 2023-10-03 Manual changes to this file may cause unexpected behavior in your application. Manual changes to this file will be overwritten if the code is regenerated. @@ -14,7 +14,7 @@ class DiseasePanel(_ParentRestClient): """ This class contains methods for the 'Disease Panels' webservices - Client version: 2.8.3-SNAPSHOT + Client version: 2.8.4-SNAPSHOT PATH: /{apiVersion}/panels """ diff --git a/opencga-client/src/main/python/pyopencga/rest_clients/family_client.py b/opencga-client/src/main/python/pyopencga/rest_clients/family_client.py index 3afc10da5c7..40c6eec2439 100644 --- a/opencga-client/src/main/python/pyopencga/rest_clients/family_client.py +++ b/opencga-client/src/main/python/pyopencga/rest_clients/family_client.py @@ -2,7 +2,7 @@ WARNING: AUTOGENERATED CODE This code was generated by a tool. - Autogenerated on: 2023-07-28 + Autogenerated on: 2023-10-03 Manual changes to this file may cause unexpected behavior in your application. Manual changes to this file will be overwritten if the code is regenerated. @@ -14,7 +14,7 @@ class Family(_ParentRestClient): """ This class contains methods for the 'Families' webservices - Client version: 2.8.3-SNAPSHOT + Client version: 2.8.4-SNAPSHOT PATH: /{apiVersion}/families """ diff --git a/opencga-client/src/main/python/pyopencga/rest_clients/file_client.py b/opencga-client/src/main/python/pyopencga/rest_clients/file_client.py index 7477428ff83..7f61d476e46 100644 --- a/opencga-client/src/main/python/pyopencga/rest_clients/file_client.py +++ b/opencga-client/src/main/python/pyopencga/rest_clients/file_client.py @@ -2,7 +2,7 @@ WARNING: AUTOGENERATED CODE This code was generated by a tool. - Autogenerated on: 2023-07-28 + Autogenerated on: 2023-10-03 Manual changes to this file may cause unexpected behavior in your application. Manual changes to this file will be overwritten if the code is regenerated. @@ -14,7 +14,7 @@ class File(_ParentRestClient): """ This class contains methods for the 'Files' webservices - Client version: 2.8.3-SNAPSHOT + Client version: 2.8.4-SNAPSHOT PATH: /{apiVersion}/files """ diff --git a/opencga-client/src/main/python/pyopencga/rest_clients/ga4gh_client.py b/opencga-client/src/main/python/pyopencga/rest_clients/ga4gh_client.py index 8f23e653f21..33dd6d98005 100644 --- a/opencga-client/src/main/python/pyopencga/rest_clients/ga4gh_client.py +++ b/opencga-client/src/main/python/pyopencga/rest_clients/ga4gh_client.py @@ -2,7 +2,7 @@ WARNING: AUTOGENERATED CODE This code was generated by a tool. - Autogenerated on: 2023-07-28 + Autogenerated on: 2023-10-03 Manual changes to this file may cause unexpected behavior in your application. Manual changes to this file will be overwritten if the code is regenerated. @@ -14,7 +14,7 @@ class GA4GH(_ParentRestClient): """ This class contains methods for the 'GA4GH' webservices - Client version: 2.8.3-SNAPSHOT + Client version: 2.8.4-SNAPSHOT PATH: /{apiVersion}/ga4gh """ diff --git a/opencga-client/src/main/python/pyopencga/rest_clients/individual_client.py b/opencga-client/src/main/python/pyopencga/rest_clients/individual_client.py index 5999c05f36d..49c6cb18990 100644 --- a/opencga-client/src/main/python/pyopencga/rest_clients/individual_client.py +++ b/opencga-client/src/main/python/pyopencga/rest_clients/individual_client.py @@ -2,7 +2,7 @@ WARNING: AUTOGENERATED CODE This code was generated by a tool. - Autogenerated on: 2023-07-28 + Autogenerated on: 2023-10-03 Manual changes to this file may cause unexpected behavior in your application. Manual changes to this file will be overwritten if the code is regenerated. @@ -14,7 +14,7 @@ class Individual(_ParentRestClient): """ This class contains methods for the 'Individuals' webservices - Client version: 2.8.3-SNAPSHOT + Client version: 2.8.4-SNAPSHOT PATH: /{apiVersion}/individuals """ diff --git a/opencga-client/src/main/python/pyopencga/rest_clients/job_client.py b/opencga-client/src/main/python/pyopencga/rest_clients/job_client.py index 7b625dc2aa6..5995452943e 100644 --- a/opencga-client/src/main/python/pyopencga/rest_clients/job_client.py +++ b/opencga-client/src/main/python/pyopencga/rest_clients/job_client.py @@ -2,7 +2,7 @@ WARNING: AUTOGENERATED CODE This code was generated by a tool. - Autogenerated on: 2023-07-28 + Autogenerated on: 2023-10-03 Manual changes to this file may cause unexpected behavior in your application. Manual changes to this file will be overwritten if the code is regenerated. @@ -14,7 +14,7 @@ class Job(_ParentRestClient): """ This class contains methods for the 'Jobs' webservices - Client version: 2.8.3-SNAPSHOT + Client version: 2.8.4-SNAPSHOT PATH: /{apiVersion}/jobs """ diff --git a/opencga-client/src/main/python/pyopencga/rest_clients/meta_client.py b/opencga-client/src/main/python/pyopencga/rest_clients/meta_client.py index 975f72d31cf..6d0fe4a749c 100644 --- a/opencga-client/src/main/python/pyopencga/rest_clients/meta_client.py +++ b/opencga-client/src/main/python/pyopencga/rest_clients/meta_client.py @@ -2,7 +2,7 @@ WARNING: AUTOGENERATED CODE This code was generated by a tool. - Autogenerated on: 2023-07-28 + Autogenerated on: 2023-10-03 Manual changes to this file may cause unexpected behavior in your application. Manual changes to this file will be overwritten if the code is regenerated. @@ -14,7 +14,7 @@ class Meta(_ParentRestClient): """ This class contains methods for the 'Meta' webservices - Client version: 2.8.3-SNAPSHOT + Client version: 2.8.4-SNAPSHOT PATH: /{apiVersion}/meta """ diff --git a/opencga-client/src/main/python/pyopencga/rest_clients/project_client.py b/opencga-client/src/main/python/pyopencga/rest_clients/project_client.py index 60afa46fc33..00a9352c398 100644 --- a/opencga-client/src/main/python/pyopencga/rest_clients/project_client.py +++ b/opencga-client/src/main/python/pyopencga/rest_clients/project_client.py @@ -2,7 +2,7 @@ WARNING: AUTOGENERATED CODE This code was generated by a tool. - Autogenerated on: 2023-07-28 + Autogenerated on: 2023-10-03 Manual changes to this file may cause unexpected behavior in your application. Manual changes to this file will be overwritten if the code is regenerated. @@ -14,7 +14,7 @@ class Project(_ParentRestClient): """ This class contains methods for the 'Projects' webservices - Client version: 2.8.3-SNAPSHOT + Client version: 2.8.4-SNAPSHOT PATH: /{apiVersion}/projects """ diff --git a/opencga-client/src/main/python/pyopencga/rest_clients/sample_client.py b/opencga-client/src/main/python/pyopencga/rest_clients/sample_client.py index 34743081040..c745f9e58e9 100644 --- a/opencga-client/src/main/python/pyopencga/rest_clients/sample_client.py +++ b/opencga-client/src/main/python/pyopencga/rest_clients/sample_client.py @@ -2,7 +2,7 @@ WARNING: AUTOGENERATED CODE This code was generated by a tool. - Autogenerated on: 2023-07-28 + Autogenerated on: 2023-10-03 Manual changes to this file may cause unexpected behavior in your application. Manual changes to this file will be overwritten if the code is regenerated. @@ -14,7 +14,7 @@ class Sample(_ParentRestClient): """ This class contains methods for the 'Samples' webservices - Client version: 2.8.3-SNAPSHOT + Client version: 2.8.4-SNAPSHOT PATH: /{apiVersion}/samples """ diff --git a/opencga-client/src/main/python/pyopencga/rest_clients/study_client.py b/opencga-client/src/main/python/pyopencga/rest_clients/study_client.py index f9dcf2b22d4..14a75a2e9b8 100644 --- a/opencga-client/src/main/python/pyopencga/rest_clients/study_client.py +++ b/opencga-client/src/main/python/pyopencga/rest_clients/study_client.py @@ -2,7 +2,7 @@ WARNING: AUTOGENERATED CODE This code was generated by a tool. - Autogenerated on: 2023-07-28 + Autogenerated on: 2023-10-03 Manual changes to this file may cause unexpected behavior in your application. Manual changes to this file will be overwritten if the code is regenerated. @@ -14,7 +14,7 @@ class Study(_ParentRestClient): """ This class contains methods for the 'Studies' webservices - Client version: 2.8.3-SNAPSHOT + Client version: 2.8.4-SNAPSHOT PATH: /{apiVersion}/studies """ diff --git a/opencga-client/src/main/python/pyopencga/rest_clients/user_client.py b/opencga-client/src/main/python/pyopencga/rest_clients/user_client.py index d6409f5d40f..b9a1ae86e43 100644 --- a/opencga-client/src/main/python/pyopencga/rest_clients/user_client.py +++ b/opencga-client/src/main/python/pyopencga/rest_clients/user_client.py @@ -2,7 +2,7 @@ WARNING: AUTOGENERATED CODE This code was generated by a tool. - Autogenerated on: 2023-07-28 + Autogenerated on: 2023-10-03 Manual changes to this file may cause unexpected behavior in your application. Manual changes to this file will be overwritten if the code is regenerated. @@ -14,7 +14,7 @@ class User(_ParentRestClient): """ This class contains methods for the 'Users' webservices - Client version: 2.8.3-SNAPSHOT + Client version: 2.8.4-SNAPSHOT PATH: /{apiVersion}/users """ diff --git a/opencga-client/src/main/python/pyopencga/rest_clients/variant_client.py b/opencga-client/src/main/python/pyopencga/rest_clients/variant_client.py index 7424f289cd1..fc2a85ed84d 100644 --- a/opencga-client/src/main/python/pyopencga/rest_clients/variant_client.py +++ b/opencga-client/src/main/python/pyopencga/rest_clients/variant_client.py @@ -2,7 +2,7 @@ WARNING: AUTOGENERATED CODE This code was generated by a tool. - Autogenerated on: 2023-07-28 + Autogenerated on: 2023-10-03 Manual changes to this file may cause unexpected behavior in your application. Manual changes to this file will be overwritten if the code is regenerated. @@ -14,7 +14,7 @@ class Variant(_ParentRestClient): """ This class contains methods for the 'Analysis - Variant' webservices - Client version: 2.8.3-SNAPSHOT + Client version: 2.8.4-SNAPSHOT PATH: /{apiVersion}/analysis/variant """ diff --git a/opencga-client/src/main/python/pyopencga/rest_clients/variant_operation_client.py b/opencga-client/src/main/python/pyopencga/rest_clients/variant_operation_client.py index 6c0906d553f..d8ce1e72302 100644 --- a/opencga-client/src/main/python/pyopencga/rest_clients/variant_operation_client.py +++ b/opencga-client/src/main/python/pyopencga/rest_clients/variant_operation_client.py @@ -2,7 +2,7 @@ WARNING: AUTOGENERATED CODE This code was generated by a tool. - Autogenerated on: 2023-07-28 + Autogenerated on: 2023-10-03 Manual changes to this file may cause unexpected behavior in your application. Manual changes to this file will be overwritten if the code is regenerated. @@ -14,7 +14,7 @@ class VariantOperation(_ParentRestClient): """ This class contains methods for the 'Operations - Variant Storage' webservices - Client version: 2.8.3-SNAPSHOT + Client version: 2.8.4-SNAPSHOT PATH: /{apiVersion}/operation """ From 12cb891d0e8cbae197dcd99c7f9817d3974998af Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jacobo=20Coll=20Morag=C3=B3n?= Date: Tue, 3 Oct 2023 16:58:13 +0100 Subject: [PATCH 26/50] storage: Add a counter of updated samples for each variant-index #TASK-4899 --- ...HadoopLocalLoadVariantStoragePipeline.java | 4 +++ ...doopVariantStorageEngineSplitDataTest.java | 28 ++++++++++++------- 2 files changed, 22 insertions(+), 10 deletions(-) diff --git a/opencga-storage/opencga-storage-hadoop/opencga-storage-hadoop-core/src/main/java/org/opencb/opencga/storage/hadoop/variant/HadoopLocalLoadVariantStoragePipeline.java b/opencga-storage/opencga-storage-hadoop/opencga-storage-hadoop-core/src/main/java/org/opencb/opencga/storage/hadoop/variant/HadoopLocalLoadVariantStoragePipeline.java index 2dd7d3f1be3..5c3d0e7a0d1 100644 --- a/opencga-storage/opencga-storage-hadoop/opencga-storage-hadoop-core/src/main/java/org/opencb/opencga/storage/hadoop/variant/HadoopLocalLoadVariantStoragePipeline.java +++ b/opencga-storage/opencga-storage-hadoop/opencga-storage-hadoop-core/src/main/java/org/opencb/opencga/storage/hadoop/variant/HadoopLocalLoadVariantStoragePipeline.java @@ -513,6 +513,7 @@ public URI postLoad(URI input, URI output) throws StorageEngineException { metadataManager.setStatus(getStudyId(), taskId, Status.READY); boolean loadSampleIndex = YesNoAuto.parse(getOptions(), LOAD_SAMPLE_INDEX.key()).orYes().booleanValue(); + int updatedSamples = 0; for (Integer sampleId : metadataManager.getSampleIdsFromFileId(getStudyId(), getFileId())) { // Worth to check first to avoid too many updates in scenarios like 1000G SampleMetadata sampleMetadata = metadataManager.getSampleMetadata(getStudyId(), sampleId); @@ -536,6 +537,7 @@ public URI postLoad(URI input, URI output) throws StorageEngineException { } if (updateSampleIndexStatus || updateLargestVariantLength) { + updatedSamples++; metadataManager.updateSampleMetadata(getStudyId(), sampleId, s -> { if (updateSampleIndexStatus) { s.setSampleIndexStatus(Status.READY, sampleIndexVersion); @@ -547,6 +549,8 @@ public URI postLoad(URI input, URI output) throws StorageEngineException { }); } } + getLoadStats().put("updatedSampleMetadata", updatedSamples); + logger.info("Updated status of {} samples", updatedSamples); boolean loadArchive = YesNoAuto.parse(getOptions(), LOAD_ARCHIVE.key()).orYes().booleanValue(); if (loadArchive) { diff --git a/opencga-storage/opencga-storage-hadoop/opencga-storage-hadoop-core/src/test/java/org/opencb/opencga/storage/hadoop/variant/HadoopVariantStorageEngineSplitDataTest.java b/opencga-storage/opencga-storage-hadoop/opencga-storage-hadoop-core/src/test/java/org/opencb/opencga/storage/hadoop/variant/HadoopVariantStorageEngineSplitDataTest.java index 3612a34406b..f5ebbbe8fd6 100644 --- a/opencga-storage/opencga-storage-hadoop/opencga-storage-hadoop-core/src/test/java/org/opencb/opencga/storage/hadoop/variant/HadoopVariantStorageEngineSplitDataTest.java +++ b/opencga-storage/opencga-storage-hadoop/opencga-storage-hadoop-core/src/test/java/org/opencb/opencga/storage/hadoop/variant/HadoopVariantStorageEngineSplitDataTest.java @@ -14,6 +14,7 @@ import org.opencb.commons.datastore.core.QueryOptions; import org.opencb.opencga.core.api.ParamConstants; import org.opencb.opencga.core.testclassification.duration.LongTests; +import org.opencb.opencga.storage.core.StoragePipelineResult; import org.opencb.opencga.storage.core.exceptions.StorageEngineException; import org.opencb.opencga.storage.core.exceptions.StoragePipelineException; import org.opencb.opencga.storage.core.metadata.VariantStorageMetadataManager; @@ -137,23 +138,25 @@ public void testMultiChromosomeSplitDataVirtualFile() throws Exception { variantStorageEngine.getOptions().put(VariantStorageOptions.LOAD_VIRTUAL_FILE.key(), "virtual-variant-test-file.vcf"); int studyId = variantStorageEngine.getMetadataManager().createStudy(STUDY_NAME).getId(); - int sampleId = variantStorageEngine.getMetadataManager().registerSamples(studyId, Collections.singletonList("NA19660")).get(0); + int sampleIdMock = variantStorageEngine.getMetadataManager().registerSamples(studyId, Collections.singletonList("NA19660")).get(0); // Mark one random sample as having unknown largest variant size // Ensure that the largest variant size is not updated - variantStorageEngine.getMetadataManager().updateSampleMetadata(studyId, sampleId, sampleMetadata -> { + variantStorageEngine.getMetadataManager().updateSampleMetadata(studyId, sampleIdMock, sampleMetadata -> { sampleMetadata.getAttributes().put(SampleIndexSchema.UNKNOWN_LARGEST_VARIANT_LENGTH, true); }); - variantStorageEngine.index(Collections.singletonList(getResourceUri("by_chr/chr20.variant-test-file.vcf.gz")), - outputUri, true, true, true); + StoragePipelineResult result = variantStorageEngine.index(Collections.singletonList(getResourceUri("by_chr/chr20.variant-test-file.vcf.gz")), + outputUri, true, true, true).get(0); + // All samples expected to be updated + assertEquals(4, result.getLoadStats().getInt("updatedSampleMetadata")); VariantStorageMetadataManager mm = variantStorageEngine.getMetadataManager(); for (String sample : SAMPLES) { SampleMetadata sampleMetadata = mm.getSampleMetadata(studyId, mm.getSampleId(studyId, sample)); assertEquals(TaskMetadata.Status.READY, sampleMetadata.getIndexStatus()); assertEquals(TaskMetadata.Status.NONE, sampleMetadata.getAnnotationStatus()); assertEquals(TaskMetadata.Status.NONE, sampleMetadata.getSampleIndexAnnotationStatus(1)); - if (sampleId == sampleMetadata.getId()) { + if (sampleIdMock == sampleMetadata.getId()) { assertFalse(sample, sampleMetadata.getAttributes().containsKey(SampleIndexSchema.LARGEST_VARIANT_LENGTH)); assertTrue(sample, sampleMetadata.getAttributes().getBoolean(SampleIndexSchema.UNKNOWN_LARGEST_VARIANT_LENGTH)); } else { @@ -173,8 +176,11 @@ public void testMultiChromosomeSplitDataVirtualFile() throws Exception { variantStorageEngine.getOptions().put(VariantStorageOptions.STUDY.key(), STUDY_NAME); variantStorageEngine.getOptions().put(VariantStorageOptions.LOAD_SPLIT_DATA.key(), VariantStorageEngine.SplitData.CHROMOSOME); variantStorageEngine.getOptions().put(VariantStorageOptions.LOAD_VIRTUAL_FILE.key(), "virtual-variant-test-file.vcf"); - variantStorageEngine.index(Collections.singletonList(getResourceUri("by_chr/chr21.variant-test-file.vcf.gz")), - outputUri, true, true, true); + result = variantStorageEngine.index(Collections.singletonList(getResourceUri("by_chr/chr21.variant-test-file.vcf.gz")), + outputUri, true, true, true).get(0); + + // No sample expected to be updated + assertEquals(0, result.getLoadStats().getInt("updatedSampleMetadata")); for (String sample : SAMPLES) { SampleMetadata sampleMetadata = mm.getSampleMetadata(studyId, mm.getSampleId(studyId, sample)); @@ -192,15 +198,17 @@ public void testMultiChromosomeSplitDataVirtualFile() throws Exception { // Revert the unknown largest variant size // Ensure that the largest variant size is now updated - variantStorageEngine.getMetadataManager().updateSampleMetadata(studyId, sampleId, sampleMetadata -> { + variantStorageEngine.getMetadataManager().updateSampleMetadata(studyId, sampleIdMock, sampleMetadata -> { sampleMetadata.getAttributes().put(SampleIndexSchema.UNKNOWN_LARGEST_VARIANT_LENGTH, false); }); variantStorageEngine.getOptions().put(VariantStorageOptions.STUDY.key(), STUDY_NAME); variantStorageEngine.getOptions().put(VariantStorageOptions.LOAD_SPLIT_DATA.key(), VariantStorageEngine.SplitData.CHROMOSOME); variantStorageEngine.getOptions().put(VariantStorageOptions.LOAD_VIRTUAL_FILE.key(), "virtual-variant-test-file.vcf"); - variantStorageEngine.index(Collections.singletonList(getResourceUri("by_chr/chr22.variant-test-file.vcf.gz")), - outputUri); + result = variantStorageEngine.index(Collections.singletonList(getResourceUri("by_chr/chr22.variant-test-file.vcf.gz")), + outputUri).get(0); + // One sample (sampleIdMock) expected to be updated + assertEquals(1, result.getLoadStats().getInt("updatedSampleMetadata")); for (String sample : SAMPLES) { SampleMetadata sampleMetadata = mm.getSampleMetadata(studyId, mm.getSampleId(studyId, sample)); From 567304a399360e2c0b1e14b906f531cecdd66c65 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jacobo=20Coll=20Morag=C3=B3n?= Date: Tue, 3 Oct 2023 17:23:08 +0100 Subject: [PATCH 27/50] app: Fix migration version on MarkUnknownLargestVariantLength #TASK-4899 --- .../v2_8_6/storage/MarkUnknownLargestVariantLength.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/opencga-app/src/main/java/org/opencb/opencga/app/migrations/v2_8_6/storage/MarkUnknownLargestVariantLength.java b/opencga-app/src/main/java/org/opencb/opencga/app/migrations/v2_8_6/storage/MarkUnknownLargestVariantLength.java index eedf55b1870..593eb6a15a0 100644 --- a/opencga-app/src/main/java/org/opencb/opencga/app/migrations/v2_8_6/storage/MarkUnknownLargestVariantLength.java +++ b/opencga-app/src/main/java/org/opencb/opencga/app/migrations/v2_8_6/storage/MarkUnknownLargestVariantLength.java @@ -10,7 +10,7 @@ @Migration(id = "mark_unknown_largest_variant_length" , description = "Mark as unknown largest variant length", - version = "2.8.4", + version = "2.8.6", domain = Migration.MigrationDomain.STORAGE, language = Migration.MigrationLanguage.JAVA, patch = 1, From 93fa16820558c264b3952d98a2ca17c6f063bec8 Mon Sep 17 00:00:00 2001 From: JuanfeSanahuja Date: Wed, 4 Oct 2023 09:47:59 +0200 Subject: [PATCH 28/50] cicd: Add build to fix delete docker #TASK-5092 --- .github/workflows/pull-request-merge.yml | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/.github/workflows/pull-request-merge.yml b/.github/workflows/pull-request-merge.yml index ff9fbdc3c1e..7643abfbc52 100644 --- a/.github/workflows/pull-request-merge.yml +++ b/.github/workflows/pull-request-merge.yml @@ -9,6 +9,12 @@ on: - closed jobs: + build: + uses: opencb/java-common-libs/.github/workflows/build-java-app-workflow.yml@release-4.8.x + needs: build + with: + maven_opts: -Dopencga.war.name=opencga -Dcheckstyle.skip + delete-docker: uses: opencb/java-common-libs/.github/workflows/delete-docker-hub-workflow.yml@release-4.8.x with: From dca018d90a2ba0d9a60358f48b4fbaf9d9358ef7 Mon Sep 17 00:00:00 2001 From: JuanfeSanahuja Date: Wed, 4 Oct 2023 12:13:37 +0200 Subject: [PATCH 29/50] cicd: Add build to fix delete docker #TASK-5092 --- .github/workflows/pull-request-merge.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/pull-request-merge.yml b/.github/workflows/pull-request-merge.yml index 7643abfbc52..185110ca16e 100644 --- a/.github/workflows/pull-request-merge.yml +++ b/.github/workflows/pull-request-merge.yml @@ -11,12 +11,12 @@ on: jobs: build: uses: opencb/java-common-libs/.github/workflows/build-java-app-workflow.yml@release-4.8.x - needs: build with: maven_opts: -Dopencga.war.name=opencga -Dcheckstyle.skip delete-docker: uses: opencb/java-common-libs/.github/workflows/delete-docker-hub-workflow.yml@release-4.8.x + needs: build with: cli: python3 ./build/cloud/docker/docker-build.py delete --images base --tag ${{ github.head_ref }} secrets: inherit From 968381ed707fd2c112fe8e569db72ded17d5af1e Mon Sep 17 00:00:00 2001 From: JuanfeSanahuja Date: Wed, 4 Oct 2023 12:52:36 +0200 Subject: [PATCH 30/50] cicd: workflow_dispatch: #TASK-5092 --- .github/workflows/pull-request-merge.yml | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/.github/workflows/pull-request-merge.yml b/.github/workflows/pull-request-merge.yml index 185110ca16e..7d6fcb8818f 100644 --- a/.github/workflows/pull-request-merge.yml +++ b/.github/workflows/pull-request-merge.yml @@ -7,12 +7,13 @@ on: - "release-*" types: - closed + workflow_dispatch: jobs: build: uses: opencb/java-common-libs/.github/workflows/build-java-app-workflow.yml@release-4.8.x with: - maven_opts: -Dopencga.war.name=opencga -Dcheckstyle.skip + maven_opts: -P storage-hadoop,hdp3.1,RClient,opencga-storage-hadoop-deps -Dopencga.war.name=opencga -Dcheckstyle.skip -pl '!:opencga-storage-hadoop-deps-emr6.1,!:opencga-storage-hadoop-deps-hdp2.6' delete-docker: uses: opencb/java-common-libs/.github/workflows/delete-docker-hub-workflow.yml@release-4.8.x From 6a24ce5cf6909b767c6bfc4e8a49a0720676b37d Mon Sep 17 00:00:00 2001 From: JuanfeSanahuja Date: Wed, 4 Oct 2023 16:00:43 +0200 Subject: [PATCH 31/50] cicd: Manueal ext-tools workflow --- .github/workflows/manual-deploy-ext-tools.yml | 50 +++++++++++++++++++ 1 file changed, 50 insertions(+) create mode 100644 .github/workflows/manual-deploy-ext-tools.yml diff --git a/.github/workflows/manual-deploy-ext-tools.yml b/.github/workflows/manual-deploy-ext-tools.yml new file mode 100644 index 00000000000..a683d4320af --- /dev/null +++ b/.github/workflows/manual-deploy-ext-tools.yml @@ -0,0 +1,50 @@ +name: Manual deploy Docker Ext-Tools +on: + workflow_dispatch: + inputs: + branch: + description: "The branch, tag or SHA of the source code to build docker." + type: string + required: true + tag: + description: "The tag for the new docker." + type: string + required: true + +jobs: + build: + name: Build Java app + runs-on: ubuntu-22.04 + outputs: + version: ${{ steps.get_project_version.outputs.version }} + steps: + - uses: actions/checkout@v3 + with: + fetch-depth: '10' + ref: "${{ inputs.branch }}" + - name: Set up JDK 8 + uses: actions/setup-java@v3 + with: + distribution: 'temurin' + java-version: '8' + cache: 'maven' + - name: Install dependencies branches + run: | + if [ -f "./.github/workflows/scripts/get_same_branch.sh" ]; then + chmod +x ./.github/workflows/scripts/get_same_branch.sh + ./.github/workflows/scripts/get_same_branch.sh ${{ github.ref_name }} + fi + - name: Maven Build (skip tests) + run: mvn -T 2 clean install -DskipTests + - uses: actions/upload-artifact@v3 + with: + name: build-folder + path: build + + + deploy-docker-ext-tools: + uses: opencb/java-common-libs/.github/workflows/deploy-docker-hub-workflow.yml@develop + needs: build + with: + cli: python3 ./build/cloud/docker/docker-build.py push --images ext-tools --tag ${{ inputs.tag }} + secrets: inherit From aa049e3dd6016bceaab05c8d03d189e830ecb0bb Mon Sep 17 00:00:00 2001 From: JuanfeSanahuja Date: Wed, 4 Oct 2023 16:07:47 +0200 Subject: [PATCH 32/50] client: Regenerate autogenerated code for release 2.8.4 Xetabase 1.6.5 --- .../opencga/app/cli/main/OpenCgaCompleter.java | 2 +- .../app/cli/main/OpencgaCliOptionsParser.java | 2 +- opencga-client/src/main/R/R/Admin-methods.R | 2 +- .../src/main/R/R/Alignment-methods.R | 2 +- opencga-client/src/main/R/R/AllGenerics.R | 18 +++++++++--------- opencga-client/src/main/R/R/Clinical-methods.R | 4 ++-- opencga-client/src/main/R/R/Cohort-methods.R | 4 ++-- opencga-client/src/main/R/R/Family-methods.R | 4 ++-- opencga-client/src/main/R/R/File-methods.R | 4 ++-- opencga-client/src/main/R/R/GA4GH-methods.R | 2 +- .../src/main/R/R/Individual-methods.R | 4 ++-- opencga-client/src/main/R/R/Job-methods.R | 2 +- opencga-client/src/main/R/R/Meta-methods.R | 2 +- .../src/main/R/R/Operation-methods.R | 2 +- opencga-client/src/main/R/R/Panel-methods.R | 2 +- opencga-client/src/main/R/R/Project-methods.R | 4 ++-- opencga-client/src/main/R/R/Sample-methods.R | 4 ++-- opencga-client/src/main/R/R/Study-methods.R | 4 ++-- opencga-client/src/main/R/R/User-methods.R | 4 ++-- opencga-client/src/main/R/R/Variant-methods.R | 2 +- .../client/rest/clients/AdminClient.java | 2 +- .../client/rest/clients/AlignmentClient.java | 2 +- .../rest/clients/ClinicalAnalysisClient.java | 2 +- .../client/rest/clients/CohortClient.java | 2 +- .../rest/clients/DiseasePanelClient.java | 2 +- .../client/rest/clients/FamilyClient.java | 2 +- .../client/rest/clients/FileClient.java | 2 +- .../client/rest/clients/GA4GHClient.java | 2 +- .../client/rest/clients/IndividualClient.java | 2 +- .../opencga/client/rest/clients/JobClient.java | 2 +- .../client/rest/clients/MetaClient.java | 2 +- .../client/rest/clients/ProjectClient.java | 2 +- .../client/rest/clients/SampleClient.java | 2 +- .../client/rest/clients/StudyClient.java | 2 +- .../client/rest/clients/UserClient.java | 2 +- .../client/rest/clients/VariantClient.java | 2 +- .../rest/clients/VariantOperationClient.java | 2 +- opencga-client/src/main/javascript/Admin.js | 2 +- .../src/main/javascript/Alignment.js | 2 +- .../src/main/javascript/ClinicalAnalysis.js | 2 +- opencga-client/src/main/javascript/Cohort.js | 2 +- .../src/main/javascript/DiseasePanel.js | 2 +- opencga-client/src/main/javascript/Family.js | 2 +- opencga-client/src/main/javascript/File.js | 2 +- opencga-client/src/main/javascript/GA4GH.js | 2 +- .../src/main/javascript/Individual.js | 2 +- opencga-client/src/main/javascript/Job.js | 2 +- opencga-client/src/main/javascript/Meta.js | 2 +- opencga-client/src/main/javascript/Project.js | 2 +- opencga-client/src/main/javascript/Sample.js | 2 +- opencga-client/src/main/javascript/Study.js | 2 +- opencga-client/src/main/javascript/User.js | 2 +- opencga-client/src/main/javascript/Variant.js | 2 +- .../src/main/javascript/VariantOperation.js | 2 +- .../pyopencga/rest_clients/admin_client.py | 2 +- .../pyopencga/rest_clients/alignment_client.py | 2 +- .../rest_clients/clinical_analysis_client.py | 2 +- .../pyopencga/rest_clients/cohort_client.py | 2 +- .../rest_clients/disease_panel_client.py | 2 +- .../pyopencga/rest_clients/family_client.py | 2 +- .../pyopencga/rest_clients/file_client.py | 2 +- .../pyopencga/rest_clients/ga4gh_client.py | 2 +- .../rest_clients/individual_client.py | 2 +- .../pyopencga/rest_clients/job_client.py | 2 +- .../pyopencga/rest_clients/meta_client.py | 2 +- .../pyopencga/rest_clients/project_client.py | 2 +- .../pyopencga/rest_clients/sample_client.py | 2 +- .../pyopencga/rest_clients/study_client.py | 2 +- .../pyopencga/rest_clients/user_client.py | 2 +- .../pyopencga/rest_clients/variant_client.py | 2 +- .../rest_clients/variant_operation_client.py | 2 +- 71 files changed, 88 insertions(+), 88 deletions(-) diff --git a/opencga-app/src/main/java/org/opencb/opencga/app/cli/main/OpenCgaCompleter.java b/opencga-app/src/main/java/org/opencb/opencga/app/cli/main/OpenCgaCompleter.java index ae29118873c..81bc80aeb2f 100644 --- a/opencga-app/src/main/java/org/opencb/opencga/app/cli/main/OpenCgaCompleter.java +++ b/opencga-app/src/main/java/org/opencb/opencga/app/cli/main/OpenCgaCompleter.java @@ -1,5 +1,5 @@ /* -* Copyright 2015-2023-10-03 OpenCB +* Copyright 2015-2023-10-04 OpenCB * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/opencga-app/src/main/java/org/opencb/opencga/app/cli/main/OpencgaCliOptionsParser.java b/opencga-app/src/main/java/org/opencb/opencga/app/cli/main/OpencgaCliOptionsParser.java index 6f1a04be7b6..646d8963b89 100644 --- a/opencga-app/src/main/java/org/opencb/opencga/app/cli/main/OpencgaCliOptionsParser.java +++ b/opencga-app/src/main/java/org/opencb/opencga/app/cli/main/OpencgaCliOptionsParser.java @@ -1,5 +1,5 @@ /* -* Copyright 2015-2023-10-03 OpenCB +* Copyright 2015-2023-10-04 OpenCB * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/opencga-client/src/main/R/R/Admin-methods.R b/opencga-client/src/main/R/R/Admin-methods.R index 7d670ddf6c4..5faa2c44b78 100644 --- a/opencga-client/src/main/R/R/Admin-methods.R +++ b/opencga-client/src/main/R/R/Admin-methods.R @@ -2,7 +2,7 @@ # WARNING: AUTOGENERATED CODE # # This code was generated by a tool. -# Autogenerated on: 2023-10-03 +# Autogenerated on: 2023-10-04 # # Manual changes to this file may cause unexpected behavior in your application. # Manual changes to this file will be overwritten if the code is regenerated. diff --git a/opencga-client/src/main/R/R/Alignment-methods.R b/opencga-client/src/main/R/R/Alignment-methods.R index 70913d20917..c8ccfb56960 100644 --- a/opencga-client/src/main/R/R/Alignment-methods.R +++ b/opencga-client/src/main/R/R/Alignment-methods.R @@ -2,7 +2,7 @@ # WARNING: AUTOGENERATED CODE # # This code was generated by a tool. -# Autogenerated on: 2023-10-03 +# Autogenerated on: 2023-10-04 # # Manual changes to this file may cause unexpected behavior in your application. # Manual changes to this file will be overwritten if the code is regenerated. diff --git a/opencga-client/src/main/R/R/AllGenerics.R b/opencga-client/src/main/R/R/AllGenerics.R index 946f98a375e..b749fd1f45f 100644 --- a/opencga-client/src/main/R/R/AllGenerics.R +++ b/opencga-client/src/main/R/R/AllGenerics.R @@ -1,21 +1,21 @@ # ############################################################################## ## UserClient -setGeneric("userClient", function(OpencgaR, filterId, user, users, endpointName, params=NULL, ...) +setGeneric("userClient", function(OpencgaR, filterId, users, user, endpointName, params=NULL, ...) standardGeneric("userClient")) # ############################################################################## ## ProjectClient -setGeneric("projectClient", function(OpencgaR, projects, project, endpointName, params=NULL, ...) +setGeneric("projectClient", function(OpencgaR, project, projects, endpointName, params=NULL, ...) standardGeneric("projectClient")) # ############################################################################## ## StudyClient -setGeneric("studyClient", function(OpencgaR, templateId, studies, members, study, variableSet, group, endpointName, params=NULL, ...) +setGeneric("studyClient", function(OpencgaR, group, members, templateId, variableSet, studies, study, endpointName, params=NULL, ...) standardGeneric("studyClient")) # ############################################################################## ## FileClient -setGeneric("fileClient", function(OpencgaR, annotationSet, file, folder, files, members, endpointName, params=NULL, ...) +setGeneric("fileClient", function(OpencgaR, members, files, folder, annotationSet, file, endpointName, params=NULL, ...) standardGeneric("fileClient")) # ############################################################################## @@ -25,22 +25,22 @@ setGeneric("jobClient", function(OpencgaR, members, job, jobs, endpointName, par # ############################################################################## ## SampleClient -setGeneric("sampleClient", function(OpencgaR, sample, members, annotationSet, samples, endpointName, params=NULL, ...) +setGeneric("sampleClient", function(OpencgaR, members, samples, annotationSet, sample, endpointName, params=NULL, ...) standardGeneric("sampleClient")) # ############################################################################## ## IndividualClient -setGeneric("individualClient", function(OpencgaR, individual, members, annotationSet, individuals, endpointName, params=NULL, ...) +setGeneric("individualClient", function(OpencgaR, members, annotationSet, individual, individuals, endpointName, params=NULL, ...) standardGeneric("individualClient")) # ############################################################################## ## FamilyClient -setGeneric("familyClient", function(OpencgaR, families, family, members, annotationSet, endpointName, params=NULL, ...) +setGeneric("familyClient", function(OpencgaR, families, members, annotationSet, family, endpointName, params=NULL, ...) standardGeneric("familyClient")) # ############################################################################## ## CohortClient -setGeneric("cohortClient", function(OpencgaR, cohort, annotationSet, members, cohorts, endpointName, params=NULL, ...) +setGeneric("cohortClient", function(OpencgaR, members, annotationSet, cohorts, cohort, endpointName, params=NULL, ...) standardGeneric("cohortClient")) # ############################################################################## @@ -60,7 +60,7 @@ setGeneric("variantClient", function(OpencgaR, endpointName, params=NULL, ...) # ############################################################################## ## ClinicalClient -setGeneric("clinicalClient", function(OpencgaR, interpretation, members, interpretations, clinicalAnalysis, clinicalAnalyses, endpointName, params=NULL, ...) +setGeneric("clinicalClient", function(OpencgaR, members, clinicalAnalysis, interpretations, clinicalAnalyses, interpretation, endpointName, params=NULL, ...) standardGeneric("clinicalClient")) # ############################################################################## diff --git a/opencga-client/src/main/R/R/Clinical-methods.R b/opencga-client/src/main/R/R/Clinical-methods.R index 9dc8deaa39e..229e1a40aeb 100644 --- a/opencga-client/src/main/R/R/Clinical-methods.R +++ b/opencga-client/src/main/R/R/Clinical-methods.R @@ -2,7 +2,7 @@ # WARNING: AUTOGENERATED CODE # # This code was generated by a tool. -# Autogenerated on: 2023-10-03 +# Autogenerated on: 2023-10-04 # # Manual changes to this file may cause unexpected behavior in your application. # Manual changes to this file will be overwritten if the code is regenerated. @@ -58,7 +58,7 @@ #' [*]: Required parameter #' @export -setMethod("clinicalClient", "OpencgaR", function(OpencgaR, interpretation, members, interpretations, clinicalAnalysis, clinicalAnalyses, endpointName, params=NULL, ...) { +setMethod("clinicalClient", "OpencgaR", function(OpencgaR, members, clinicalAnalysis, interpretations, clinicalAnalyses, interpretation, endpointName, params=NULL, ...) { switch(endpointName, #' @section Endpoint /{apiVersion}/analysis/clinical/acl/{members}/update: diff --git a/opencga-client/src/main/R/R/Cohort-methods.R b/opencga-client/src/main/R/R/Cohort-methods.R index e19b802b087..5cbbca27e88 100644 --- a/opencga-client/src/main/R/R/Cohort-methods.R +++ b/opencga-client/src/main/R/R/Cohort-methods.R @@ -2,7 +2,7 @@ # WARNING: AUTOGENERATED CODE # # This code was generated by a tool. -# Autogenerated on: 2023-10-03 +# Autogenerated on: 2023-10-04 # # Manual changes to this file may cause unexpected behavior in your application. # Manual changes to this file will be overwritten if the code is regenerated. @@ -39,7 +39,7 @@ #' [*]: Required parameter #' @export -setMethod("cohortClient", "OpencgaR", function(OpencgaR, cohort, annotationSet, members, cohorts, endpointName, params=NULL, ...) { +setMethod("cohortClient", "OpencgaR", function(OpencgaR, members, annotationSet, cohorts, cohort, endpointName, params=NULL, ...) { switch(endpointName, #' @section Endpoint /{apiVersion}/cohorts/acl/{members}/update: diff --git a/opencga-client/src/main/R/R/Family-methods.R b/opencga-client/src/main/R/R/Family-methods.R index efebddd578f..92babc2d42a 100644 --- a/opencga-client/src/main/R/R/Family-methods.R +++ b/opencga-client/src/main/R/R/Family-methods.R @@ -2,7 +2,7 @@ # WARNING: AUTOGENERATED CODE # # This code was generated by a tool. -# Autogenerated on: 2023-10-03 +# Autogenerated on: 2023-10-04 # # Manual changes to this file may cause unexpected behavior in your application. # Manual changes to this file will be overwritten if the code is regenerated. @@ -38,7 +38,7 @@ #' [*]: Required parameter #' @export -setMethod("familyClient", "OpencgaR", function(OpencgaR, families, family, members, annotationSet, endpointName, params=NULL, ...) { +setMethod("familyClient", "OpencgaR", function(OpencgaR, families, members, annotationSet, family, endpointName, params=NULL, ...) { switch(endpointName, #' @section Endpoint /{apiVersion}/families/acl/{members}/update: diff --git a/opencga-client/src/main/R/R/File-methods.R b/opencga-client/src/main/R/R/File-methods.R index bcae2ba06ea..a5160bf9489 100644 --- a/opencga-client/src/main/R/R/File-methods.R +++ b/opencga-client/src/main/R/R/File-methods.R @@ -2,7 +2,7 @@ # WARNING: AUTOGENERATED CODE # # This code was generated by a tool. -# Autogenerated on: 2023-10-03 +# Autogenerated on: 2023-10-04 # # Manual changes to this file may cause unexpected behavior in your application. # Manual changes to this file will be overwritten if the code is regenerated. @@ -54,7 +54,7 @@ #' [*]: Required parameter #' @export -setMethod("fileClient", "OpencgaR", function(OpencgaR, annotationSet, file, folder, files, members, endpointName, params=NULL, ...) { +setMethod("fileClient", "OpencgaR", function(OpencgaR, members, files, folder, annotationSet, file, endpointName, params=NULL, ...) { switch(endpointName, #' @section Endpoint /{apiVersion}/files/acl/{members}/update: diff --git a/opencga-client/src/main/R/R/GA4GH-methods.R b/opencga-client/src/main/R/R/GA4GH-methods.R index bfbdcb0cf45..7c91d78c0d9 100644 --- a/opencga-client/src/main/R/R/GA4GH-methods.R +++ b/opencga-client/src/main/R/R/GA4GH-methods.R @@ -2,7 +2,7 @@ # WARNING: AUTOGENERATED CODE # # This code was generated by a tool. -# Autogenerated on: 2023-10-03 +# Autogenerated on: 2023-10-04 # # Manual changes to this file may cause unexpected behavior in your application. # Manual changes to this file will be overwritten if the code is regenerated. diff --git a/opencga-client/src/main/R/R/Individual-methods.R b/opencga-client/src/main/R/R/Individual-methods.R index 4f88ed1e303..38653dd2fb3 100644 --- a/opencga-client/src/main/R/R/Individual-methods.R +++ b/opencga-client/src/main/R/R/Individual-methods.R @@ -2,7 +2,7 @@ # WARNING: AUTOGENERATED CODE # # This code was generated by a tool. -# Autogenerated on: 2023-10-03 +# Autogenerated on: 2023-10-04 # # Manual changes to this file may cause unexpected behavior in your application. # Manual changes to this file will be overwritten if the code is regenerated. @@ -39,7 +39,7 @@ #' [*]: Required parameter #' @export -setMethod("individualClient", "OpencgaR", function(OpencgaR, individual, members, annotationSet, individuals, endpointName, params=NULL, ...) { +setMethod("individualClient", "OpencgaR", function(OpencgaR, members, annotationSet, individual, individuals, endpointName, params=NULL, ...) { switch(endpointName, #' @section Endpoint /{apiVersion}/individuals/acl/{members}/update: diff --git a/opencga-client/src/main/R/R/Job-methods.R b/opencga-client/src/main/R/R/Job-methods.R index 19824efaa1b..4ddac21f0b7 100644 --- a/opencga-client/src/main/R/R/Job-methods.R +++ b/opencga-client/src/main/R/R/Job-methods.R @@ -2,7 +2,7 @@ # WARNING: AUTOGENERATED CODE # # This code was generated by a tool. -# Autogenerated on: 2023-10-03 +# Autogenerated on: 2023-10-04 # # Manual changes to this file may cause unexpected behavior in your application. # Manual changes to this file will be overwritten if the code is regenerated. diff --git a/opencga-client/src/main/R/R/Meta-methods.R b/opencga-client/src/main/R/R/Meta-methods.R index df7b6c5822a..b98878431e5 100644 --- a/opencga-client/src/main/R/R/Meta-methods.R +++ b/opencga-client/src/main/R/R/Meta-methods.R @@ -2,7 +2,7 @@ # WARNING: AUTOGENERATED CODE # # This code was generated by a tool. -# Autogenerated on: 2023-10-03 +# Autogenerated on: 2023-10-04 # # Manual changes to this file may cause unexpected behavior in your application. # Manual changes to this file will be overwritten if the code is regenerated. diff --git a/opencga-client/src/main/R/R/Operation-methods.R b/opencga-client/src/main/R/R/Operation-methods.R index 67aa8ef6e74..032c05951da 100644 --- a/opencga-client/src/main/R/R/Operation-methods.R +++ b/opencga-client/src/main/R/R/Operation-methods.R @@ -2,7 +2,7 @@ # WARNING: AUTOGENERATED CODE # # This code was generated by a tool. -# Autogenerated on: 2023-10-03 +# Autogenerated on: 2023-10-04 # # Manual changes to this file may cause unexpected behavior in your application. # Manual changes to this file will be overwritten if the code is regenerated. diff --git a/opencga-client/src/main/R/R/Panel-methods.R b/opencga-client/src/main/R/R/Panel-methods.R index 6bddf64659d..0b68b9bd20b 100644 --- a/opencga-client/src/main/R/R/Panel-methods.R +++ b/opencga-client/src/main/R/R/Panel-methods.R @@ -2,7 +2,7 @@ # WARNING: AUTOGENERATED CODE # # This code was generated by a tool. -# Autogenerated on: 2023-10-03 +# Autogenerated on: 2023-10-04 # # Manual changes to this file may cause unexpected behavior in your application. # Manual changes to this file will be overwritten if the code is regenerated. diff --git a/opencga-client/src/main/R/R/Project-methods.R b/opencga-client/src/main/R/R/Project-methods.R index e5926f1db30..a392aa6b259 100644 --- a/opencga-client/src/main/R/R/Project-methods.R +++ b/opencga-client/src/main/R/R/Project-methods.R @@ -2,7 +2,7 @@ # WARNING: AUTOGENERATED CODE # # This code was generated by a tool. -# Autogenerated on: 2023-10-03 +# Autogenerated on: 2023-10-04 # # Manual changes to this file may cause unexpected behavior in your application. # Manual changes to this file will be overwritten if the code is regenerated. @@ -34,7 +34,7 @@ #' [*]: Required parameter #' @export -setMethod("projectClient", "OpencgaR", function(OpencgaR, projects, project, endpointName, params=NULL, ...) { +setMethod("projectClient", "OpencgaR", function(OpencgaR, project, projects, endpointName, params=NULL, ...) { switch(endpointName, #' @section Endpoint /{apiVersion}/projects/create: diff --git a/opencga-client/src/main/R/R/Sample-methods.R b/opencga-client/src/main/R/R/Sample-methods.R index b4fe9c16cce..68067e64a3b 100644 --- a/opencga-client/src/main/R/R/Sample-methods.R +++ b/opencga-client/src/main/R/R/Sample-methods.R @@ -2,7 +2,7 @@ # WARNING: AUTOGENERATED CODE # # This code was generated by a tool. -# Autogenerated on: 2023-10-03 +# Autogenerated on: 2023-10-04 # # Manual changes to this file may cause unexpected behavior in your application. # Manual changes to this file will be overwritten if the code is regenerated. @@ -39,7 +39,7 @@ #' [*]: Required parameter #' @export -setMethod("sampleClient", "OpencgaR", function(OpencgaR, sample, members, annotationSet, samples, endpointName, params=NULL, ...) { +setMethod("sampleClient", "OpencgaR", function(OpencgaR, members, samples, annotationSet, sample, endpointName, params=NULL, ...) { switch(endpointName, #' @section Endpoint /{apiVersion}/samples/acl/{members}/update: diff --git a/opencga-client/src/main/R/R/Study-methods.R b/opencga-client/src/main/R/R/Study-methods.R index e46586b6735..0b480943c23 100644 --- a/opencga-client/src/main/R/R/Study-methods.R +++ b/opencga-client/src/main/R/R/Study-methods.R @@ -2,7 +2,7 @@ # WARNING: AUTOGENERATED CODE # # This code was generated by a tool. -# Autogenerated on: 2023-10-03 +# Autogenerated on: 2023-10-04 # # Manual changes to this file may cause unexpected behavior in your application. # Manual changes to this file will be overwritten if the code is regenerated. @@ -46,7 +46,7 @@ #' [*]: Required parameter #' @export -setMethod("studyClient", "OpencgaR", function(OpencgaR, templateId, studies, members, study, variableSet, group, endpointName, params=NULL, ...) { +setMethod("studyClient", "OpencgaR", function(OpencgaR, group, members, templateId, variableSet, studies, study, endpointName, params=NULL, ...) { switch(endpointName, #' @section Endpoint /{apiVersion}/studies/acl/{members}/update: diff --git a/opencga-client/src/main/R/R/User-methods.R b/opencga-client/src/main/R/R/User-methods.R index bfe2644b4bd..f347e8cd017 100644 --- a/opencga-client/src/main/R/R/User-methods.R +++ b/opencga-client/src/main/R/R/User-methods.R @@ -2,7 +2,7 @@ # WARNING: AUTOGENERATED CODE # # This code was generated by a tool. -# Autogenerated on: 2023-10-03 +# Autogenerated on: 2023-10-04 # # Manual changes to this file may cause unexpected behavior in your application. # Manual changes to this file will be overwritten if the code is regenerated. @@ -38,7 +38,7 @@ #' [*]: Required parameter #' @export -setMethod("userClient", "OpencgaR", function(OpencgaR, filterId, user, users, endpointName, params=NULL, ...) { +setMethod("userClient", "OpencgaR", function(OpencgaR, filterId, users, user, endpointName, params=NULL, ...) { switch(endpointName, #' @section Endpoint /{apiVersion}/users/login: diff --git a/opencga-client/src/main/R/R/Variant-methods.R b/opencga-client/src/main/R/R/Variant-methods.R index b353405561b..40838d6adfe 100644 --- a/opencga-client/src/main/R/R/Variant-methods.R +++ b/opencga-client/src/main/R/R/Variant-methods.R @@ -2,7 +2,7 @@ # WARNING: AUTOGENERATED CODE # # This code was generated by a tool. -# Autogenerated on: 2023-10-03 +# Autogenerated on: 2023-10-04 # # Manual changes to this file may cause unexpected behavior in your application. # Manual changes to this file will be overwritten if the code is regenerated. diff --git a/opencga-client/src/main/java/org/opencb/opencga/client/rest/clients/AdminClient.java b/opencga-client/src/main/java/org/opencb/opencga/client/rest/clients/AdminClient.java index 1ea397641b7..96be750670b 100644 --- a/opencga-client/src/main/java/org/opencb/opencga/client/rest/clients/AdminClient.java +++ b/opencga-client/src/main/java/org/opencb/opencga/client/rest/clients/AdminClient.java @@ -35,7 +35,7 @@ * WARNING: AUTOGENERATED CODE * * This code was generated by a tool. -* Autogenerated on: 2023-10-03 +* Autogenerated on: 2023-10-04 * * Manual changes to this file may cause unexpected behavior in your application. * Manual changes to this file will be overwritten if the code is regenerated. diff --git a/opencga-client/src/main/java/org/opencb/opencga/client/rest/clients/AlignmentClient.java b/opencga-client/src/main/java/org/opencb/opencga/client/rest/clients/AlignmentClient.java index 8871d357daa..e1ddc11bfa8 100644 --- a/opencga-client/src/main/java/org/opencb/opencga/client/rest/clients/AlignmentClient.java +++ b/opencga-client/src/main/java/org/opencb/opencga/client/rest/clients/AlignmentClient.java @@ -40,7 +40,7 @@ * WARNING: AUTOGENERATED CODE * * This code was generated by a tool. -* Autogenerated on: 2023-10-03 +* Autogenerated on: 2023-10-04 * * Manual changes to this file may cause unexpected behavior in your application. * Manual changes to this file will be overwritten if the code is regenerated. diff --git a/opencga-client/src/main/java/org/opencb/opencga/client/rest/clients/ClinicalAnalysisClient.java b/opencga-client/src/main/java/org/opencb/opencga/client/rest/clients/ClinicalAnalysisClient.java index 5a4510b273f..91445e510b3 100644 --- a/opencga-client/src/main/java/org/opencb/opencga/client/rest/clients/ClinicalAnalysisClient.java +++ b/opencga-client/src/main/java/org/opencb/opencga/client/rest/clients/ClinicalAnalysisClient.java @@ -51,7 +51,7 @@ * WARNING: AUTOGENERATED CODE * * This code was generated by a tool. -* Autogenerated on: 2023-10-03 +* Autogenerated on: 2023-10-04 * * Manual changes to this file may cause unexpected behavior in your application. * Manual changes to this file will be overwritten if the code is regenerated. diff --git a/opencga-client/src/main/java/org/opencb/opencga/client/rest/clients/CohortClient.java b/opencga-client/src/main/java/org/opencb/opencga/client/rest/clients/CohortClient.java index 2f9c36cc46e..95f8b5eda99 100644 --- a/opencga-client/src/main/java/org/opencb/opencga/client/rest/clients/CohortClient.java +++ b/opencga-client/src/main/java/org/opencb/opencga/client/rest/clients/CohortClient.java @@ -37,7 +37,7 @@ * WARNING: AUTOGENERATED CODE * * This code was generated by a tool. -* Autogenerated on: 2023-10-03 +* Autogenerated on: 2023-10-04 * * Manual changes to this file may cause unexpected behavior in your application. * Manual changes to this file will be overwritten if the code is regenerated. diff --git a/opencga-client/src/main/java/org/opencb/opencga/client/rest/clients/DiseasePanelClient.java b/opencga-client/src/main/java/org/opencb/opencga/client/rest/clients/DiseasePanelClient.java index 1a89a88064d..cb08168920f 100644 --- a/opencga-client/src/main/java/org/opencb/opencga/client/rest/clients/DiseasePanelClient.java +++ b/opencga-client/src/main/java/org/opencb/opencga/client/rest/clients/DiseasePanelClient.java @@ -35,7 +35,7 @@ * WARNING: AUTOGENERATED CODE * * This code was generated by a tool. -* Autogenerated on: 2023-10-03 +* Autogenerated on: 2023-10-04 * * Manual changes to this file may cause unexpected behavior in your application. * Manual changes to this file will be overwritten if the code is regenerated. diff --git a/opencga-client/src/main/java/org/opencb/opencga/client/rest/clients/FamilyClient.java b/opencga-client/src/main/java/org/opencb/opencga/client/rest/clients/FamilyClient.java index 533347c7453..bdc6c656bbb 100644 --- a/opencga-client/src/main/java/org/opencb/opencga/client/rest/clients/FamilyClient.java +++ b/opencga-client/src/main/java/org/opencb/opencga/client/rest/clients/FamilyClient.java @@ -36,7 +36,7 @@ * WARNING: AUTOGENERATED CODE * * This code was generated by a tool. -* Autogenerated on: 2023-10-03 +* Autogenerated on: 2023-10-04 * * Manual changes to this file may cause unexpected behavior in your application. * Manual changes to this file will be overwritten if the code is regenerated. diff --git a/opencga-client/src/main/java/org/opencb/opencga/client/rest/clients/FileClient.java b/opencga-client/src/main/java/org/opencb/opencga/client/rest/clients/FileClient.java index ed15cbb0a45..f44d3e22ade 100644 --- a/opencga-client/src/main/java/org/opencb/opencga/client/rest/clients/FileClient.java +++ b/opencga-client/src/main/java/org/opencb/opencga/client/rest/clients/FileClient.java @@ -43,7 +43,7 @@ * WARNING: AUTOGENERATED CODE * * This code was generated by a tool. -* Autogenerated on: 2023-10-03 +* Autogenerated on: 2023-10-04 * * Manual changes to this file may cause unexpected behavior in your application. * Manual changes to this file will be overwritten if the code is regenerated. diff --git a/opencga-client/src/main/java/org/opencb/opencga/client/rest/clients/GA4GHClient.java b/opencga-client/src/main/java/org/opencb/opencga/client/rest/clients/GA4GHClient.java index bbe26f5b2a1..9af11491608 100644 --- a/opencga-client/src/main/java/org/opencb/opencga/client/rest/clients/GA4GHClient.java +++ b/opencga-client/src/main/java/org/opencb/opencga/client/rest/clients/GA4GHClient.java @@ -27,7 +27,7 @@ * WARNING: AUTOGENERATED CODE * * This code was generated by a tool. -* Autogenerated on: 2023-10-03 +* Autogenerated on: 2023-10-04 * * Manual changes to this file may cause unexpected behavior in your application. * Manual changes to this file will be overwritten if the code is regenerated. diff --git a/opencga-client/src/main/java/org/opencb/opencga/client/rest/clients/IndividualClient.java b/opencga-client/src/main/java/org/opencb/opencga/client/rest/clients/IndividualClient.java index b3f4900d0e4..53a50f476bc 100644 --- a/opencga-client/src/main/java/org/opencb/opencga/client/rest/clients/IndividualClient.java +++ b/opencga-client/src/main/java/org/opencb/opencga/client/rest/clients/IndividualClient.java @@ -36,7 +36,7 @@ * WARNING: AUTOGENERATED CODE * * This code was generated by a tool. -* Autogenerated on: 2023-10-03 +* Autogenerated on: 2023-10-04 * * Manual changes to this file may cause unexpected behavior in your application. * Manual changes to this file will be overwritten if the code is regenerated. diff --git a/opencga-client/src/main/java/org/opencb/opencga/client/rest/clients/JobClient.java b/opencga-client/src/main/java/org/opencb/opencga/client/rest/clients/JobClient.java index 4090e8decd2..0652bc2436d 100644 --- a/opencga-client/src/main/java/org/opencb/opencga/client/rest/clients/JobClient.java +++ b/opencga-client/src/main/java/org/opencb/opencga/client/rest/clients/JobClient.java @@ -37,7 +37,7 @@ * WARNING: AUTOGENERATED CODE * * This code was generated by a tool. -* Autogenerated on: 2023-10-03 +* Autogenerated on: 2023-10-04 * * Manual changes to this file may cause unexpected behavior in your application. * Manual changes to this file will be overwritten if the code is regenerated. diff --git a/opencga-client/src/main/java/org/opencb/opencga/client/rest/clients/MetaClient.java b/opencga-client/src/main/java/org/opencb/opencga/client/rest/clients/MetaClient.java index b1171fb6f09..b934db26203 100644 --- a/opencga-client/src/main/java/org/opencb/opencga/client/rest/clients/MetaClient.java +++ b/opencga-client/src/main/java/org/opencb/opencga/client/rest/clients/MetaClient.java @@ -28,7 +28,7 @@ * WARNING: AUTOGENERATED CODE * * This code was generated by a tool. -* Autogenerated on: 2023-10-03 +* Autogenerated on: 2023-10-04 * * Manual changes to this file may cause unexpected behavior in your application. * Manual changes to this file will be overwritten if the code is regenerated. diff --git a/opencga-client/src/main/java/org/opencb/opencga/client/rest/clients/ProjectClient.java b/opencga-client/src/main/java/org/opencb/opencga/client/rest/clients/ProjectClient.java index 6ca8fbe712f..64f54763f2e 100644 --- a/opencga-client/src/main/java/org/opencb/opencga/client/rest/clients/ProjectClient.java +++ b/opencga-client/src/main/java/org/opencb/opencga/client/rest/clients/ProjectClient.java @@ -32,7 +32,7 @@ * WARNING: AUTOGENERATED CODE * * This code was generated by a tool. -* Autogenerated on: 2023-10-03 +* Autogenerated on: 2023-10-04 * * Manual changes to this file may cause unexpected behavior in your application. * Manual changes to this file will be overwritten if the code is regenerated. diff --git a/opencga-client/src/main/java/org/opencb/opencga/client/rest/clients/SampleClient.java b/opencga-client/src/main/java/org/opencb/opencga/client/rest/clients/SampleClient.java index d2893d1fbd8..d0f185066a1 100644 --- a/opencga-client/src/main/java/org/opencb/opencga/client/rest/clients/SampleClient.java +++ b/opencga-client/src/main/java/org/opencb/opencga/client/rest/clients/SampleClient.java @@ -36,7 +36,7 @@ * WARNING: AUTOGENERATED CODE * * This code was generated by a tool. -* Autogenerated on: 2023-10-03 +* Autogenerated on: 2023-10-04 * * Manual changes to this file may cause unexpected behavior in your application. * Manual changes to this file will be overwritten if the code is regenerated. diff --git a/opencga-client/src/main/java/org/opencb/opencga/client/rest/clients/StudyClient.java b/opencga-client/src/main/java/org/opencb/opencga/client/rest/clients/StudyClient.java index 490fa7965f4..028975cafd6 100644 --- a/opencga-client/src/main/java/org/opencb/opencga/client/rest/clients/StudyClient.java +++ b/opencga-client/src/main/java/org/opencb/opencga/client/rest/clients/StudyClient.java @@ -45,7 +45,7 @@ * WARNING: AUTOGENERATED CODE * * This code was generated by a tool. -* Autogenerated on: 2023-10-03 +* Autogenerated on: 2023-10-04 * * Manual changes to this file may cause unexpected behavior in your application. * Manual changes to this file will be overwritten if the code is regenerated. diff --git a/opencga-client/src/main/java/org/opencb/opencga/client/rest/clients/UserClient.java b/opencga-client/src/main/java/org/opencb/opencga/client/rest/clients/UserClient.java index 0f236e8ce14..31fae0170a4 100644 --- a/opencga-client/src/main/java/org/opencb/opencga/client/rest/clients/UserClient.java +++ b/opencga-client/src/main/java/org/opencb/opencga/client/rest/clients/UserClient.java @@ -36,7 +36,7 @@ * WARNING: AUTOGENERATED CODE * * This code was generated by a tool. -* Autogenerated on: 2023-10-03 +* Autogenerated on: 2023-10-04 * * Manual changes to this file may cause unexpected behavior in your application. * Manual changes to this file will be overwritten if the code is regenerated. diff --git a/opencga-client/src/main/java/org/opencb/opencga/client/rest/clients/VariantClient.java b/opencga-client/src/main/java/org/opencb/opencga/client/rest/clients/VariantClient.java index a9981fb6b89..89f512c31da 100644 --- a/opencga-client/src/main/java/org/opencb/opencga/client/rest/clients/VariantClient.java +++ b/opencga-client/src/main/java/org/opencb/opencga/client/rest/clients/VariantClient.java @@ -62,7 +62,7 @@ * WARNING: AUTOGENERATED CODE * * This code was generated by a tool. -* Autogenerated on: 2023-10-03 +* Autogenerated on: 2023-10-04 * * Manual changes to this file may cause unexpected behavior in your application. * Manual changes to this file will be overwritten if the code is regenerated. diff --git a/opencga-client/src/main/java/org/opencb/opencga/client/rest/clients/VariantOperationClient.java b/opencga-client/src/main/java/org/opencb/opencga/client/rest/clients/VariantOperationClient.java index 9d1077d3d29..539f4d2d5d0 100644 --- a/opencga-client/src/main/java/org/opencb/opencga/client/rest/clients/VariantOperationClient.java +++ b/opencga-client/src/main/java/org/opencb/opencga/client/rest/clients/VariantOperationClient.java @@ -50,7 +50,7 @@ * WARNING: AUTOGENERATED CODE * * This code was generated by a tool. -* Autogenerated on: 2023-10-03 +* Autogenerated on: 2023-10-04 * * Manual changes to this file may cause unexpected behavior in your application. * Manual changes to this file will be overwritten if the code is regenerated. diff --git a/opencga-client/src/main/javascript/Admin.js b/opencga-client/src/main/javascript/Admin.js index d1626ce9144..43448df0a88 100644 --- a/opencga-client/src/main/javascript/Admin.js +++ b/opencga-client/src/main/javascript/Admin.js @@ -12,7 +12,7 @@ * WARNING: AUTOGENERATED CODE * * This code was generated by a tool. - * Autogenerated on: 2023-10-03 + * Autogenerated on: 2023-10-04 * * Manual changes to this file may cause unexpected behavior in your application. * Manual changes to this file will be overwritten if the code is regenerated. diff --git a/opencga-client/src/main/javascript/Alignment.js b/opencga-client/src/main/javascript/Alignment.js index 1df01ab72ae..347d5d3c4b3 100644 --- a/opencga-client/src/main/javascript/Alignment.js +++ b/opencga-client/src/main/javascript/Alignment.js @@ -12,7 +12,7 @@ * WARNING: AUTOGENERATED CODE * * This code was generated by a tool. - * Autogenerated on: 2023-10-03 + * Autogenerated on: 2023-10-04 * * Manual changes to this file may cause unexpected behavior in your application. * Manual changes to this file will be overwritten if the code is regenerated. diff --git a/opencga-client/src/main/javascript/ClinicalAnalysis.js b/opencga-client/src/main/javascript/ClinicalAnalysis.js index e4afce6009a..8c4b1fc8f09 100644 --- a/opencga-client/src/main/javascript/ClinicalAnalysis.js +++ b/opencga-client/src/main/javascript/ClinicalAnalysis.js @@ -12,7 +12,7 @@ * WARNING: AUTOGENERATED CODE * * This code was generated by a tool. - * Autogenerated on: 2023-10-03 + * Autogenerated on: 2023-10-04 * * Manual changes to this file may cause unexpected behavior in your application. * Manual changes to this file will be overwritten if the code is regenerated. diff --git a/opencga-client/src/main/javascript/Cohort.js b/opencga-client/src/main/javascript/Cohort.js index ef1f0e981a8..1f2e74a0fda 100644 --- a/opencga-client/src/main/javascript/Cohort.js +++ b/opencga-client/src/main/javascript/Cohort.js @@ -12,7 +12,7 @@ * WARNING: AUTOGENERATED CODE * * This code was generated by a tool. - * Autogenerated on: 2023-10-03 + * Autogenerated on: 2023-10-04 * * Manual changes to this file may cause unexpected behavior in your application. * Manual changes to this file will be overwritten if the code is regenerated. diff --git a/opencga-client/src/main/javascript/DiseasePanel.js b/opencga-client/src/main/javascript/DiseasePanel.js index bc46764ac7b..dcf0f9ea625 100644 --- a/opencga-client/src/main/javascript/DiseasePanel.js +++ b/opencga-client/src/main/javascript/DiseasePanel.js @@ -12,7 +12,7 @@ * WARNING: AUTOGENERATED CODE * * This code was generated by a tool. - * Autogenerated on: 2023-10-03 + * Autogenerated on: 2023-10-04 * * Manual changes to this file may cause unexpected behavior in your application. * Manual changes to this file will be overwritten if the code is regenerated. diff --git a/opencga-client/src/main/javascript/Family.js b/opencga-client/src/main/javascript/Family.js index 7490b5420f8..ffc8c0ae151 100644 --- a/opencga-client/src/main/javascript/Family.js +++ b/opencga-client/src/main/javascript/Family.js @@ -12,7 +12,7 @@ * WARNING: AUTOGENERATED CODE * * This code was generated by a tool. - * Autogenerated on: 2023-10-03 + * Autogenerated on: 2023-10-04 * * Manual changes to this file may cause unexpected behavior in your application. * Manual changes to this file will be overwritten if the code is regenerated. diff --git a/opencga-client/src/main/javascript/File.js b/opencga-client/src/main/javascript/File.js index 39704df1101..78177eea8ca 100644 --- a/opencga-client/src/main/javascript/File.js +++ b/opencga-client/src/main/javascript/File.js @@ -12,7 +12,7 @@ * WARNING: AUTOGENERATED CODE * * This code was generated by a tool. - * Autogenerated on: 2023-10-03 + * Autogenerated on: 2023-10-04 * * Manual changes to this file may cause unexpected behavior in your application. * Manual changes to this file will be overwritten if the code is regenerated. diff --git a/opencga-client/src/main/javascript/GA4GH.js b/opencga-client/src/main/javascript/GA4GH.js index e46b47b8979..60276c7c692 100644 --- a/opencga-client/src/main/javascript/GA4GH.js +++ b/opencga-client/src/main/javascript/GA4GH.js @@ -12,7 +12,7 @@ * WARNING: AUTOGENERATED CODE * * This code was generated by a tool. - * Autogenerated on: 2023-10-03 + * Autogenerated on: 2023-10-04 * * Manual changes to this file may cause unexpected behavior in your application. * Manual changes to this file will be overwritten if the code is regenerated. diff --git a/opencga-client/src/main/javascript/Individual.js b/opencga-client/src/main/javascript/Individual.js index 897f8432e7a..5f9ac89ae24 100644 --- a/opencga-client/src/main/javascript/Individual.js +++ b/opencga-client/src/main/javascript/Individual.js @@ -12,7 +12,7 @@ * WARNING: AUTOGENERATED CODE * * This code was generated by a tool. - * Autogenerated on: 2023-10-03 + * Autogenerated on: 2023-10-04 * * Manual changes to this file may cause unexpected behavior in your application. * Manual changes to this file will be overwritten if the code is regenerated. diff --git a/opencga-client/src/main/javascript/Job.js b/opencga-client/src/main/javascript/Job.js index d17bb08beab..d5c6bff8f9f 100644 --- a/opencga-client/src/main/javascript/Job.js +++ b/opencga-client/src/main/javascript/Job.js @@ -12,7 +12,7 @@ * WARNING: AUTOGENERATED CODE * * This code was generated by a tool. - * Autogenerated on: 2023-10-03 + * Autogenerated on: 2023-10-04 * * Manual changes to this file may cause unexpected behavior in your application. * Manual changes to this file will be overwritten if the code is regenerated. diff --git a/opencga-client/src/main/javascript/Meta.js b/opencga-client/src/main/javascript/Meta.js index c69d26182d6..9c50397eed7 100644 --- a/opencga-client/src/main/javascript/Meta.js +++ b/opencga-client/src/main/javascript/Meta.js @@ -12,7 +12,7 @@ * WARNING: AUTOGENERATED CODE * * This code was generated by a tool. - * Autogenerated on: 2023-10-03 + * Autogenerated on: 2023-10-04 * * Manual changes to this file may cause unexpected behavior in your application. * Manual changes to this file will be overwritten if the code is regenerated. diff --git a/opencga-client/src/main/javascript/Project.js b/opencga-client/src/main/javascript/Project.js index e4cb1219c46..ac6b512a0f7 100644 --- a/opencga-client/src/main/javascript/Project.js +++ b/opencga-client/src/main/javascript/Project.js @@ -12,7 +12,7 @@ * WARNING: AUTOGENERATED CODE * * This code was generated by a tool. - * Autogenerated on: 2023-10-03 + * Autogenerated on: 2023-10-04 * * Manual changes to this file may cause unexpected behavior in your application. * Manual changes to this file will be overwritten if the code is regenerated. diff --git a/opencga-client/src/main/javascript/Sample.js b/opencga-client/src/main/javascript/Sample.js index b0f3da58e07..47638a1517b 100644 --- a/opencga-client/src/main/javascript/Sample.js +++ b/opencga-client/src/main/javascript/Sample.js @@ -12,7 +12,7 @@ * WARNING: AUTOGENERATED CODE * * This code was generated by a tool. - * Autogenerated on: 2023-10-03 + * Autogenerated on: 2023-10-04 * * Manual changes to this file may cause unexpected behavior in your application. * Manual changes to this file will be overwritten if the code is regenerated. diff --git a/opencga-client/src/main/javascript/Study.js b/opencga-client/src/main/javascript/Study.js index 4e2ad088916..bd0909c995f 100644 --- a/opencga-client/src/main/javascript/Study.js +++ b/opencga-client/src/main/javascript/Study.js @@ -12,7 +12,7 @@ * WARNING: AUTOGENERATED CODE * * This code was generated by a tool. - * Autogenerated on: 2023-10-03 + * Autogenerated on: 2023-10-04 * * Manual changes to this file may cause unexpected behavior in your application. * Manual changes to this file will be overwritten if the code is regenerated. diff --git a/opencga-client/src/main/javascript/User.js b/opencga-client/src/main/javascript/User.js index db70e5012ae..9a94f2dd9e5 100644 --- a/opencga-client/src/main/javascript/User.js +++ b/opencga-client/src/main/javascript/User.js @@ -12,7 +12,7 @@ * WARNING: AUTOGENERATED CODE * * This code was generated by a tool. - * Autogenerated on: 2023-10-03 + * Autogenerated on: 2023-10-04 * * Manual changes to this file may cause unexpected behavior in your application. * Manual changes to this file will be overwritten if the code is regenerated. diff --git a/opencga-client/src/main/javascript/Variant.js b/opencga-client/src/main/javascript/Variant.js index e41869a11a3..f470e79bc10 100644 --- a/opencga-client/src/main/javascript/Variant.js +++ b/opencga-client/src/main/javascript/Variant.js @@ -12,7 +12,7 @@ * WARNING: AUTOGENERATED CODE * * This code was generated by a tool. - * Autogenerated on: 2023-10-03 + * Autogenerated on: 2023-10-04 * * Manual changes to this file may cause unexpected behavior in your application. * Manual changes to this file will be overwritten if the code is regenerated. diff --git a/opencga-client/src/main/javascript/VariantOperation.js b/opencga-client/src/main/javascript/VariantOperation.js index f82503aa516..e1881513fd0 100644 --- a/opencga-client/src/main/javascript/VariantOperation.js +++ b/opencga-client/src/main/javascript/VariantOperation.js @@ -12,7 +12,7 @@ * WARNING: AUTOGENERATED CODE * * This code was generated by a tool. - * Autogenerated on: 2023-10-03 + * Autogenerated on: 2023-10-04 * * Manual changes to this file may cause unexpected behavior in your application. * Manual changes to this file will be overwritten if the code is regenerated. diff --git a/opencga-client/src/main/python/pyopencga/rest_clients/admin_client.py b/opencga-client/src/main/python/pyopencga/rest_clients/admin_client.py index 1b28df5bf18..dd26a83ef54 100644 --- a/opencga-client/src/main/python/pyopencga/rest_clients/admin_client.py +++ b/opencga-client/src/main/python/pyopencga/rest_clients/admin_client.py @@ -2,7 +2,7 @@ WARNING: AUTOGENERATED CODE This code was generated by a tool. - Autogenerated on: 2023-10-03 + Autogenerated on: 2023-10-04 Manual changes to this file may cause unexpected behavior in your application. Manual changes to this file will be overwritten if the code is regenerated. diff --git a/opencga-client/src/main/python/pyopencga/rest_clients/alignment_client.py b/opencga-client/src/main/python/pyopencga/rest_clients/alignment_client.py index c3db8524f0f..c402c27faa8 100644 --- a/opencga-client/src/main/python/pyopencga/rest_clients/alignment_client.py +++ b/opencga-client/src/main/python/pyopencga/rest_clients/alignment_client.py @@ -2,7 +2,7 @@ WARNING: AUTOGENERATED CODE This code was generated by a tool. - Autogenerated on: 2023-10-03 + Autogenerated on: 2023-10-04 Manual changes to this file may cause unexpected behavior in your application. Manual changes to this file will be overwritten if the code is regenerated. diff --git a/opencga-client/src/main/python/pyopencga/rest_clients/clinical_analysis_client.py b/opencga-client/src/main/python/pyopencga/rest_clients/clinical_analysis_client.py index 68fe9c1b1a9..d3f1927102b 100644 --- a/opencga-client/src/main/python/pyopencga/rest_clients/clinical_analysis_client.py +++ b/opencga-client/src/main/python/pyopencga/rest_clients/clinical_analysis_client.py @@ -2,7 +2,7 @@ WARNING: AUTOGENERATED CODE This code was generated by a tool. - Autogenerated on: 2023-10-03 + Autogenerated on: 2023-10-04 Manual changes to this file may cause unexpected behavior in your application. Manual changes to this file will be overwritten if the code is regenerated. diff --git a/opencga-client/src/main/python/pyopencga/rest_clients/cohort_client.py b/opencga-client/src/main/python/pyopencga/rest_clients/cohort_client.py index 00ba54caae5..3c3cb584041 100644 --- a/opencga-client/src/main/python/pyopencga/rest_clients/cohort_client.py +++ b/opencga-client/src/main/python/pyopencga/rest_clients/cohort_client.py @@ -2,7 +2,7 @@ WARNING: AUTOGENERATED CODE This code was generated by a tool. - Autogenerated on: 2023-10-03 + Autogenerated on: 2023-10-04 Manual changes to this file may cause unexpected behavior in your application. Manual changes to this file will be overwritten if the code is regenerated. diff --git a/opencga-client/src/main/python/pyopencga/rest_clients/disease_panel_client.py b/opencga-client/src/main/python/pyopencga/rest_clients/disease_panel_client.py index 124b422375d..bc80ec0403d 100644 --- a/opencga-client/src/main/python/pyopencga/rest_clients/disease_panel_client.py +++ b/opencga-client/src/main/python/pyopencga/rest_clients/disease_panel_client.py @@ -2,7 +2,7 @@ WARNING: AUTOGENERATED CODE This code was generated by a tool. - Autogenerated on: 2023-10-03 + Autogenerated on: 2023-10-04 Manual changes to this file may cause unexpected behavior in your application. Manual changes to this file will be overwritten if the code is regenerated. diff --git a/opencga-client/src/main/python/pyopencga/rest_clients/family_client.py b/opencga-client/src/main/python/pyopencga/rest_clients/family_client.py index 40c6eec2439..ab32e42c325 100644 --- a/opencga-client/src/main/python/pyopencga/rest_clients/family_client.py +++ b/opencga-client/src/main/python/pyopencga/rest_clients/family_client.py @@ -2,7 +2,7 @@ WARNING: AUTOGENERATED CODE This code was generated by a tool. - Autogenerated on: 2023-10-03 + Autogenerated on: 2023-10-04 Manual changes to this file may cause unexpected behavior in your application. Manual changes to this file will be overwritten if the code is regenerated. diff --git a/opencga-client/src/main/python/pyopencga/rest_clients/file_client.py b/opencga-client/src/main/python/pyopencga/rest_clients/file_client.py index 7f61d476e46..08344545d75 100644 --- a/opencga-client/src/main/python/pyopencga/rest_clients/file_client.py +++ b/opencga-client/src/main/python/pyopencga/rest_clients/file_client.py @@ -2,7 +2,7 @@ WARNING: AUTOGENERATED CODE This code was generated by a tool. - Autogenerated on: 2023-10-03 + Autogenerated on: 2023-10-04 Manual changes to this file may cause unexpected behavior in your application. Manual changes to this file will be overwritten if the code is regenerated. diff --git a/opencga-client/src/main/python/pyopencga/rest_clients/ga4gh_client.py b/opencga-client/src/main/python/pyopencga/rest_clients/ga4gh_client.py index 33dd6d98005..82abbc91e0a 100644 --- a/opencga-client/src/main/python/pyopencga/rest_clients/ga4gh_client.py +++ b/opencga-client/src/main/python/pyopencga/rest_clients/ga4gh_client.py @@ -2,7 +2,7 @@ WARNING: AUTOGENERATED CODE This code was generated by a tool. - Autogenerated on: 2023-10-03 + Autogenerated on: 2023-10-04 Manual changes to this file may cause unexpected behavior in your application. Manual changes to this file will be overwritten if the code is regenerated. diff --git a/opencga-client/src/main/python/pyopencga/rest_clients/individual_client.py b/opencga-client/src/main/python/pyopencga/rest_clients/individual_client.py index 49c6cb18990..03ccaff7058 100644 --- a/opencga-client/src/main/python/pyopencga/rest_clients/individual_client.py +++ b/opencga-client/src/main/python/pyopencga/rest_clients/individual_client.py @@ -2,7 +2,7 @@ WARNING: AUTOGENERATED CODE This code was generated by a tool. - Autogenerated on: 2023-10-03 + Autogenerated on: 2023-10-04 Manual changes to this file may cause unexpected behavior in your application. Manual changes to this file will be overwritten if the code is regenerated. diff --git a/opencga-client/src/main/python/pyopencga/rest_clients/job_client.py b/opencga-client/src/main/python/pyopencga/rest_clients/job_client.py index 5995452943e..1b9946676c7 100644 --- a/opencga-client/src/main/python/pyopencga/rest_clients/job_client.py +++ b/opencga-client/src/main/python/pyopencga/rest_clients/job_client.py @@ -2,7 +2,7 @@ WARNING: AUTOGENERATED CODE This code was generated by a tool. - Autogenerated on: 2023-10-03 + Autogenerated on: 2023-10-04 Manual changes to this file may cause unexpected behavior in your application. Manual changes to this file will be overwritten if the code is regenerated. diff --git a/opencga-client/src/main/python/pyopencga/rest_clients/meta_client.py b/opencga-client/src/main/python/pyopencga/rest_clients/meta_client.py index 6d0fe4a749c..c2912d49faa 100644 --- a/opencga-client/src/main/python/pyopencga/rest_clients/meta_client.py +++ b/opencga-client/src/main/python/pyopencga/rest_clients/meta_client.py @@ -2,7 +2,7 @@ WARNING: AUTOGENERATED CODE This code was generated by a tool. - Autogenerated on: 2023-10-03 + Autogenerated on: 2023-10-04 Manual changes to this file may cause unexpected behavior in your application. Manual changes to this file will be overwritten if the code is regenerated. diff --git a/opencga-client/src/main/python/pyopencga/rest_clients/project_client.py b/opencga-client/src/main/python/pyopencga/rest_clients/project_client.py index 00a9352c398..6e8eb18d1cd 100644 --- a/opencga-client/src/main/python/pyopencga/rest_clients/project_client.py +++ b/opencga-client/src/main/python/pyopencga/rest_clients/project_client.py @@ -2,7 +2,7 @@ WARNING: AUTOGENERATED CODE This code was generated by a tool. - Autogenerated on: 2023-10-03 + Autogenerated on: 2023-10-04 Manual changes to this file may cause unexpected behavior in your application. Manual changes to this file will be overwritten if the code is regenerated. diff --git a/opencga-client/src/main/python/pyopencga/rest_clients/sample_client.py b/opencga-client/src/main/python/pyopencga/rest_clients/sample_client.py index c745f9e58e9..2e5734521cc 100644 --- a/opencga-client/src/main/python/pyopencga/rest_clients/sample_client.py +++ b/opencga-client/src/main/python/pyopencga/rest_clients/sample_client.py @@ -2,7 +2,7 @@ WARNING: AUTOGENERATED CODE This code was generated by a tool. - Autogenerated on: 2023-10-03 + Autogenerated on: 2023-10-04 Manual changes to this file may cause unexpected behavior in your application. Manual changes to this file will be overwritten if the code is regenerated. diff --git a/opencga-client/src/main/python/pyopencga/rest_clients/study_client.py b/opencga-client/src/main/python/pyopencga/rest_clients/study_client.py index 14a75a2e9b8..4a2d7250413 100644 --- a/opencga-client/src/main/python/pyopencga/rest_clients/study_client.py +++ b/opencga-client/src/main/python/pyopencga/rest_clients/study_client.py @@ -2,7 +2,7 @@ WARNING: AUTOGENERATED CODE This code was generated by a tool. - Autogenerated on: 2023-10-03 + Autogenerated on: 2023-10-04 Manual changes to this file may cause unexpected behavior in your application. Manual changes to this file will be overwritten if the code is regenerated. diff --git a/opencga-client/src/main/python/pyopencga/rest_clients/user_client.py b/opencga-client/src/main/python/pyopencga/rest_clients/user_client.py index b9a1ae86e43..3027cdd4965 100644 --- a/opencga-client/src/main/python/pyopencga/rest_clients/user_client.py +++ b/opencga-client/src/main/python/pyopencga/rest_clients/user_client.py @@ -2,7 +2,7 @@ WARNING: AUTOGENERATED CODE This code was generated by a tool. - Autogenerated on: 2023-10-03 + Autogenerated on: 2023-10-04 Manual changes to this file may cause unexpected behavior in your application. Manual changes to this file will be overwritten if the code is regenerated. diff --git a/opencga-client/src/main/python/pyopencga/rest_clients/variant_client.py b/opencga-client/src/main/python/pyopencga/rest_clients/variant_client.py index fc2a85ed84d..933dd47ada4 100644 --- a/opencga-client/src/main/python/pyopencga/rest_clients/variant_client.py +++ b/opencga-client/src/main/python/pyopencga/rest_clients/variant_client.py @@ -2,7 +2,7 @@ WARNING: AUTOGENERATED CODE This code was generated by a tool. - Autogenerated on: 2023-10-03 + Autogenerated on: 2023-10-04 Manual changes to this file may cause unexpected behavior in your application. Manual changes to this file will be overwritten if the code is regenerated. diff --git a/opencga-client/src/main/python/pyopencga/rest_clients/variant_operation_client.py b/opencga-client/src/main/python/pyopencga/rest_clients/variant_operation_client.py index d8ce1e72302..6061c2625d0 100644 --- a/opencga-client/src/main/python/pyopencga/rest_clients/variant_operation_client.py +++ b/opencga-client/src/main/python/pyopencga/rest_clients/variant_operation_client.py @@ -2,7 +2,7 @@ WARNING: AUTOGENERATED CODE This code was generated by a tool. - Autogenerated on: 2023-10-03 + Autogenerated on: 2023-10-04 Manual changes to this file may cause unexpected behavior in your application. Manual changes to this file will be overwritten if the code is regenerated. From 0049ae6476ee22b7f03e1a9ba1de45be2c9fc6b0 Mon Sep 17 00:00:00 2001 From: JuanfeSanahuja Date: Wed, 4 Oct 2023 16:17:28 +0200 Subject: [PATCH 33/50] client: Regenerate autogenerated code for release 2.8.4 Xetabase 1.6.5 --- .github/workflows/pull-request-merge.yml | 24 +++++++++++++++--------- 1 file changed, 15 insertions(+), 9 deletions(-) diff --git a/.github/workflows/pull-request-merge.yml b/.github/workflows/pull-request-merge.yml index 7d6fcb8818f..64287bc02f6 100644 --- a/.github/workflows/pull-request-merge.yml +++ b/.github/workflows/pull-request-merge.yml @@ -11,13 +11,19 @@ on: jobs: build: - uses: opencb/java-common-libs/.github/workflows/build-java-app-workflow.yml@release-4.8.x - with: - maven_opts: -P storage-hadoop,hdp3.1,RClient,opencga-storage-hadoop-deps -Dopencga.war.name=opencga -Dcheckstyle.skip -pl '!:opencga-storage-hadoop-deps-emr6.1,!:opencga-storage-hadoop-deps-hdp2.6' + name: Delete docker + runs-on: ubuntu-22.04 + steps: + - uses: actions/checkout@v3 + with: + fetch-depth: '0' + - name: Build opencga + uses: opencb/java-common-libs/.github/workflows/build-java-app-workflow.yml@release-4.8.x + with: + maven_opts: -P storage-hadoop,hdp3.1,RClient,opencga-storage-hadoop-deps -Dopencga.war.name=opencga -Dcheckstyle.skip -pl '!:opencga-storage-hadoop-deps-emr6.1,!:opencga-storage-hadoop-deps-hdp2.6' + - name: Delete docker + uses: opencb/java-common-libs/.github/workflows/delete-docker-hub-workflow.yml@release-4.8.x + with: + cli: python3 ./build/cloud/docker/docker-build.py delete --images base --tag ${{ github.head_ref }} + secrets: inherit - delete-docker: - uses: opencb/java-common-libs/.github/workflows/delete-docker-hub-workflow.yml@release-4.8.x - needs: build - with: - cli: python3 ./build/cloud/docker/docker-build.py delete --images base --tag ${{ github.head_ref }} - secrets: inherit From d42cd6aee6b90f82487a593cb6e451c8bfcb611c Mon Sep 17 00:00:00 2001 From: JuanfeSanahuja Date: Wed, 4 Oct 2023 16:22:26 +0200 Subject: [PATCH 34/50] client: Regenerate autogenerated code for release 2.8.4 Xetabase 1.6.5 --- .github/workflows/pull-request-merge.yml | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/.github/workflows/pull-request-merge.yml b/.github/workflows/pull-request-merge.yml index 64287bc02f6..f13b7c9de70 100644 --- a/.github/workflows/pull-request-merge.yml +++ b/.github/workflows/pull-request-merge.yml @@ -14,7 +14,8 @@ jobs: name: Delete docker runs-on: ubuntu-22.04 steps: - - uses: actions/checkout@v3 + - name: checkout opencga + uses: actions/checkout@v3 with: fetch-depth: '0' - name: Build opencga From 11a7c9d30515db218e3a34c0696ebca47e5fa87b Mon Sep 17 00:00:00 2001 From: JuanfeSanahuja Date: Wed, 4 Oct 2023 17:45:03 +0200 Subject: [PATCH 35/50] cicd: undo step by step #TASK-5092 --- .github/workflows/pull-request-merge.yml | 25 +++++++++--------------- 1 file changed, 9 insertions(+), 16 deletions(-) diff --git a/.github/workflows/pull-request-merge.yml b/.github/workflows/pull-request-merge.yml index f13b7c9de70..7d6fcb8818f 100644 --- a/.github/workflows/pull-request-merge.yml +++ b/.github/workflows/pull-request-merge.yml @@ -11,20 +11,13 @@ on: jobs: build: - name: Delete docker - runs-on: ubuntu-22.04 - steps: - - name: checkout opencga - uses: actions/checkout@v3 - with: - fetch-depth: '0' - - name: Build opencga - uses: opencb/java-common-libs/.github/workflows/build-java-app-workflow.yml@release-4.8.x - with: - maven_opts: -P storage-hadoop,hdp3.1,RClient,opencga-storage-hadoop-deps -Dopencga.war.name=opencga -Dcheckstyle.skip -pl '!:opencga-storage-hadoop-deps-emr6.1,!:opencga-storage-hadoop-deps-hdp2.6' - - name: Delete docker - uses: opencb/java-common-libs/.github/workflows/delete-docker-hub-workflow.yml@release-4.8.x - with: - cli: python3 ./build/cloud/docker/docker-build.py delete --images base --tag ${{ github.head_ref }} - secrets: inherit + uses: opencb/java-common-libs/.github/workflows/build-java-app-workflow.yml@release-4.8.x + with: + maven_opts: -P storage-hadoop,hdp3.1,RClient,opencga-storage-hadoop-deps -Dopencga.war.name=opencga -Dcheckstyle.skip -pl '!:opencga-storage-hadoop-deps-emr6.1,!:opencga-storage-hadoop-deps-hdp2.6' + delete-docker: + uses: opencb/java-common-libs/.github/workflows/delete-docker-hub-workflow.yml@release-4.8.x + needs: build + with: + cli: python3 ./build/cloud/docker/docker-build.py delete --images base --tag ${{ github.head_ref }} + secrets: inherit From 75133993fa884deaa2a30ffcd1374112a431ff8f Mon Sep 17 00:00:00 2001 From: JuanfeSanahuja Date: Wed, 4 Oct 2023 18:32:41 +0200 Subject: [PATCH 36/50] cicd: undo step by step #TASK-5092 --- .github/workflows/pull-request-merge.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/pull-request-merge.yml b/.github/workflows/pull-request-merge.yml index 7d6fcb8818f..fd33debe8fd 100644 --- a/.github/workflows/pull-request-merge.yml +++ b/.github/workflows/pull-request-merge.yml @@ -16,7 +16,7 @@ jobs: maven_opts: -P storage-hadoop,hdp3.1,RClient,opencga-storage-hadoop-deps -Dopencga.war.name=opencga -Dcheckstyle.skip -pl '!:opencga-storage-hadoop-deps-emr6.1,!:opencga-storage-hadoop-deps-hdp2.6' delete-docker: - uses: opencb/java-common-libs/.github/workflows/delete-docker-hub-workflow.yml@release-4.8.x + uses: opencb/java-common-libs/.github/workflows/deploy-docker-hub-workflow.yml@release-4.8.x needs: build with: cli: python3 ./build/cloud/docker/docker-build.py delete --images base --tag ${{ github.head_ref }} From 146499fb39f9586b212bfdbfce56c1287102f888 Mon Sep 17 00:00:00 2001 From: JuanfeSanahuja Date: Wed, 4 Oct 2023 22:52:52 +0200 Subject: [PATCH 37/50] cicd: github.ref_name #TASK-5092 --- .github/workflows/pull-request-merge.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/pull-request-merge.yml b/.github/workflows/pull-request-merge.yml index fd33debe8fd..92316819754 100644 --- a/.github/workflows/pull-request-merge.yml +++ b/.github/workflows/pull-request-merge.yml @@ -19,5 +19,5 @@ jobs: uses: opencb/java-common-libs/.github/workflows/deploy-docker-hub-workflow.yml@release-4.8.x needs: build with: - cli: python3 ./build/cloud/docker/docker-build.py delete --images base --tag ${{ github.head_ref }} + cli: python3 ./build/cloud/docker/docker-build.py delete --images base --tag ${{ github.ref_name }} secrets: inherit From 4220c82670cbe1ddea6501e67ffbccbacb1da5ee Mon Sep 17 00:00:00 2001 From: JuanfeSanahuja Date: Wed, 4 Oct 2023 22:54:49 +0200 Subject: [PATCH 38/50] cicd: simplify build #TASK-5092 --- .github/workflows/pull-request-merge.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/pull-request-merge.yml b/.github/workflows/pull-request-merge.yml index 92316819754..4612e45c837 100644 --- a/.github/workflows/pull-request-merge.yml +++ b/.github/workflows/pull-request-merge.yml @@ -13,7 +13,7 @@ jobs: build: uses: opencb/java-common-libs/.github/workflows/build-java-app-workflow.yml@release-4.8.x with: - maven_opts: -P storage-hadoop,hdp3.1,RClient,opencga-storage-hadoop-deps -Dopencga.war.name=opencga -Dcheckstyle.skip -pl '!:opencga-storage-hadoop-deps-emr6.1,!:opencga-storage-hadoop-deps-hdp2.6' + maven_opts: -Dopencga.war.name=opencga -Dcheckstyle.skip delete-docker: uses: opencb/java-common-libs/.github/workflows/deploy-docker-hub-workflow.yml@release-4.8.x From cb7bff1424115180234c91cd73904dbdfe1a9f80 Mon Sep 17 00:00:00 2001 From: JuanfeSanahuja Date: Thu, 5 Oct 2023 10:38:34 +0200 Subject: [PATCH 39/50] cicd: simplify build #TASK-5092 --- .github/workflows/pull-request-merge.yml | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/.github/workflows/pull-request-merge.yml b/.github/workflows/pull-request-merge.yml index 4612e45c837..fe5f0e6c16f 100644 --- a/.github/workflows/pull-request-merge.yml +++ b/.github/workflows/pull-request-merge.yml @@ -20,4 +20,6 @@ jobs: needs: build with: cli: python3 ./build/cloud/docker/docker-build.py delete --images base --tag ${{ github.ref_name }} - secrets: inherit + secrets: + username: ${{ secrets.DOCKER_HUB_USER }} + password: ${{ secrets.DOCKER_HUB_PASSWORD }} From 5003c438e2dcc6a172f116c367300359e7af6e58 Mon Sep 17 00:00:00 2001 From: JuanfeSanahuja Date: Thu, 5 Oct 2023 10:40:44 +0200 Subject: [PATCH 40/50] cicd: simplify build #TASK-5092 --- .github/workflows/pull-request-merge.yml | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/.github/workflows/pull-request-merge.yml b/.github/workflows/pull-request-merge.yml index fe5f0e6c16f..a18a7107f93 100644 --- a/.github/workflows/pull-request-merge.yml +++ b/.github/workflows/pull-request-merge.yml @@ -7,7 +7,9 @@ on: - "release-*" types: - closed - workflow_dispatch: + push: + branches: + - TASK-* jobs: build: @@ -20,6 +22,4 @@ jobs: needs: build with: cli: python3 ./build/cloud/docker/docker-build.py delete --images base --tag ${{ github.ref_name }} - secrets: - username: ${{ secrets.DOCKER_HUB_USER }} - password: ${{ secrets.DOCKER_HUB_PASSWORD }} + secrets: inherit From e01b7ffd2fae668ca7d16fa49606c60b488b92e2 Mon Sep 17 00:00:00 2001 From: JuanfeSanahuja Date: Thu, 5 Oct 2023 11:34:17 +0200 Subject: [PATCH 41/50] cicd: added credentials to CLI #TASK-5092 --- .github/workflows/pull-request-merge.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/pull-request-merge.yml b/.github/workflows/pull-request-merge.yml index a18a7107f93..7d9ce1a5879 100644 --- a/.github/workflows/pull-request-merge.yml +++ b/.github/workflows/pull-request-merge.yml @@ -21,5 +21,5 @@ jobs: uses: opencb/java-common-libs/.github/workflows/deploy-docker-hub-workflow.yml@release-4.8.x needs: build with: - cli: python3 ./build/cloud/docker/docker-build.py delete --images base --tag ${{ github.ref_name }} + cli: python3 ./build/cloud/docker/docker-build.py delete --images base --tag ${{ github.ref_name }} --username "${{ secrets.DOCKER_HUB_USER }}" --password ${{ secrets.DOCKER_HUB_PASSWORD }} secrets: inherit From b282cd8aaf24987126638833f66a560568480bfe Mon Sep 17 00:00:00 2001 From: JuanfeSanahuja Date: Thu, 5 Oct 2023 11:38:36 +0200 Subject: [PATCH 42/50] cicd: added credentials to CLI #TASK-5092 --- .github/workflows/pull-request-merge.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/pull-request-merge.yml b/.github/workflows/pull-request-merge.yml index 7d9ce1a5879..ef13a61d9d2 100644 --- a/.github/workflows/pull-request-merge.yml +++ b/.github/workflows/pull-request-merge.yml @@ -21,5 +21,5 @@ jobs: uses: opencb/java-common-libs/.github/workflows/deploy-docker-hub-workflow.yml@release-4.8.x needs: build with: - cli: python3 ./build/cloud/docker/docker-build.py delete --images base --tag ${{ github.ref_name }} --username "${{ secrets.DOCKER_HUB_USER }}" --password ${{ secrets.DOCKER_HUB_PASSWORD }} + cli: python3 ./build/cloud/docker/docker-build.py delete --images base --tag ${{ github.ref_name }} --username ${{ secrets.DOCKER_HUB_USER }} --password ${{ secrets.DOCKER_HUB_PASSWORD }} secrets: inherit From a39f410ad83efbf34d2e80aa432eca43bb37c2ff Mon Sep 17 00:00:00 2001 From: JuanfeSanahuja Date: Thu, 5 Oct 2023 11:48:06 +0200 Subject: [PATCH 43/50] cicd: added credentials to CLI #TASK-5092 --- .github/workflows/pull-request-merge.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/pull-request-merge.yml b/.github/workflows/pull-request-merge.yml index ef13a61d9d2..4d011d27fd6 100644 --- a/.github/workflows/pull-request-merge.yml +++ b/.github/workflows/pull-request-merge.yml @@ -21,5 +21,5 @@ jobs: uses: opencb/java-common-libs/.github/workflows/deploy-docker-hub-workflow.yml@release-4.8.x needs: build with: - cli: python3 ./build/cloud/docker/docker-build.py delete --images base --tag ${{ github.ref_name }} --username ${{ secrets.DOCKER_HUB_USER }} --password ${{ secrets.DOCKER_HUB_PASSWORD }} + cli: "python3 ./build/cloud/docker/docker-build.py delete --images base --tag ${{ github.ref_name }} --username ${{ secrets.DOCKER_HUB_USER }} --password ${{ secrets.DOCKER_HUB_PASSWORD }}" secrets: inherit From 67d4e3db158942989e1d950626c35d53378a6624 Mon Sep 17 00:00:00 2001 From: JuanfeSanahuja Date: Thu, 5 Oct 2023 11:53:31 +0200 Subject: [PATCH 44/50] cicd: added credentials to CLI #TASK-5092 --- .github/workflows/pull-request-merge.yml | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a/.github/workflows/pull-request-merge.yml b/.github/workflows/pull-request-merge.yml index 4d011d27fd6..8cebdf8272d 100644 --- a/.github/workflows/pull-request-merge.yml +++ b/.github/workflows/pull-request-merge.yml @@ -7,9 +7,19 @@ on: - "release-*" types: - closed + secrets: + DOCKER_HUB_USER: + required: true + DOCKER_HUB_PASSWORD: + required: true push: branches: - TASK-* + secrets: + DOCKER_HUB_USER: + required: true + DOCKER_HUB_PASSWORD: + required: true jobs: build: @@ -21,5 +31,5 @@ jobs: uses: opencb/java-common-libs/.github/workflows/deploy-docker-hub-workflow.yml@release-4.8.x needs: build with: - cli: "python3 ./build/cloud/docker/docker-build.py delete --images base --tag ${{ github.ref_name }} --username ${{ secrets.DOCKER_HUB_USER }} --password ${{ secrets.DOCKER_HUB_PASSWORD }}" + cli: python3 ./build/cloud/docker/docker-build.py delete --images base --tag ${{ github.ref_name }} --username ${{ secrets.DOCKER_HUB_USER }} --password ${{ secrets.DOCKER_HUB_PASSWORD }} secrets: inherit From 47a4c4944b36924bc82594f61f2f1ea33c94fd9c Mon Sep 17 00:00:00 2001 From: JuanfeSanahuja Date: Thu, 5 Oct 2023 12:40:30 +0200 Subject: [PATCH 45/50] cicd: remove parameter credentials to CLI #TASK-5092 --- .github/workflows/pull-request-merge.yml | 10 ---------- 1 file changed, 10 deletions(-) diff --git a/.github/workflows/pull-request-merge.yml b/.github/workflows/pull-request-merge.yml index 8cebdf8272d..ef13a61d9d2 100644 --- a/.github/workflows/pull-request-merge.yml +++ b/.github/workflows/pull-request-merge.yml @@ -7,19 +7,9 @@ on: - "release-*" types: - closed - secrets: - DOCKER_HUB_USER: - required: true - DOCKER_HUB_PASSWORD: - required: true push: branches: - TASK-* - secrets: - DOCKER_HUB_USER: - required: true - DOCKER_HUB_PASSWORD: - required: true jobs: build: From 16e76568899830c9a605c0a7972047d6de047aac Mon Sep 17 00:00:00 2001 From: JuanfeSanahuja Date: Thu, 5 Oct 2023 13:03:40 +0200 Subject: [PATCH 46/50] cicd: add checkout and remove build #TASK-5092 --- .github/workflows/pull-request-merge.yml | 17 +++++++---------- 1 file changed, 7 insertions(+), 10 deletions(-) diff --git a/.github/workflows/pull-request-merge.yml b/.github/workflows/pull-request-merge.yml index ef13a61d9d2..ad80cf1eba8 100644 --- a/.github/workflows/pull-request-merge.yml +++ b/.github/workflows/pull-request-merge.yml @@ -12,14 +12,11 @@ on: - TASK-* jobs: - build: - uses: opencb/java-common-libs/.github/workflows/build-java-app-workflow.yml@release-4.8.x - with: - maven_opts: -Dopencga.war.name=opencga -Dcheckstyle.skip - - delete-docker: - uses: opencb/java-common-libs/.github/workflows/deploy-docker-hub-workflow.yml@release-4.8.x - needs: build - with: - cli: python3 ./build/cloud/docker/docker-build.py delete --images base --tag ${{ github.ref_name }} --username ${{ secrets.DOCKER_HUB_USER }} --password ${{ secrets.DOCKER_HUB_PASSWORD }} + docker-delete: + name: Delete TASK docker image + runs-on: ubuntu-22.04 + steps: + - name: "Checkout opencga" + uses: actions/checkout@v2 + - run: python3 ./opencga-app/app/cloud/docker/docker-build.py delete --images base --tag ${{ github.ref_name }} --username ${{ secrets.DOCKER_HUB_USER }} --password ${{ secrets.DOCKER_HUB_PASSWORD }} secrets: inherit From 9d056c90efd741df8031cd10e2fb8af3a00e9c7e Mon Sep 17 00:00:00 2001 From: imedina Date: Thu, 5 Oct 2023 12:07:12 +0100 Subject: [PATCH 47/50] cicd: remove inherit --- .github/workflows/pull-request-merge.yml | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/.github/workflows/pull-request-merge.yml b/.github/workflows/pull-request-merge.yml index ad80cf1eba8..5da76d0492e 100644 --- a/.github/workflows/pull-request-merge.yml +++ b/.github/workflows/pull-request-merge.yml @@ -17,6 +17,5 @@ jobs: runs-on: ubuntu-22.04 steps: - name: "Checkout opencga" - uses: actions/checkout@v2 + uses: actions/checkout@v3 - run: python3 ./opencga-app/app/cloud/docker/docker-build.py delete --images base --tag ${{ github.ref_name }} --username ${{ secrets.DOCKER_HUB_USER }} --password ${{ secrets.DOCKER_HUB_PASSWORD }} - secrets: inherit From 27253e648f4980502727104fdc205175471c95a9 Mon Sep 17 00:00:00 2001 From: imedina Date: Thu, 5 Oct 2023 12:08:50 +0100 Subject: [PATCH 48/50] cicd: remove event --- .github/workflows/pull-request-merge.yml | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/.github/workflows/pull-request-merge.yml b/.github/workflows/pull-request-merge.yml index 5da76d0492e..31b98d5afc1 100644 --- a/.github/workflows/pull-request-merge.yml +++ b/.github/workflows/pull-request-merge.yml @@ -7,13 +7,10 @@ on: - "release-*" types: - closed - push: - branches: - - TASK-* jobs: docker-delete: - name: Delete TASK docker image + name: Delete TASK Docker image runs-on: ubuntu-22.04 steps: - name: "Checkout opencga" From 7aaab0c7de3800024126328bf6033b35e9331118 Mon Sep 17 00:00:00 2001 From: JuanfeSanahuja Date: Tue, 10 Oct 2023 15:41:54 +0200 Subject: [PATCH 49/50] Prepare release 2.8.4 --- opencga-analysis/pom.xml | 2 +- opencga-app/pom.xml | 2 +- opencga-catalog/pom.xml | 2 +- opencga-client/pom.xml | 2 +- opencga-clinical/pom.xml | 2 +- opencga-core/pom.xml | 2 +- opencga-master/pom.xml | 2 +- opencga-server/pom.xml | 2 +- opencga-storage/opencga-storage-app/pom.xml | 2 +- opencga-storage/opencga-storage-benchmark/pom.xml | 2 +- opencga-storage/opencga-storage-core/pom.xml | 2 +- .../opencga-storage-hadoop-core/pom.xml | 2 +- .../opencga-storage-hadoop-deps-emr6.1/pom.xml | 2 +- .../opencga-storage-hadoop-deps-hdp2.6/pom.xml | 2 +- .../opencga-storage-hadoop-deps-hdp3.1/pom.xml | 2 +- .../opencga-storage-hadoop-deps/pom.xml | 2 +- opencga-storage/opencga-storage-hadoop/pom.xml | 2 +- opencga-storage/opencga-storage-server/pom.xml | 2 +- opencga-storage/pom.xml | 2 +- opencga-test/pom.xml | 2 +- pom.xml | 14 +++++++------- 21 files changed, 27 insertions(+), 27 deletions(-) diff --git a/opencga-analysis/pom.xml b/opencga-analysis/pom.xml index 27d587f2570..5def9cd5e2e 100644 --- a/opencga-analysis/pom.xml +++ b/opencga-analysis/pom.xml @@ -22,7 +22,7 @@ org.opencb.opencga opencga - 2.8.4-SNAPSHOT + 2.8.4 ../pom.xml diff --git a/opencga-app/pom.xml b/opencga-app/pom.xml index 2385d662674..9b7c4f29edd 100644 --- a/opencga-app/pom.xml +++ b/opencga-app/pom.xml @@ -22,7 +22,7 @@ org.opencb.opencga opencga - 2.8.4-SNAPSHOT + 2.8.4 ../pom.xml diff --git a/opencga-catalog/pom.xml b/opencga-catalog/pom.xml index 7d080fd8418..960d84a610a 100644 --- a/opencga-catalog/pom.xml +++ b/opencga-catalog/pom.xml @@ -23,7 +23,7 @@ org.opencb.opencga opencga - 2.8.4-SNAPSHOT + 2.8.4 ../pom.xml diff --git a/opencga-client/pom.xml b/opencga-client/pom.xml index 888eaac8d71..b8c097d777e 100644 --- a/opencga-client/pom.xml +++ b/opencga-client/pom.xml @@ -22,7 +22,7 @@ org.opencb.opencga opencga - 2.8.4-SNAPSHOT + 2.8.4 ../pom.xml diff --git a/opencga-clinical/pom.xml b/opencga-clinical/pom.xml index 360241475b7..e281f5d48a0 100644 --- a/opencga-clinical/pom.xml +++ b/opencga-clinical/pom.xml @@ -5,7 +5,7 @@ org.opencb.opencga opencga - 2.8.4-SNAPSHOT + 2.8.4 ../pom.xml 4.0.0 diff --git a/opencga-core/pom.xml b/opencga-core/pom.xml index 7a38b121537..1fcf341a09f 100644 --- a/opencga-core/pom.xml +++ b/opencga-core/pom.xml @@ -22,7 +22,7 @@ org.opencb.opencga opencga - 2.8.4-SNAPSHOT + 2.8.4 ../pom.xml diff --git a/opencga-master/pom.xml b/opencga-master/pom.xml index ab98b30941e..468fb7a5683 100644 --- a/opencga-master/pom.xml +++ b/opencga-master/pom.xml @@ -22,7 +22,7 @@ opencga org.opencb.opencga - 2.8.4-SNAPSHOT + 2.8.4 ../pom.xml diff --git a/opencga-server/pom.xml b/opencga-server/pom.xml index ee168db3285..43949773d01 100644 --- a/opencga-server/pom.xml +++ b/opencga-server/pom.xml @@ -22,7 +22,7 @@ org.opencb.opencga opencga - 2.8.4-SNAPSHOT + 2.8.4 ../pom.xml diff --git a/opencga-storage/opencga-storage-app/pom.xml b/opencga-storage/opencga-storage-app/pom.xml index 571408e76ce..8008b10a31f 100644 --- a/opencga-storage/opencga-storage-app/pom.xml +++ b/opencga-storage/opencga-storage-app/pom.xml @@ -22,7 +22,7 @@ org.opencb.opencga opencga-storage - 2.8.4-SNAPSHOT + 2.8.4 ../pom.xml diff --git a/opencga-storage/opencga-storage-benchmark/pom.xml b/opencga-storage/opencga-storage-benchmark/pom.xml index 37f3a122b1a..9caad37be25 100644 --- a/opencga-storage/opencga-storage-benchmark/pom.xml +++ b/opencga-storage/opencga-storage-benchmark/pom.xml @@ -22,7 +22,7 @@ opencga-storage org.opencb.opencga - 2.8.4-SNAPSHOT + 2.8.4 ../pom.xml diff --git a/opencga-storage/opencga-storage-core/pom.xml b/opencga-storage/opencga-storage-core/pom.xml index cfeeb573faa..2c743523aeb 100644 --- a/opencga-storage/opencga-storage-core/pom.xml +++ b/opencga-storage/opencga-storage-core/pom.xml @@ -25,7 +25,7 @@ org.opencb.opencga opencga-storage - 2.8.4-SNAPSHOT + 2.8.4 ../pom.xml diff --git a/opencga-storage/opencga-storage-hadoop/opencga-storage-hadoop-core/pom.xml b/opencga-storage/opencga-storage-hadoop/opencga-storage-hadoop-core/pom.xml index 168c6fe1676..39737e3e7be 100644 --- a/opencga-storage/opencga-storage-hadoop/opencga-storage-hadoop-core/pom.xml +++ b/opencga-storage/opencga-storage-hadoop/opencga-storage-hadoop-core/pom.xml @@ -23,7 +23,7 @@ org.opencb.opencga opencga-storage-hadoop - 2.8.4-SNAPSHOT + 2.8.4 ../pom.xml diff --git a/opencga-storage/opencga-storage-hadoop/opencga-storage-hadoop-deps/opencga-storage-hadoop-deps-emr6.1/pom.xml b/opencga-storage/opencga-storage-hadoop/opencga-storage-hadoop-deps/opencga-storage-hadoop-deps-emr6.1/pom.xml index 17aedc345a2..55512378967 100644 --- a/opencga-storage/opencga-storage-hadoop/opencga-storage-hadoop-deps/opencga-storage-hadoop-deps-emr6.1/pom.xml +++ b/opencga-storage/opencga-storage-hadoop/opencga-storage-hadoop-deps/opencga-storage-hadoop-deps-emr6.1/pom.xml @@ -22,7 +22,7 @@ org.opencb.opencga opencga-storage-hadoop-deps - 2.8.4-SNAPSHOT + 2.8.4 ../pom.xml diff --git a/opencga-storage/opencga-storage-hadoop/opencga-storage-hadoop-deps/opencga-storage-hadoop-deps-hdp2.6/pom.xml b/opencga-storage/opencga-storage-hadoop/opencga-storage-hadoop-deps/opencga-storage-hadoop-deps-hdp2.6/pom.xml index 41bf7b35961..109b9c41cda 100644 --- a/opencga-storage/opencga-storage-hadoop/opencga-storage-hadoop-deps/opencga-storage-hadoop-deps-hdp2.6/pom.xml +++ b/opencga-storage/opencga-storage-hadoop/opencga-storage-hadoop-deps/opencga-storage-hadoop-deps-hdp2.6/pom.xml @@ -22,7 +22,7 @@ org.opencb.opencga opencga-storage-hadoop-deps - 2.8.4-SNAPSHOT + 2.8.4 ../pom.xml diff --git a/opencga-storage/opencga-storage-hadoop/opencga-storage-hadoop-deps/opencga-storage-hadoop-deps-hdp3.1/pom.xml b/opencga-storage/opencga-storage-hadoop/opencga-storage-hadoop-deps/opencga-storage-hadoop-deps-hdp3.1/pom.xml index 9b3778791cc..a662fff2a4a 100644 --- a/opencga-storage/opencga-storage-hadoop/opencga-storage-hadoop-deps/opencga-storage-hadoop-deps-hdp3.1/pom.xml +++ b/opencga-storage/opencga-storage-hadoop/opencga-storage-hadoop-deps/opencga-storage-hadoop-deps-hdp3.1/pom.xml @@ -22,7 +22,7 @@ org.opencb.opencga opencga-storage-hadoop-deps - 2.8.4-SNAPSHOT + 2.8.4 ../pom.xml diff --git a/opencga-storage/opencga-storage-hadoop/opencga-storage-hadoop-deps/pom.xml b/opencga-storage/opencga-storage-hadoop/opencga-storage-hadoop-deps/pom.xml index 4888d43ee94..d392b220a7b 100644 --- a/opencga-storage/opencga-storage-hadoop/opencga-storage-hadoop-deps/pom.xml +++ b/opencga-storage/opencga-storage-hadoop/opencga-storage-hadoop-deps/pom.xml @@ -50,7 +50,7 @@ org.opencb.opencga opencga-storage-hadoop - 2.8.4-SNAPSHOT + 2.8.4 ../pom.xml diff --git a/opencga-storage/opencga-storage-hadoop/pom.xml b/opencga-storage/opencga-storage-hadoop/pom.xml index 1a800f5260f..7b57b777111 100644 --- a/opencga-storage/opencga-storage-hadoop/pom.xml +++ b/opencga-storage/opencga-storage-hadoop/pom.xml @@ -28,7 +28,7 @@ org.opencb.opencga opencga-storage - 2.8.4-SNAPSHOT + 2.8.4 ../pom.xml diff --git a/opencga-storage/opencga-storage-server/pom.xml b/opencga-storage/opencga-storage-server/pom.xml index ba87c9b2a6d..b6e04e741d1 100644 --- a/opencga-storage/opencga-storage-server/pom.xml +++ b/opencga-storage/opencga-storage-server/pom.xml @@ -22,7 +22,7 @@ org.opencb.opencga opencga-storage - 2.8.4-SNAPSHOT + 2.8.4 ../pom.xml diff --git a/opencga-storage/pom.xml b/opencga-storage/pom.xml index 996d1d8c1ad..bc38910593d 100644 --- a/opencga-storage/pom.xml +++ b/opencga-storage/pom.xml @@ -22,7 +22,7 @@ org.opencb.opencga opencga - 2.8.4-SNAPSHOT + 2.8.4 ../pom.xml diff --git a/opencga-test/pom.xml b/opencga-test/pom.xml index f9f2250601e..8420b1bfd5a 100644 --- a/opencga-test/pom.xml +++ b/opencga-test/pom.xml @@ -24,7 +24,7 @@ org.opencb.opencga opencga - 2.8.4-SNAPSHOT + 2.8.4 ../pom.xml diff --git a/pom.xml b/pom.xml index 8403754f3b5..9da8d0e486f 100644 --- a/pom.xml +++ b/pom.xml @@ -22,7 +22,7 @@ org.opencb.opencga opencga - 2.8.4-SNAPSHOT + 2.8.4 pom OpenCGA OenCGA projects implements a big data platform for genomic data analysis @@ -42,12 +42,12 @@ - 2.8.4_dev - 2.8.4_dev - 5.4.1-SNAPSHOT - 2.8.1-SNAPSHOT - 4.8.1-SNAPSHOT - 2.8.4-SNAPSHOT + 2.8.4 + 2.8.4 + 5.4.1 + 2.8.0 + 4.8.0 + 2.8.4 0.2.0 From 9450f6ab45f89ba486952b074851813b8cb5cf34 Mon Sep 17 00:00:00 2001 From: JuanfeSanahuja Date: Fri, 20 Oct 2023 16:45:33 +0200 Subject: [PATCH 50/50] portpatch: Updated version to merge develop #TASK-5120 --- opencga-analysis/pom.xml | 2 +- opencga-app/pom.xml | 2 +- opencga-catalog/pom.xml | 2 +- opencga-client/pom.xml | 2 +- opencga-clinical/pom.xml | 2 +- opencga-core/pom.xml | 2 +- opencga-master/pom.xml | 2 +- opencga-server/pom.xml | 2 +- opencga-storage/opencga-storage-app/pom.xml | 2 +- opencga-storage/opencga-storage-benchmark/pom.xml | 2 +- opencga-storage/opencga-storage-core/pom.xml | 2 +- .../opencga-storage-hadoop/opencga-storage-hadoop-core/pom.xml | 2 +- .../opencga-storage-hadoop-deps-emr6.1/pom.xml | 2 +- .../opencga-storage-hadoop-deps-hdp2.6/pom.xml | 2 +- .../opencga-storage-hadoop-deps-hdp3.1/pom.xml | 2 +- .../opencga-storage-hadoop/opencga-storage-hadoop-deps/pom.xml | 2 +- opencga-storage/opencga-storage-hadoop/pom.xml | 2 +- opencga-storage/opencga-storage-server/pom.xml | 2 +- opencga-storage/pom.xml | 2 +- opencga-test/pom.xml | 2 +- pom.xml | 2 +- 21 files changed, 21 insertions(+), 21 deletions(-) diff --git a/opencga-analysis/pom.xml b/opencga-analysis/pom.xml index 5def9cd5e2e..69f3bd0df08 100644 --- a/opencga-analysis/pom.xml +++ b/opencga-analysis/pom.xml @@ -22,7 +22,7 @@ org.opencb.opencga opencga - 2.8.4 + 2.12.0-SNAPSHOT ../pom.xml diff --git a/opencga-app/pom.xml b/opencga-app/pom.xml index 9b7c4f29edd..fe7211f3a68 100644 --- a/opencga-app/pom.xml +++ b/opencga-app/pom.xml @@ -22,7 +22,7 @@ org.opencb.opencga opencga - 2.8.4 + 2.12.0-SNAPSHOT ../pom.xml diff --git a/opencga-catalog/pom.xml b/opencga-catalog/pom.xml index 960d84a610a..f44b772294c 100644 --- a/opencga-catalog/pom.xml +++ b/opencga-catalog/pom.xml @@ -23,7 +23,7 @@ org.opencb.opencga opencga - 2.8.4 + 2.12.0-SNAPSHOT ../pom.xml diff --git a/opencga-client/pom.xml b/opencga-client/pom.xml index b8c097d777e..c3d5e42f079 100644 --- a/opencga-client/pom.xml +++ b/opencga-client/pom.xml @@ -22,7 +22,7 @@ org.opencb.opencga opencga - 2.8.4 + 2.12.0-SNAPSHOT ../pom.xml diff --git a/opencga-clinical/pom.xml b/opencga-clinical/pom.xml index e281f5d48a0..11653f27526 100644 --- a/opencga-clinical/pom.xml +++ b/opencga-clinical/pom.xml @@ -5,7 +5,7 @@ org.opencb.opencga opencga - 2.8.4 + 2.12.0-SNAPSHOT ../pom.xml 4.0.0 diff --git a/opencga-core/pom.xml b/opencga-core/pom.xml index 1fcf341a09f..169c804bd9f 100644 --- a/opencga-core/pom.xml +++ b/opencga-core/pom.xml @@ -22,7 +22,7 @@ org.opencb.opencga opencga - 2.8.4 + 2.12.0-SNAPSHOT ../pom.xml diff --git a/opencga-master/pom.xml b/opencga-master/pom.xml index 468fb7a5683..d12a8eb58d6 100644 --- a/opencga-master/pom.xml +++ b/opencga-master/pom.xml @@ -22,7 +22,7 @@ opencga org.opencb.opencga - 2.8.4 + 2.12.0-SNAPSHOT ../pom.xml diff --git a/opencga-server/pom.xml b/opencga-server/pom.xml index 43949773d01..4d4280c8895 100644 --- a/opencga-server/pom.xml +++ b/opencga-server/pom.xml @@ -22,7 +22,7 @@ org.opencb.opencga opencga - 2.8.4 + 2.12.0-SNAPSHOT ../pom.xml diff --git a/opencga-storage/opencga-storage-app/pom.xml b/opencga-storage/opencga-storage-app/pom.xml index 8008b10a31f..e0d6b60b973 100644 --- a/opencga-storage/opencga-storage-app/pom.xml +++ b/opencga-storage/opencga-storage-app/pom.xml @@ -22,7 +22,7 @@ org.opencb.opencga opencga-storage - 2.8.4 + 2.12.0-SNAPSHOT ../pom.xml diff --git a/opencga-storage/opencga-storage-benchmark/pom.xml b/opencga-storage/opencga-storage-benchmark/pom.xml index 9caad37be25..d2b371a6c79 100644 --- a/opencga-storage/opencga-storage-benchmark/pom.xml +++ b/opencga-storage/opencga-storage-benchmark/pom.xml @@ -22,7 +22,7 @@ opencga-storage org.opencb.opencga - 2.8.4 + 2.12.0-SNAPSHOT ../pom.xml diff --git a/opencga-storage/opencga-storage-core/pom.xml b/opencga-storage/opencga-storage-core/pom.xml index 2c743523aeb..3ba6bfd88e0 100644 --- a/opencga-storage/opencga-storage-core/pom.xml +++ b/opencga-storage/opencga-storage-core/pom.xml @@ -25,7 +25,7 @@ org.opencb.opencga opencga-storage - 2.8.4 + 2.12.0-SNAPSHOT ../pom.xml diff --git a/opencga-storage/opencga-storage-hadoop/opencga-storage-hadoop-core/pom.xml b/opencga-storage/opencga-storage-hadoop/opencga-storage-hadoop-core/pom.xml index 39737e3e7be..e04af6512de 100644 --- a/opencga-storage/opencga-storage-hadoop/opencga-storage-hadoop-core/pom.xml +++ b/opencga-storage/opencga-storage-hadoop/opencga-storage-hadoop-core/pom.xml @@ -23,7 +23,7 @@ org.opencb.opencga opencga-storage-hadoop - 2.8.4 + 2.12.0-SNAPSHOT ../pom.xml diff --git a/opencga-storage/opencga-storage-hadoop/opencga-storage-hadoop-deps/opencga-storage-hadoop-deps-emr6.1/pom.xml b/opencga-storage/opencga-storage-hadoop/opencga-storage-hadoop-deps/opencga-storage-hadoop-deps-emr6.1/pom.xml index 55512378967..76ffc1e9ce3 100644 --- a/opencga-storage/opencga-storage-hadoop/opencga-storage-hadoop-deps/opencga-storage-hadoop-deps-emr6.1/pom.xml +++ b/opencga-storage/opencga-storage-hadoop/opencga-storage-hadoop-deps/opencga-storage-hadoop-deps-emr6.1/pom.xml @@ -22,7 +22,7 @@ org.opencb.opencga opencga-storage-hadoop-deps - 2.8.4 + 2.12.0-SNAPSHOT ../pom.xml diff --git a/opencga-storage/opencga-storage-hadoop/opencga-storage-hadoop-deps/opencga-storage-hadoop-deps-hdp2.6/pom.xml b/opencga-storage/opencga-storage-hadoop/opencga-storage-hadoop-deps/opencga-storage-hadoop-deps-hdp2.6/pom.xml index 109b9c41cda..09519b23291 100644 --- a/opencga-storage/opencga-storage-hadoop/opencga-storage-hadoop-deps/opencga-storage-hadoop-deps-hdp2.6/pom.xml +++ b/opencga-storage/opencga-storage-hadoop/opencga-storage-hadoop-deps/opencga-storage-hadoop-deps-hdp2.6/pom.xml @@ -22,7 +22,7 @@ org.opencb.opencga opencga-storage-hadoop-deps - 2.8.4 + 2.12.0-SNAPSHOT ../pom.xml diff --git a/opencga-storage/opencga-storage-hadoop/opencga-storage-hadoop-deps/opencga-storage-hadoop-deps-hdp3.1/pom.xml b/opencga-storage/opencga-storage-hadoop/opencga-storage-hadoop-deps/opencga-storage-hadoop-deps-hdp3.1/pom.xml index a662fff2a4a..8d284fb1f33 100644 --- a/opencga-storage/opencga-storage-hadoop/opencga-storage-hadoop-deps/opencga-storage-hadoop-deps-hdp3.1/pom.xml +++ b/opencga-storage/opencga-storage-hadoop/opencga-storage-hadoop-deps/opencga-storage-hadoop-deps-hdp3.1/pom.xml @@ -22,7 +22,7 @@ org.opencb.opencga opencga-storage-hadoop-deps - 2.8.4 + 2.12.0-SNAPSHOT ../pom.xml diff --git a/opencga-storage/opencga-storage-hadoop/opencga-storage-hadoop-deps/pom.xml b/opencga-storage/opencga-storage-hadoop/opencga-storage-hadoop-deps/pom.xml index d392b220a7b..132c0f14681 100644 --- a/opencga-storage/opencga-storage-hadoop/opencga-storage-hadoop-deps/pom.xml +++ b/opencga-storage/opencga-storage-hadoop/opencga-storage-hadoop-deps/pom.xml @@ -50,7 +50,7 @@ org.opencb.opencga opencga-storage-hadoop - 2.8.4 + 2.12.0-SNAPSHOT ../pom.xml diff --git a/opencga-storage/opencga-storage-hadoop/pom.xml b/opencga-storage/opencga-storage-hadoop/pom.xml index 7b57b777111..05620a5144b 100644 --- a/opencga-storage/opencga-storage-hadoop/pom.xml +++ b/opencga-storage/opencga-storage-hadoop/pom.xml @@ -28,7 +28,7 @@ org.opencb.opencga opencga-storage - 2.8.4 + 2.12.0-SNAPSHOT ../pom.xml diff --git a/opencga-storage/opencga-storage-server/pom.xml b/opencga-storage/opencga-storage-server/pom.xml index b6e04e741d1..0d55a15b610 100644 --- a/opencga-storage/opencga-storage-server/pom.xml +++ b/opencga-storage/opencga-storage-server/pom.xml @@ -22,7 +22,7 @@ org.opencb.opencga opencga-storage - 2.8.4 + 2.12.0-SNAPSHOT ../pom.xml diff --git a/opencga-storage/pom.xml b/opencga-storage/pom.xml index bc38910593d..697f00a8e51 100644 --- a/opencga-storage/pom.xml +++ b/opencga-storage/pom.xml @@ -22,7 +22,7 @@ org.opencb.opencga opencga - 2.8.4 + 2.12.0-SNAPSHOT ../pom.xml diff --git a/opencga-test/pom.xml b/opencga-test/pom.xml index 8420b1bfd5a..a1797410a10 100644 --- a/opencga-test/pom.xml +++ b/opencga-test/pom.xml @@ -24,7 +24,7 @@ org.opencb.opencga opencga - 2.8.4 + 2.12.0-SNAPSHOT ../pom.xml diff --git a/pom.xml b/pom.xml index 9da8d0e486f..65d3c35fc7e 100644 --- a/pom.xml +++ b/pom.xml @@ -22,7 +22,7 @@ org.opencb.opencga opencga - 2.8.4 + 2.12.0-SNAPSHOT pom OpenCGA OenCGA projects implements a big data platform for genomic data analysis