@@ -34,8 +34,7 @@ public void jsonInputs() throws IOException {
3434 createJsonInputs (inputJson , annotationSource , "blah" , false , 3 , 4 , true );
3535
3636 AnnotationInputs ais = AnnotateUtils .getInputs (inputJson .getAbsolutePath ());
37- assertTrue (ais != null );
38- assert ais != null ;
37+ assertNotNull (ais );
3938 assertEquals (1 , ais .getInputs ().size ());
4039
4140 List <AnnotationSource > sources = new ArrayList <>();
@@ -57,7 +56,7 @@ public void jsonInputsTSVMissingHeader() throws IOException {
5756 AnnotateUtils .populateAnnotationSources (ais , new ArrayList <>());
5857 Assert .fail ();
5958 } catch (IllegalArgumentException iae ) {
60- assertEquals ( true , iae .getMessage ().contains ("No headers for AnnotationSourceTSV!" ));
59+ assertTrue ( iae .getMessage ().contains ("No headers for AnnotationSourceTSV!" ));
6160 }
6261
6362 /*
@@ -68,7 +67,7 @@ public void jsonInputsTSVMissingHeader() throws IOException {
6867 AnnotateUtils .populateAnnotationSources (ais , new ArrayList <>());
6968 Assert .fail ();
7069 } catch (IllegalArgumentException iae ) {
71- assertEquals ( true , iae .getMessage ().contains ("No headers for AnnotationSourceTSV!" ));
70+ assertTrue ( iae .getMessage ().contains ("No headers for AnnotationSourceTSV!" ));
7271 }
7372
7473 /*
@@ -79,7 +78,7 @@ public void jsonInputsTSVMissingHeader() throws IOException {
7978 AnnotateUtils .populateAnnotationSources (ais , new ArrayList <>());
8079 Assert .fail ();
8180 } catch (IllegalArgumentException iae ) {
82- assertEquals ( true , iae .getMessage ().contains ("Could not find requested fields (blah) in header" ));
81+ assertTrue ( iae .getMessage ().contains ("Could not find requested fields (blah) in header" ));
8382 }
8483 }
8584
@@ -169,8 +168,8 @@ public void endToEnd() throws IOException {
169168 * check output file
170169 */
171170 List <String > lines = Files .readAllLines (Paths .get (outputFile .getAbsolutePath ()));
172- assertEquals ( true , lines .contains ("chr1 655650 A C C 0/1 17,15 M " ));
173- assertEquals ( true , lines .contains ("chr1 655652 A T T 1/1 0,46 M " ));
171+ assertTrue ( lines .contains ("chr1 655650 A C C 0/1 17,15 M " ));
172+ assertTrue ( lines .contains ("chr1 655652 A T T 1/1 0,46 M " ));
174173
175174 }
176175
@@ -211,7 +210,7 @@ public void endToEndSnpEff() throws IOException {
211210 assertEquals ("chr1\t 889689\t G\t A\t A,C\t 1/2\t 22,4,18\t OR4F16-SAMD11\t ENSG00000284662.2-ENSG00000187634.13\t intergenic_region\t intergenic_region\t \t \t \t MODIFIER\t n.889689G>A\t \t \t \t \t \" GENE\" +(\" 889689G>A\" |\" 889689G->A\" |\" 889689G-->A\" |\" 889689G/A\" )" , lines .get (lines .size () - 4 ));
212211 assertEquals ("chr1\t 889689\t G\t C\t A,C\t 1/2\t 22,4,18\t OR4F16-SAMD11\t ENSG00000284662.2-ENSG00000187634.13\t intergenic_region\t intergenic_region\t \t \t \t MODIFIER\t n.889689G>C\t \t \t \t \t \" GENE\" +(\" 889689G>C\" |\" 889689G->C\" |\" 889689G-->C\" |\" 889689G/C\" )" , lines .get (lines .size () - 3 ));
213212 assertEquals ("chr1\t 1130186\t CAAAAAA\t C\t C,CAAAAAAAAAAAAAA\t 1/2\t 0,3,2\t C1orf159-TTLL10\t ENSG00000131591.18-ENSG00000162571.14\t intergenic_region\t intergenic_region\t \t \t \t MODIFIER\t n.1130187_1130192delAAAAAA\t \t \t \t \t " , lines .get (lines .size () - 2 ));
214- assertEquals ("chr1\t 1130186\t CAAAAAA\t CAAAAAAAAAAAAAA\t C,CAAAAAAAAAAAAAA\t 1/2\t 0,3,2\t C1orf159-TTLL10\t ENSG00000131591.18-ENSG00000162571.14\t intergenic_region\t intergenic_region\t \t \t \t MODIFIER\t n.1130192_1130193insAAAAAAAA\t \t \t \t \t " , lines .get ( lines . size () - 1 ));
213+ assertEquals ("chr1\t 1130186\t CAAAAAA\t CAAAAAAAAAAAAAA\t C,CAAAAAAAAAAAAAA\t 1/2\t 0,3,2\t C1orf159-TTLL10\t ENSG00000131591.18-ENSG00000162571.14\t intergenic_region\t intergenic_region\t \t \t \t MODIFIER\t n.1130192_1130193insAAAAAAAA\t \t \t \t \t " , lines .getLast ( ));
215214 }
216215
217216 private int executeTest (File inputVcf , File inputJson , File outputFile , File log ) throws IOException {
@@ -253,7 +252,7 @@ public static void createJsonInputs(File jsonFile, File annotationFile, String a
253252"}"
254253 );
255254
256- try (BufferedWriter out = new BufferedWriter (new FileWriter (jsonFile )); ) {
255+ try (BufferedWriter out = new BufferedWriter (new FileWriter (jsonFile ))) {
257256 for (String line : data ) {
258257 out .write (line + "\n " );
259258 }
@@ -297,13 +296,13 @@ public void loadJSONInputs() throws IOException {
297296"}"
298297 );
299298
300- try (BufferedWriter out = new BufferedWriter (new FileWriter (inputJson )); ) {
299+ try (BufferedWriter out = new BufferedWriter (new FileWriter (inputJson ))) {
301300 for (String line : data ) {
302301 out .write (line + "\n " );
303302 }
304303 }
305304 AnnotationInputs ais = AnnotateUtils .getInputs (inputJson .getAbsolutePath ());
306- assertEquals ( true , ais .isIncludeSearchTerm ());
305+ assertTrue ( ais .isIncludeSearchTerm ());
307306 assertEquals ("test1,test2,test3" , ais .getAdditionalEmptyFields ());
308307 assertEquals (3 , ais .getAnnotationSourceThreadCount ());
309308 assertEquals ("field_1,field_2,field_3" , ais .getOutputFieldOrder ());
@@ -324,7 +323,7 @@ static void createVcf(File f, List<String> records) throws IOException {
324323// "chr1 60781981 rs5015226 T G . . FLANK=ACCAAGTGCCT;DP=53;FS=0.000;MQ=60.00;QD=31.16;SOR=0.730;IN=1,2;DB;HOM=0,CGAAAACCAAgTGCCTGCATT;EFF=intergenic_region(MODIFIER||||||||||1) GT:AD:CCC:CCM:DP:EOR:FF:FT:GQ:INF:NNS:OABS:QL 1/1:0,46:Germline:34:47:G0[]1[]:G5;T1:PASS:.:.:42:C0[0]1[12];G23[40.04]23[36.83]:. 1/1:0,57:Germline:34:57:G2[]0[]:G3:PASS:.:.:51:G24[39]33[39.18]:. 1/1:0,53:Germline:34:53:.:.:PASS:99:.:.:.:2418.77 1/1:0,60:Germline:34:60:.:.:PASS:99:.:.:.:2749.77"
325324 );
326325
327- try (BufferedWriter out = new BufferedWriter (new FileWriter (f )); ) {
326+ try (BufferedWriter out = new BufferedWriter (new FileWriter (f ))) {
328327 for (String line : data ) {
329328 out .write (line + "\n " );
330329 }
@@ -343,7 +342,7 @@ static void createSnpEFfAnnotationFile(File f, boolean addHeader) throws IOExcep
343342 "chr1 889689 . G A,C 679.1 PASS AC=1,1;AF=0.500,0.500;AN=2;BaseQRankSum=-2.586e+00;DP=63;ExcessHet=0.0000;FS=2.623;MLEAC=1,1;MLEAF=0.500,0.500;MQ=52.67;MQRankSum=-1.696e+00;QD=15.43;ReadPosRankSum=-9.520e-01;SOR=0.984;ANN=A|intergenic_region|MODIFIER|OR4F16-SAMD11|ENSG00000284662.2-ENSG00000187634.13|intergenic_region|ENSG00000284662.2-ENSG00000187634.13|||n.889689G>A||||||,C|intergenic_region|MODIFIER|OR4F16-SAMD11|ENSG00000284662.2-ENSG00000187634.13|intergenic_region|ENSG00000284662.2-ENSG00000187634.13|||n.889689G>C|||||| GT:AD:DP:GQ:PL 1/2:22,4,18:44:99:696,580,775,165,0,111" .replaceAll ("\\ s+" , "\t " ),
344343 "chr1 1130186 . CAAAAAA C,CAAAAAAAAAAAAAA 125.02 HardFiltered AC=1,1;AF=0.500,0.500;AN=2;DP=17;ExcessHet=0.0000;FS=0.000;MLEAC=1,1;MLEAF=0.500,0.500;MQ=59.72;QD=25.00;SOR=3.611;ANN=C|intergenic_region|MODIFIER|C1orf159-TTLL10|ENSG00000131591.18-ENSG00000162571.14|intergenic_region|ENSG00000131591.18-ENSG00000162571.14|||n.1130187_1130192delAAAAAA||||||,CAAAAAAAAAAAAAA|intergenic_region|MODIFIER|C1orf159-TTLL10|ENSG00000131591.18-ENSG00000162571.14|intergenic_region|ENSG00000131591.18-ENSG00000162571.14|||n.1130192_1130193insAAAAAAAA|||||| GT:AD:DP:GQ:PL 1/2:0,3,2:5:67:142,74,232,72,0,67" .replaceAll ("\\ s+" , "\t " ));
345344
346- try (BufferedWriter out = new BufferedWriter (new FileWriter (f )); ) {
345+ try (BufferedWriter out = new BufferedWriter (new FileWriter (f ))) {
347346 if (addHeader ) {
348347 out .write (header + "\n " );
349348 }
@@ -368,7 +367,7 @@ static void createAnnotationFile(File f, boolean addHeader) throws IOException {
368367 "1 655652 A T M L . 1 65565 1 55428 1 OR4F56 ENSG00000186092 ENST00000641515 ENSP00000493376 A0A2U3U0J3 A0A2U3U0J3_HUMAN . . . . c.1A>C p.Met1?"
369368 );
370369
371- try (BufferedWriter out = new BufferedWriter (new FileWriter (f )); ) {
370+ try (BufferedWriter out = new BufferedWriter (new FileWriter (f ))) {
372371 if (addHeader ) {
373372 out .write (header + "\n " );
374373 }
@@ -415,7 +414,7 @@ static void createAnnotationFileIncorrectOrder(File f) throws IOException {
415414 "6 655652 A G M L . 1 65565 1 55428 1 OR4F5 ENSG00000186092 ENST00000641515 ENSP00000493376 A0A2U3U0J3 A0A2U3U0J3_HUMAN . . . . c.1A>C p.Met1?"
416415 );
417416
418- try (BufferedWriter out = new BufferedWriter (new FileWriter (f )); ) {
417+ try (BufferedWriter out = new BufferedWriter (new FileWriter (f ))) {
419418 out .write (header + "\n " );
420419 for (String line : data ) {
421420 out .write (line + "\n " );
0 commit comments