From 209a6cd84f96d236e457c7d6bb1f5117080679d6 Mon Sep 17 00:00:00 2001 From: Mark Smith Date: Thu, 21 Sep 2017 15:30:51 -0500 Subject: [PATCH] Fix casing of test filenames. --- Tests/Bio.Padena.Tests/PadenaBvtTestCases.cs | 4 ++-- Tests/Bio.Padena.Tests/PadenaP1TestCases.cs | 2 +- .../HierarchicalClusteringSerialTests.cs | 2 +- Tests/Bio.Pamsam.Tests/MsaBenchMarkTests.cs | 6 +++--- .../PAMSAMMultipleSequenceAlignmentTests.cs | 4 ++-- Tests/Bio.Tests/IO/Bed/BEDOperationsTests.cs | 20 +++++++++++-------- Tests/Bio.Tests/IO/FastQ/FastQTests.cs | 12 +++++------ Tests/TestData/TestUtils/GffTestsConfig.xml | 6 +++--- 8 files changed, 30 insertions(+), 26 deletions(-) diff --git a/Tests/Bio.Padena.Tests/PadenaBvtTestCases.cs b/Tests/Bio.Padena.Tests/PadenaBvtTestCases.cs index be28e3b..357e7b1 100644 --- a/Tests/Bio.Padena.Tests/PadenaBvtTestCases.cs +++ b/Tests/Bio.Padena.Tests/PadenaBvtTestCases.cs @@ -33,7 +33,7 @@ namespace Bio.Padena.Tests { #region Global Variables - Utility utilityObj = new Utility(@"TestUtils\PadenaTestData\PadenaTestsConfig.xml"); + Utility utilityObj = new Utility(@"TestUtils\PaDeNATestData\PadenaTestsConfig.xml"); #endregion Global Variables @@ -872,7 +872,7 @@ namespace Bio.Padena.Tests { #region Global Variables - Utility utilityObj = new Utility(@"TestUtils\PadenaTestData\PadenaTestsConfig.xml"); + Utility utilityObj = new Utility(@"TestUtils\PaDeNATestData\PadenaTestsConfig.xml"); #endregion Global Variables diff --git a/Tests/Bio.Padena.Tests/PadenaP1TestCases.cs b/Tests/Bio.Padena.Tests/PadenaP1TestCases.cs index 775f350..bac30c7 100644 --- a/Tests/Bio.Padena.Tests/PadenaP1TestCases.cs +++ b/Tests/Bio.Padena.Tests/PadenaP1TestCases.cs @@ -1404,7 +1404,7 @@ namespace Bio.Padena.Tests { #region Global Variables - readonly Utility utilityObj = new Utility(@"TestUtils\PadenaTestData\PadenaTestsConfig.xml"); + readonly Utility utilityObj = new Utility(@"TestUtils\PaDeNATestData\PadenaTestsConfig.xml"); #endregion Global Variables diff --git a/Tests/Bio.Pamsam.Tests/HierarchicalClusteringSerialTests.cs b/Tests/Bio.Pamsam.Tests/HierarchicalClusteringSerialTests.cs index f892df6..7d6d118 100644 --- a/Tests/Bio.Pamsam.Tests/HierarchicalClusteringSerialTests.cs +++ b/Tests/Bio.Pamsam.Tests/HierarchicalClusteringSerialTests.cs @@ -105,7 +105,7 @@ namespace Bio.Pamsam.Tests //Assert.AreEqual(5, hierarchicalClustering.Nodes[6].RightChildren.ID); // Test on larger dataset - string filepath = @"TestUtils\FASTA\RV11_BBS_all.afa".TestDir(); + string filepath = @"TestUtils\Fasta\RV11_BBS_all.afa".TestDir(); FastAParser parser = new FastAParser(); IList orgSequences = parser.Parse(filepath).ToList(); diff --git a/Tests/Bio.Pamsam.Tests/MsaBenchMarkTests.cs b/Tests/Bio.Pamsam.Tests/MsaBenchMarkTests.cs index 58c27c5..e9192ae 100644 --- a/Tests/Bio.Pamsam.Tests/MsaBenchMarkTests.cs +++ b/Tests/Bio.Pamsam.Tests/MsaBenchMarkTests.cs @@ -24,7 +24,7 @@ namespace Bio.Pamsam.Tests [Test] public void TestMsaBenchMark() { - string fileDirectory = @"TestUtils\FASTA\Protein\Balibase\RV911\".TestDir(); + string fileDirectory = @"TestUtils\Fasta\Protein\Balibase\RV911\".TestDir(); DirectoryInfo iD = new DirectoryInfo(fileDirectory); PAMSAMMultipleSequenceAligner.FasterVersion = false; @@ -215,7 +215,7 @@ namespace Bio.Pamsam.Tests List allQ = new List(); List allTC = new List(); - string fileDirectory = @"TestUtils\FASTA\Protein\SABmark".TestDir(); + string fileDirectory = @"TestUtils\Fasta\Protein\SABmark".TestDir(); DirectoryInfo iD = new DirectoryInfo(fileDirectory); PAMSAMMultipleSequenceAligner.FasterVersion = false; @@ -298,7 +298,7 @@ namespace Bio.Pamsam.Tests var allQ = new List(); var allTC = new List(); - string fileDirectory = @"TestUtils\FASTA\RNA\k10".TestDir(); + string fileDirectory = @"TestUtils\Fasta\RNA\k10".TestDir(); DirectoryInfo iD = new DirectoryInfo(fileDirectory); PAMSAMMultipleSequenceAligner.FasterVersion = false; diff --git a/Tests/Bio.Pamsam.Tests/PAMSAMMultipleSequenceAlignmentTests.cs b/Tests/Bio.Pamsam.Tests/PAMSAMMultipleSequenceAlignmentTests.cs index caf98f4..2a4d5ee 100644 --- a/Tests/Bio.Pamsam.Tests/PAMSAMMultipleSequenceAlignmentTests.cs +++ b/Tests/Bio.Pamsam.Tests/PAMSAMMultipleSequenceAlignmentTests.cs @@ -150,7 +150,7 @@ namespace Bio.Pamsam.Tests [Test] public void TestMuscleMultipleSequenceAlignmentRunningTime() { - string filepath = @"TestUtils\FASTA\RunningTime\BOX246.xml.afa".TestDir(); + string filepath = @"TestUtils\Fasta\RunningTime\BOX246.xml.afa".TestDir(); // Test on DNA benchmark dataset FastAParser parser = new FastAParser(); @@ -159,7 +159,7 @@ namespace Bio.Pamsam.Tests List sequences = MsaUtils.UnAlign(orgSequences); - //filepath = @"TestUtils\FASTA\RunningTime\12_raw.afa"; + //filepath = @"TestUtils\Fasta\RunningTime\12_raw.afa"; //List sequences = parser.Parse(filepath); int numberOfSequences = orgSequences.Count; diff --git a/Tests/Bio.Tests/IO/Bed/BEDOperationsTests.cs b/Tests/Bio.Tests/IO/Bed/BEDOperationsTests.cs index d4aa2e3..e0f2672 100644 --- a/Tests/Bio.Tests/IO/Bed/BEDOperationsTests.cs +++ b/Tests/Bio.Tests/IO/Bed/BEDOperationsTests.cs @@ -305,7 +305,8 @@ namespace Bio.Tests.IO.Bed SequenceRangeGrouping refSeqRange = parser.ParseRangeGrouping(refSeqRangefile); SequenceRangeGrouping querySeqRange = parser.ParseRangeGrouping(querySeqRangefile); - string expectedresultpath = System.IO.Path.Combine (direc, "Result_Subtract_minoverlap1.BED").TestDir(); + const string MinOverlap1 = "Result_Subtract_minoverlap1.bed"; + string expectedresultpath = System.IO.Path.Combine (direc, MinOverlap1).TestDir(); result = refSeqRange.Subtract(querySeqRange, 1, SubtractOutputType.IntervalsWithNoOverlap); formatter.Format(result, resultfilepath); resultvalue = CompareBEDOutput(resultfilepath, expectedresultpath); @@ -313,7 +314,8 @@ namespace Bio.Tests.IO.Bed resultvalue = ValidateParentSeqRange(result, refSeqRange, querySeqRange, true); Assert.IsTrue(resultvalue); - expectedresultpath = System.IO.Path.Combine (direc, "Result_Subtract_minoverlap0.BED").TestDir(); + const string MinOverlap0 = "Result_subtract_minoverlap0.bed"; + expectedresultpath = System.IO.Path.Combine (direc, MinOverlap0).TestDir(); result = refSeqRange.Subtract(querySeqRange, 0, SubtractOutputType.IntervalsWithNoOverlap); formatter.Format(result, resultfilepath); resultvalue = CompareBEDOutput(resultfilepath, expectedresultpath); @@ -321,7 +323,7 @@ namespace Bio.Tests.IO.Bed resultvalue = ValidateParentSeqRange(result, refSeqRange, querySeqRange, true); Assert.IsTrue(resultvalue); - expectedresultpath = System.IO.Path.Combine (direc, "Result_Subtract_minoverlap1.BED").TestDir(); + expectedresultpath = System.IO.Path.Combine (direc, MinOverlap1).TestDir(); result = refSeqRange.Subtract(querySeqRange, 1, SubtractOutputType.IntervalsWithNoOverlap, true); formatter.Format(result, resultfilepath); resultvalue = CompareBEDOutput(resultfilepath, expectedresultpath); @@ -329,7 +331,7 @@ namespace Bio.Tests.IO.Bed resultvalue = ValidateParentSeqRange(result, refSeqRange, querySeqRange, true); Assert.IsTrue(resultvalue); - expectedresultpath = System.IO.Path.Combine (direc, "Result_Subtract_minoverlap0.BED").TestDir(); + expectedresultpath = System.IO.Path.Combine (direc, MinOverlap0).TestDir(); result = refSeqRange.Subtract(querySeqRange, 0, SubtractOutputType.IntervalsWithNoOverlap, true); formatter.Format(result, resultfilepath); resultvalue = CompareBEDOutput(resultfilepath, expectedresultpath); @@ -338,7 +340,7 @@ namespace Bio.Tests.IO.Bed Assert.IsTrue(resultvalue); - expectedresultpath = System.IO.Path.Combine (direc, "Result_Subtract_minoverlap1.BED").TestDir(); + expectedresultpath = System.IO.Path.Combine (direc, MinOverlap1).TestDir(); result = refSeqRange.Subtract(querySeqRange, 1, SubtractOutputType.IntervalsWithNoOverlap, false); formatter.Format(result, resultfilepath); resultvalue = CompareBEDOutput(resultfilepath, expectedresultpath); @@ -346,7 +348,7 @@ namespace Bio.Tests.IO.Bed resultvalue = ValidateParentSeqRange(result, refSeqRange, querySeqRange, false); Assert.IsTrue(resultvalue); - expectedresultpath = System.IO.Path.Combine (direc, "Result_Subtract_minoverlap0.BED").TestDir(); + expectedresultpath = System.IO.Path.Combine (direc, MinOverlap0).TestDir(); result = refSeqRange.Subtract(querySeqRange, 0, SubtractOutputType.IntervalsWithNoOverlap, false); formatter.Format(result, resultfilepath); resultvalue = CompareBEDOutput(resultfilepath, expectedresultpath); @@ -354,7 +356,8 @@ namespace Bio.Tests.IO.Bed resultvalue = ValidateParentSeqRange(result, refSeqRange, querySeqRange, false); Assert.IsTrue(resultvalue); - expectedresultpath = System.IO.Path.Combine (direc, "Result_Subtract_minoverlap0_NOnOverlappingPieces.BED").TestDir(); + const string MinNoOverlap0 = "Result_Subtract_minoverlap0_NOnOverlappingPieces.BED"; + expectedresultpath = System.IO.Path.Combine (direc, MinNoOverlap0).TestDir(); result = refSeqRange.Subtract(querySeqRange, 0, SubtractOutputType.NonOverlappingPiecesOfIntervals, true); formatter.Format(result, resultfilepath); resultvalue = CompareBEDOutput(resultfilepath, expectedresultpath); @@ -362,7 +365,8 @@ namespace Bio.Tests.IO.Bed resultvalue = ValidateParentSeqRange(result, refSeqRange, querySeqRange, true); Assert.IsTrue(resultvalue); - expectedresultpath = System.IO.Path.Combine (direc, "Result_Subtract_minoverlap1_NOnOverlappingPieces.BED").TestDir(); + const string MinNoOverlap1 = "Result_Subtract_minoverlap1_NOnOverlappingPieces.BED"; + expectedresultpath = System.IO.Path.Combine (direc, MinNoOverlap1).TestDir(); result = refSeqRange.Subtract(querySeqRange, 1, SubtractOutputType.NonOverlappingPiecesOfIntervals, true); formatter.Format(result, resultfilepath); resultvalue = CompareBEDOutput(resultfilepath, expectedresultpath); diff --git a/Tests/Bio.Tests/IO/FastQ/FastQTests.cs b/Tests/Bio.Tests/IO/FastQ/FastQTests.cs index ece1ddd..6a5b103 100644 --- a/Tests/Bio.Tests/IO/FastQ/FastQTests.cs +++ b/Tests/Bio.Tests/IO/FastQ/FastQTests.cs @@ -25,7 +25,7 @@ namespace Bio.Tests.IO.FastQ [Category("Priority0")] public void TestFastQWhenParsingOneOfMany() { - string filepath = @"TestUtils\FASTQ\SRR002012_5.fastq".TestDir(); + string filepath = @"TestUtils\FastQ\SRR002012_5.fastq".TestDir(); // Parse ISequence seq = new FastQParser().ParseOne(filepath); @@ -52,7 +52,7 @@ namespace Bio.Tests.IO.FastQ [Category("Priority0")] public void FastQFormatter() { - string FilepathOriginal = @"TestUtils\FASTQ\SRR002012_5.fastq".TestDir(); + string FilepathOriginal = @"TestUtils\FastQ\SRR002012_5.fastq".TestDir(); Assert.IsTrue(File.Exists(FilepathOriginal)); IList seqsOriginal; @@ -77,8 +77,8 @@ namespace Bio.Tests.IO.FastQ Assert.IsNotNull(seqsNew); // Now compare the sequences. - int countOriginal = seqsOriginal.Count(); - int countNew = seqsNew.Count(); + int countOriginal = seqsOriginal.Count; + int countNew = seqsNew.Count; Assert.AreEqual(countOriginal, countNew); int i; @@ -112,7 +112,7 @@ namespace Bio.Tests.IO.FastQ [Category("Priority0")] public void FastQFormatterUsingInterface() { - string FilepathOriginal = @"TestUtils\FASTQ\SRR002012_5.fastq".TestDir(); + string FilepathOriginal = @"TestUtils\FastQ\SRR002012_5.fastq".TestDir(); Assert.IsTrue(File.Exists(FilepathOriginal)); string filepathTmp = Path.GetTempFileName(); @@ -161,7 +161,7 @@ namespace Bio.Tests.IO.FastQ [Category("Priority0")] public void FastQParserForManyFiles() { - string Path = @"TestUtils\FASTQ".TestDir(); + string Path = @"TestUtils\FastQ".TestDir(); Assert.IsTrue(Directory.Exists(Path)); int count = 0; diff --git a/Tests/TestData/TestUtils/GffTestsConfig.xml b/Tests/TestData/TestUtils/GffTestsConfig.xml index 584a07c..dd108c0 100644 --- a/Tests/TestData/TestUtils/GffTestsConfig.xml +++ b/Tests/TestData/TestUtils/GffTestsConfig.xml @@ -137,7 +137,7 @@ - TestUtils\simple_gff_protein.GFF + TestUtils\Simple_Gff_Protein.GFF MVLSPADKTNVKAAWGKVGAHAGEYGAEALERMFLSF Protein @@ -1463,7 +1463,7 @@ - TestUtils\LargeSize.gff + TestUtils\LargeSize.GFF 1 @@ -20932,7 +20932,7 @@ - TestUtils\MediumSize.gff + TestUtils\MediumSize.Gff 1