public void AddCacheFiles_Nominal() { var comparer = new RemoteFileComparer(); var genomeAssemblies = new List <GenomeAssembly> { GenomeAssembly.GRCh37, GenomeAssembly.GRCh38 }; const string remoteCacheDirectory = "remote"; const string cacheDirectory = "local"; const ushort dataVersion = CacheConstants.DataVersion; var expectedFiles = new List <RemoteFile> { new RemoteFile($"remote/{dataVersion}/GRCh37/Both.transcripts.ndb", Path.Combine("local", "GRCh37", "Both.transcripts.ndb"), "Both.transcripts.ndb (GRCh37)"), new RemoteFile($"remote/{dataVersion}/GRCh37/Both.sift.ndb", Path.Combine("local", "GRCh37", "Both.sift.ndb"), "Both.sift.ndb (GRCh37)"), new RemoteFile($"remote/{dataVersion}/GRCh37/Both.polyphen.ndb", Path.Combine("local", "GRCh37", "Both.polyphen.ndb"), "Both.polyphen.ndb (GRCh37)"), new RemoteFile($"remote/{dataVersion}/GRCh38/Both.transcripts.ndb", Path.Combine("local", "GRCh38", "Both.transcripts.ndb"), "Both.transcripts.ndb (GRCh38)"), new RemoteFile($"remote/{dataVersion}/GRCh38/Both.sift.ndb", Path.Combine("local", "GRCh38", "Both.sift.ndb"), "Both.sift.ndb (GRCh38)"), new RemoteFile($"remote/{dataVersion}/GRCh38/Both.polyphen.ndb", Path.Combine("local", "GRCh38", "Both.polyphen.ndb"), "Both.polyphen.ndb (GRCh38)") }; var files = new List <RemoteFile>(); files.AddCacheFiles(genomeAssemblies, remoteCacheDirectory, cacheDirectory); Assert.Equal(expectedFiles, files, comparer); }
public void AddSupplementaryAnnotationFiles_Nominal() { var comparer = new RemoteFileComparer(); const string saDirectory = "local"; var remotePaths37 = new List <string> { "/0bf0cb93e64824b20f0b551a629596fd-TopMed/2/GRCh37/TOPMed_freeze_5.nsa" }; var remotePaths38 = new List <string> { "/43cafec8b0624b77663e2ba1dec32883-gnomAD-exome/2/GRCh38/gnomAD_exome_2.0.2.nsa", "/2551e067cb59c540a4da905a99ee5ff4-ClinGen/2/GRCh38/ClinGen_20160414.nsi" }; var remotePathsByGenomeAssembly = new Dictionary <GenomeAssembly, List <string> > { [GenomeAssembly.GRCh37] = remotePaths37, [GenomeAssembly.GRCh38] = remotePaths38 }; var expectedFiles = new List <RemoteFile> { new RemoteFile("/0bf0cb93e64824b20f0b551a629596fd-TopMed/2/GRCh37/TOPMed_freeze_5.nsa", Path.Combine("local", "GRCh37", "TOPMed_freeze_5.nsa"), "TOPMed_freeze_5.nsa (GRCh37)"), new RemoteFile("/0bf0cb93e64824b20f0b551a629596fd-TopMed/2/GRCh37/TOPMed_freeze_5.nsa.idx", Path.Combine("local", "GRCh37", "TOPMed_freeze_5.nsa.idx"), "TOPMed_freeze_5.nsa.idx (GRCh37)"), new RemoteFile("/43cafec8b0624b77663e2ba1dec32883-gnomAD-exome/2/GRCh38/gnomAD_exome_2.0.2.nsa", Path.Combine("local", "GRCh38", "gnomAD_exome_2.0.2.nsa"), "gnomAD_exome_2.0.2.nsa (GRCh38)"), new RemoteFile("/43cafec8b0624b77663e2ba1dec32883-gnomAD-exome/2/GRCh38/gnomAD_exome_2.0.2.nsa.idx", Path.Combine("local", "GRCh38", "gnomAD_exome_2.0.2.nsa.idx"), "gnomAD_exome_2.0.2.nsa.idx (GRCh38)"), new RemoteFile("/2551e067cb59c540a4da905a99ee5ff4-ClinGen/2/GRCh38/ClinGen_20160414.nsi", Path.Combine("local", "GRCh38", "ClinGen_20160414.nsi"), "ClinGen_20160414.nsi (GRCh38)") }; var files = new List <RemoteFile>(); files.AddSupplementaryAnnotationFiles(remotePathsByGenomeAssembly, saDirectory); Assert.Equal(expectedFiles, files, comparer); }
public void AddReferenceFiles_Nominal() { var comparer = new RemoteFileComparer(); var genomeAssemblies = new List <GenomeAssembly> { GenomeAssembly.GRCh37, GenomeAssembly.GRCh38 }; const string remoteReferencesDirectory = "remote"; const string referencesDirectory = "local"; const ushort dataVersion = ReferenceSequenceCommon.HeaderVersion; var expectedFiles = new List <RemoteFile> { new RemoteFile($"remote/{dataVersion}/Homo_sapiens.GRCh37.Nirvana.dat", Path.Combine("local", "Homo_sapiens.GRCh37.Nirvana.dat"), "Homo_sapiens.GRCh37.Nirvana.dat"), new RemoteFile($"remote/{dataVersion}/Homo_sapiens.GRCh38.Nirvana.dat", Path.Combine("local", "Homo_sapiens.GRCh38.Nirvana.dat"), "Homo_sapiens.GRCh38.Nirvana.dat") }; var files = new List <RemoteFile>(); files.AddReferenceFiles(genomeAssemblies, remoteReferencesDirectory, referencesDirectory); Assert.Equal(expectedFiles, files, comparer); }