X-Git-Url: http://source.jalview.org/gitweb/?a=blobdiff_plain;f=test%2Fjalview%2Fio%2FFeaturesFileTest.java;h=d6f1e8b32eaed527c2ab0dae70b245edc37877fb;hb=09d9063e70931a6cb75d16b230f5cd0665f0f340;hp=79b819efd1520d98a625bd241a2525a1017bb437;hpb=5f4e1e4c330b045e9c8bce28ee132a0fca3834d8;p=jalview.git diff --git a/test/jalview/io/FeaturesFileTest.java b/test/jalview/io/FeaturesFileTest.java index 79b819e..d6f1e8b 100644 --- a/test/jalview/io/FeaturesFileTest.java +++ b/test/jalview/io/FeaturesFileTest.java @@ -65,7 +65,7 @@ public class FeaturesFileTest Map colours = af.getFeatureRenderer() .getFeatureColours(); FeaturesFile featuresFile = new FeaturesFile( - "examples/exampleFeatures.txt", FormatAdapter.FILE); + "examples/exampleFeatures.txt", DataSourceType.FILE); assertTrue("Test " + "Features file test" + "\nFailed to parse features file.", featuresFile.parse(al.getDataset(), colours, true)); @@ -167,7 +167,7 @@ public class FeaturesFileTest + "FER_CAPAA\tuniprot\tMETAL\t44\t45\t4.0\t.\t.\tNote Iron-sulfur; Note 2Fe-2S\n" + "FER1_SOLLC\tuniprot\tPfam\t55\t130\t2.0\t.\t."; FeaturesFile featuresFile = new FeaturesFile(gffData, - FormatAdapter.PASTE); + DataSourceType.PASTE); assertTrue("Failed to parse features file", featuresFile.parse(al.getDataset(), colours, true)); @@ -206,8 +206,8 @@ public class FeaturesFileTest String ff = f.getPath(); FormatAdapter rf = new FormatAdapter(); - AlignmentI al = rf.readFile(ff, FormatAdapter.FILE, - new IdentifyFile().identify(ff, FormatAdapter.FILE)); + AlignmentI al = rf.readFile(ff, DataSourceType.FILE, + new IdentifyFile().identify(ff, DataSourceType.FILE)); al.setDataset(null); // creates dataset sequences assertNotNull("Couldn't read supplied alignment data.", al); @@ -233,7 +233,7 @@ public class FeaturesFileTest + "Note=Iron-sulfur (2Fe-2S);Note=another note;evidence=ECO:0000255|PROSITE-ProRule:PRU00465\n" + "FER1_SOLLC\tuniprot\tPfam\t55\t130\t3.0\t.\t.\tID=$23"; FeaturesFile featuresFile = new FeaturesFile(gffData, - FormatAdapter.PASTE); + DataSourceType.PASTE); assertTrue("Failed to parse features file", featuresFile.parse(al.getDataset(), colours, true)); @@ -286,7 +286,7 @@ public class FeaturesFileTest String featureData = "Iron-sulfur (2Fe-2S)\tFER_CAPAA\t-1\t39\t39\tMETAL\n" + "Iron-phosphorus (2Fe-P)\tID_NOT_SPECIFIED\t2\t86\t87\tMETALLIC\n"; FeaturesFile featuresFile = new FeaturesFile(featureData, - FormatAdapter.PASTE); + DataSourceType.PASTE); assertTrue("Failed to parse features file", featuresFile.parse(al.getDataset(), colours, true)); @@ -352,7 +352,7 @@ public class FeaturesFileTest public void readGff3File() throws IOException { FeaturesFile gffreader = new FeaturesFile(true, simpleGffFile, - FormatAdapter.FILE); + DataSourceType.FILE); Alignment dataset = new Alignment(gffreader.getSeqsAsArray()); gffreader.addProperties(dataset); checkDatasetfromSimpleGff3(dataset); @@ -362,8 +362,9 @@ public class FeaturesFileTest public void simpleGff3FileClass() throws IOException { AlignmentI dataset = new Alignment(new SequenceI[] {}); - FeaturesFile ffile = new FeaturesFile(simpleGffFile, FormatAdapter.FILE); - + FeaturesFile ffile = new FeaturesFile(simpleGffFile, + DataSourceType.FILE); + boolean parseResult = ffile.parse(dataset, null, false, false); assertTrue("return result should be true", parseResult); checkDatasetfromSimpleGff3(dataset); @@ -373,7 +374,7 @@ public class FeaturesFileTest public void simpleGff3FileLoader() throws IOException { AlignFrame af = new FileLoader(false).LoadFileWaitTillLoaded( - simpleGffFile, FormatAdapter.FILE); + simpleGffFile, DataSourceType.FILE); assertTrue( "Didn't read the alignment into an alignframe from Gff3 File", af != null); @@ -384,8 +385,9 @@ public class FeaturesFileTest public void simpleGff3RelaxedIdMatching() throws IOException { AlignmentI dataset = new Alignment(new SequenceI[] {}); - FeaturesFile ffile = new FeaturesFile(simpleGffFile, FormatAdapter.FILE); - + FeaturesFile ffile = new FeaturesFile(simpleGffFile, + DataSourceType.FILE); + boolean parseResult = ffile.parse(dataset, null, false, true); assertTrue("return result (relaxedID matching) should be true", parseResult); @@ -409,7 +411,7 @@ public class FeaturesFileTest + "Pfam domainPfam_3_4\tFER_CAPAA\t-1\t20\t20\tPfam\n" + "ENDGROUP\tuniprot\n"; FeaturesFile featuresFile = new FeaturesFile(features, - FormatAdapter.PASTE); + DataSourceType.PASTE); featuresFile.parse(al.getDataset(), colours, false); /*