diff --git a/test/Information/CorrectedMutualInformation.jl b/test/Information/CorrectedMutualInformation.jl
index 2e6a7f8c..be159018 100644
--- a/test/Information/CorrectedMutualInformation.jl
+++ b/test/Information/CorrectedMutualInformation.jl
@@ -1,10 +1,10 @@
@testset "CorrectedMutualInformation" begin
- Gaoetal2011 = joinpath(pwd(), "data", "Gaoetal2011.fasta")
+ Gaoetal2011 = joinpath(DATA, "Gaoetal2011.fasta")
function gao11_buslje09(measure)
filename = string("data_Gaoetal2011_soft_Busljeetal2009_measure_", measure, ".txt")
- joinpath(pwd(), "data", filename)
+ joinpath(DATA, filename)
end
## Column numbers for the output of Buslje et. al. 2009
@@ -223,9 +223,9 @@
@testset "Results from Buslje et. al. 2009" begin
@testset "Simple" begin
- data = readdlm(joinpath(pwd(), "data",
+ data = readdlm(joinpath(DATA,
"data_simple_soft_Busljeetal2009_measure_MI.txt"), comments=true)
- results = buslje09(joinpath(pwd(), "data", "simple.fasta"), FASTA,
+ results = buslje09(joinpath(DATA, "simple.fasta"), FASTA,
lambda=0.0, clustering=false, apc=false)
@test isapprox(Float64(data[1, SCORE]), results[MIToS_SCORE][1,2], atol=1e-6)
@@ -297,7 +297,7 @@
@testset "BLMI" begin
@testset "Simple" begin
- file = joinpath(pwd(), "data", "simple.fasta")
+ file = joinpath(DATA, "simple.fasta")
busl = buslje09(file, FASTA)
blmi = BLMI(file, FASTA)
diff --git a/test/Information/Gaps.jl b/test/Information/Gaps.jl
index aa8782b3..4463130d 100644
--- a/test/Information/Gaps.jl
+++ b/test/Information/Gaps.jl
@@ -1,7 +1,7 @@
@testset "Pairwise Gap Percentage" begin
@testset "Simple" begin
- file = joinpath(pwd(), "data", "simple.fasta")
+ file = joinpath(DATA, "simple.fasta")
mat = [ 0. 0.
0. 0. ]
@@ -12,7 +12,7 @@
@testset "Gaps" begin
- file = joinpath(pwd(), "data", "gaps.txt")
+ file = joinpath(DATA, "gaps.txt")
cl = hobohmI(read(file, Raw), 62)
gu, gi = pairwisegapfraction(file, Raw)
ncl = nclusters(cl)
diff --git a/test/Information/Iterations.jl b/test/Information/Iterations.jl
index 15fca4d8..7653a8ce 100644
--- a/test/Information/Iterations.jl
+++ b/test/Information/Iterations.jl
@@ -7,7 +7,7 @@
# New methods to measure residues coevolution in proteins.
# BMC bioinformatics, 12(1), 206.
- aln = read(joinpath(pwd(), "data", "Gaoetal2011.fasta"), FASTA)
+ aln = read(joinpath(DATA, "Gaoetal2011.fasta"), FASTA)
result = Float64[ 0 0 0 0 0 0
0 0 0 0 0 0
0 0 0 1 1 0.296
@@ -36,7 +36,7 @@
table = ContingencyTable(Float64, Val{1}, GappedAlphabet())
- gaps = read(joinpath(pwd(), "data", "gaps.txt"), Raw)
+ gaps = read(joinpath(DATA, "gaps.txt"), Raw)
# THAYQAIHQV 0
# THAYQAIHQ- 0.1
diff --git a/test/MIToSTests.jl b/test/MIToSTests.jl
new file mode 100644
index 00000000..aa76af4d
--- /dev/null
+++ b/test/MIToSTests.jl
@@ -0,0 +1,10 @@
+"""
+You need to `include` this file (and module) into your Julia session to run the tests using
+`ReTest`. `ReTest` is not a dependency of `MIToS`, so you need to install it manually.
+Then, you can do `MIToSTests.retest()` to setup the tests. After that, you can use
+regular expressions to filter the tests you want to run, e.g. `MIToSTests.retest(r"MSA")`.
+"""
+module MIToSTests
+ using ReTest
+ include("tests.jl")
+end
\ No newline at end of file
diff --git a/test/MSA/Concatenation.jl b/test/MSA/Concatenation.jl
index c6fe0039..05ab3a0a 100644
--- a/test/MSA/Concatenation.jl
+++ b/test/MSA/Concatenation.jl
@@ -1,5 +1,5 @@
@testset "hcat" begin
- simple = joinpath(pwd(), "data", "simple.fasta")
+ simple = joinpath(DATA, "simple.fasta")
msa = read(simple, FASTA, generatemapping=true)
setannotresidue!(msa, "ONE", "example", "ab")
setannotresidue!(msa, "TWO", "example", "cd")
diff --git a/test/MSA/General.jl b/test/MSA/General.jl
index 0c0147de..9ca59bf0 100644
--- a/test/MSA/General.jl
+++ b/test/MSA/General.jl
@@ -7,8 +7,8 @@
AnnotatedMultipleSequenceAlignment
)
- pf09645_sto = joinpath(pwd(), "data", "PF09645_full.stockholm")
- gaoetal2011 = joinpath(pwd(), "data", "Gaoetal2011.fasta")
+ pf09645_sto = joinpath(DATA, "PF09645_full.stockholm")
+ gaoetal2011 = joinpath(DATA, "Gaoetal2011.fasta")
gaoetal_msas = [ read(gaoetal2011, FASTA, T) for T in msa_types ]
pfam_msas = [ read(pf09645_sto, Stockholm, T) for T in msa_types ]
diff --git a/test/MSA/GetIndex.jl b/test/MSA/GetIndex.jl
index 87a88328..45a5eb47 100644
--- a/test/MSA/GetIndex.jl
+++ b/test/MSA/GetIndex.jl
@@ -1,5 +1,5 @@
@testset "getindex" begin
- simple = joinpath(pwd(), "data", "simple.fasta")
+ simple = joinpath(DATA, "simple.fasta")
@testset "MSA" begin
msa = read(simple, FASTA, generatemapping=true)
diff --git a/test/MSA/Hobohm.jl b/test/MSA/Hobohm.jl
index 7577cc67..4a1e4f80 100644
--- a/test/MSA/Hobohm.jl
+++ b/test/MSA/Hobohm.jl
@@ -14,7 +14,7 @@ end
# DAYCMT 33.3 83.3
# DAYCMT 33.3 83.3
- fasta = read(joinpath(pwd(), "data", "Gaoetal2011.fasta"), FASTA)
+ fasta = read(joinpath(DATA, "Gaoetal2011.fasta"), FASTA)
clusters = hobohmI(fasta, 62)
@test nclusters(clusters) == 2
diff --git a/test/MSA/IO.jl b/test/MSA/IO.jl
index 9a8a6256..5669c7e3 100644
--- a/test/MSA/IO.jl
+++ b/test/MSA/IO.jl
@@ -18,8 +18,8 @@
# > Pfam version 28.0, based on UniProt release 2014_07
@testset "Stockholm" begin
- pf09645_sto = joinpath(pwd(), "data", "PF09645_full.stockholm")
- rna_sto = joinpath(pwd(), "data", "upsk_rna.sto")
+ pf09645_sto = joinpath(DATA, "PF09645_full.stockholm")
+ rna_sto = joinpath(DATA, "upsk_rna.sto")
@testset "Read" begin
@@ -139,8 +139,8 @@
@testset "FASTA" begin
- pf09645_fas = joinpath(pwd(), "data", "PF09645_full.fasta.gz")
- gaoetal2011 = joinpath(pwd(), "data", "Gaoetal2011.fasta")
+ pf09645_fas = joinpath(DATA, "PF09645_full.fasta.gz")
+ gaoetal2011 = joinpath(DATA, "Gaoetal2011.fasta")
@testset "Read" begin
@@ -278,7 +278,7 @@
@testset "Non standard residues and mapping" begin
- seqs = read(joinpath(pwd(), "data", "alphabet.fasta"), FASTA,
+ seqs = read(joinpath(DATA, "alphabet.fasta"), FASTA,
generatemapping=true)
@test vec(seqs[1,:]) == res"ARNDCQEGHILKMFPSTWYV"
@@ -292,7 +292,7 @@
@testset "Raw" begin
# AnnotatedMultipleSequenceAlignment
- raw = read(joinpath(pwd(), "data", "gaps.txt"), Raw)
+ raw = read(joinpath(DATA, "gaps.txt"), Raw)
mat = getresidues(raw)
raw_string = """THAYQAIHQV
THAYQAIHQ-
@@ -360,16 +360,16 @@
# Example NBRF file: http://iubio.bio.indiana.edu/soft/molbio/readseq/classic/src/Formats
# "The sequence is free format and may be interrupted by blanks for ease of reading"
- example = joinpath(pwd(), "data", "example.nbrf")
+ example = joinpath(DATA, "example.nbrf")
# Alignment file (PIR) from https://salilab.org/modeller/9v7/manual/node445.html
- modeller = joinpath(pwd(), "data", "modeller.pir.gz")
+ modeller = joinpath(DATA, "modeller.pir.gz")
# http://emboss.sourceforge.net/docs/themes/seqformats/NbrfFormat.html
# "sequence may contain punctuation symbols to indicate various degrees of
# reliability of the data"
- emboss = joinpath(pwd(), "data", "emboss.pir")
+ emboss = joinpath(DATA, "emboss.pir")
# http://caps.ncbs.res.in/pass2v3/pir.html
# Example from pass2 with spaces added at the end of the id lines.
- pass2 = joinpath(pwd(), "data", "pass2.pir")
+ pass2 = joinpath(DATA, "pass2.pir")
@testset "Read" begin
@@ -461,7 +461,7 @@
@testset "Duplicated identifiers" begin
- duplicated_ids_file = joinpath(pwd(), "data", "duplicated_ids.pir")
+ duplicated_ids_file = joinpath(DATA, "duplicated_ids.pir")
@test_throws ArgumentError read(duplicated_ids_file, PIR)
end
end
diff --git a/test/MSA/Identity.jl b/test/MSA/Identity.jl
index 7d0a1155..e7299527 100644
--- a/test/MSA/Identity.jl
+++ b/test/MSA/Identity.jl
@@ -55,7 +55,7 @@
@testset "MSA" begin
- fasta = read(joinpath(pwd(), "data", "Gaoetal2011.fasta"), FASTA)
+ fasta = read(joinpath(DATA, "Gaoetal2011.fasta"), FASTA)
id = percentidentity(fasta)
@test id[1,1] == 100.0
@@ -80,7 +80,7 @@
@testset "Gaps" begin
- aln = read(joinpath(pwd(), "data", "gaps.txt"), Raw)
+ aln = read(joinpath(DATA, "gaps.txt"), Raw)
id = percentidentity(aln)
@test id[1,1] == 100.0
@@ -110,7 +110,7 @@
@testset "Percent Similarity" begin
- fasta = read(joinpath(pwd(), "data", "Gaoetal2011.fasta"), FASTA)
+ fasta = read(joinpath(DATA, "Gaoetal2011.fasta"), FASTA)
@testset "Gaps" begin
diff --git a/test/MSA/MSAAnnotations.jl b/test/MSA/MSAAnnotations.jl
index 831a4669..17c0f1b2 100644
--- a/test/MSA/MSAAnnotations.jl
+++ b/test/MSA/MSAAnnotations.jl
@@ -1,12 +1,12 @@
@testset "MSA Annotations" begin
- pfam = read(joinpath(pwd(), "data", "PF09645_full.stockholm"), Stockholm,
+ pfam = read(joinpath(DATA, "PF09645_full.stockholm"), Stockholm,
generatemapping=true, useidcoordinates=true)
F112_SSV1 = collect(string(".....QTLNSYKMAEIMYKILEKKGELTLEDILAQFEISVPSAYNIQRALKAIC",
"ERHPDECEVQYKNRKTTFKWIKQEQKEEQKQEQTQDNIAKIFDAQPANFEQTDQGFIKAKQ....."))
- fasta = read(joinpath(pwd(), "data", "Gaoetal2011.fasta"), FASTA, generatemapping=true)
+ fasta = read(joinpath(DATA, "Gaoetal2011.fasta"), FASTA, generatemapping=true)
@testset "Mapping" begin
diff --git a/test/MSA/MSAEditing.jl b/test/MSA/MSAEditing.jl
index 8e71d608..6d6b32c9 100644
--- a/test/MSA/MSAEditing.jl
+++ b/test/MSA/MSAEditing.jl
@@ -7,8 +7,8 @@
AnnotatedMultipleSequenceAlignment
)
- pf09645_sto = joinpath(pwd(), "data", "PF09645_full.stockholm")
- gaoetal2011 = joinpath(pwd(), "data", "Gaoetal2011.fasta")
+ pf09645_sto = joinpath(DATA, "PF09645_full.stockholm")
+ gaoetal2011 = joinpath(DATA, "Gaoetal2011.fasta")
gaoetal_msas = [ read(gaoetal2011, FASTA, T) for T in msa_types ]
pfam_msas = [ read(pf09645_sto, Stockholm, T) for T in msa_types ]
diff --git a/test/MSA/MSAStats.jl b/test/MSA/MSAStats.jl
index 9f6b1e04..2ea0ba34 100644
--- a/test/MSA/MSAStats.jl
+++ b/test/MSA/MSAStats.jl
@@ -7,8 +7,8 @@
AnnotatedMultipleSequenceAlignment
)
- pf09645_sto = joinpath(pwd(), "data", "PF09645_full.stockholm")
- gaoetal2011 = joinpath(pwd(), "data", "Gaoetal2011.fasta")
+ pf09645_sto = joinpath(DATA, "PF09645_full.stockholm")
+ gaoetal2011 = joinpath(DATA, "Gaoetal2011.fasta")
gaoetal_msas = [ read(gaoetal2011, FASTA, T) for T in msa_types ]
pfam_msas = [ read(pf09645_sto, Stockholm, T) for T in msa_types ]
diff --git a/test/MSA/Shuffle.jl b/test/MSA/Shuffle.jl
index 6d06bfe1..c2928da7 100644
--- a/test/MSA/Shuffle.jl
+++ b/test/MSA/Shuffle.jl
@@ -9,7 +9,7 @@
N = length(msa_types)
- pf09645_sto = joinpath(pwd(), "data", "PF09645_full.stockholm")
+ pf09645_sto = joinpath(DATA, "PF09645_full.stockholm")
msas = [ read(pf09645_sto, Stockholm, T) for T in msa_types ]
gaps = [ msa .== GAP for msa in msas ]
diff --git a/test/PDB/Contacts.jl b/test/PDB/Contacts.jl
index a90174f2..6961c964 100644
--- a/test/PDB/Contacts.jl
+++ b/test/PDB/Contacts.jl
@@ -1,6 +1,6 @@
@testset "Contacts" begin
- txt(code) = joinpath(pwd(), "data", string(uppercase(code), ".pdb"))
+ txt(code) = joinpath(DATA, string(uppercase(code), ".pdb"))
@testset "Piccolo" begin
# Using data from http://www-cryst.bioc.cam.ac.uk/~richard/piccolo/piccolo.php?PDB=1IGY (28/Sep/2015)
@@ -97,7 +97,7 @@
@testset "1AKS" begin
- pdb = read(joinpath(pwd(), "data", "1AKS.xml.gz"), PDBML)
+ pdb = read(joinpath(DATA, "1AKS.xml.gz"), PDBML)
CA = @residuesdict pdb model "1" chain "A" group "ATOM" residue All
CB = @residuesdict pdb model "1" chain "B" group "ATOM" residue All
diff --git a/test/PDB/Kabsch.jl b/test/PDB/Kabsch.jl
index fba19f38..42da980a 100644
--- a/test/PDB/Kabsch.jl
+++ b/test/PDB/Kabsch.jl
@@ -192,8 +192,8 @@
end
@testset "PDBResidue without alpha-carbon" begin
- small_2WEL = read(joinpath(pwd(), "data", "2WEL_D_region.pdb"), PDBFile)
- small_6BAB = read(joinpath(pwd(), "data", "6BAB_D_region.pdb"), PDBFile)
+ small_2WEL = read(joinpath(DATA, "2WEL_D_region.pdb"), PDBFile)
+ small_6BAB = read(joinpath(DATA, "6BAB_D_region.pdb"), PDBFile)
aln_2WEL, aln_6BAB, RMSD = superimpose(small_2WEL, small_6BAB)
@test length(aln_2WEL) == 3
diff --git a/test/PDB/PDB.jl b/test/PDB/PDB.jl
index c7a8cc0d..55bbcfca 100644
--- a/test/PDB/PDB.jl
+++ b/test/PDB/PDB.jl
@@ -1,7 +1,7 @@
@testset "Parse PDB and PDBML" begin
- txt(code) = joinpath(pwd(), "data", string(uppercase(code), ".pdb"))
- xml(code) = joinpath(pwd(), "data", string(uppercase(code), ".xml"))
+ txt(code) = joinpath(DATA, string(uppercase(code), ".pdb"))
+ xml(code) = joinpath(DATA, string(uppercase(code), ".xml"))
@testset "2VQC: Missings" begin
@@ -289,7 +289,7 @@
@testset "Foldseek" begin
# PDB files generated by Foldseek have only 66 columns; element identifiers
# are missing (represented as empty strings). Those files only contain CA atoms.
- pdb_file = joinpath(pwd(), "data", "foldseek_example.pdb")
+ pdb_file = joinpath(DATA, "foldseek_example.pdb")
pdb = read(pdb_file, PDBFile)
# The example file has only 8 residues and one chain (A)
@@ -316,7 +316,7 @@ end
@testset "Write PDB files" begin
- txt(code) = joinpath(pwd(), "data", string(uppercase(code), ".pdb"))
+ txt(code) = joinpath(DATA, string(uppercase(code), ".pdb"))
@testset "2VQC" begin
code = "2VQC"
diff --git a/test/PDB/Sequences.jl b/test/PDB/Sequences.jl
index 92bed3e6..070235cf 100644
--- a/test/PDB/Sequences.jl
+++ b/test/PDB/Sequences.jl
@@ -11,7 +11,7 @@ end
@testset "Extract protein sequences from PDB" begin
- file(code) = joinpath(pwd(), "data", string(uppercase(code), ".pdb"))
+ file(code) = joinpath(DATA, string(uppercase(code), ".pdb"))
@testset "2VQC: Missings & selenomethionines" begin
res = read(file("2VQC"), PDBFile)
diff --git a/test/Pfam/Pfam.jl b/test/Pfam/Pfam.jl
index b570cb48..2c1363c5 100644
--- a/test/Pfam/Pfam.jl
+++ b/test/Pfam/Pfam.jl
@@ -15,15 +15,15 @@ end
@testset "PDB code" begin
- msa = read(joinpath(pwd(), "data", "PF09645_full.stockholm"), Stockholm)
+ msa = read(joinpath(DATA, "PF09645_full.stockholm"), Stockholm)
@test getseq2pdb(msa)["F112_SSV1/3-112"] == [("2VQC","A")]
end
@testset "Mapping PDB/Pfam" begin
- msa_file = joinpath(pwd(), "data", "PF09645_full.stockholm")
- sifts_file = joinpath(pwd(), "data", "2vqc.xml.gz")
- pdb_file = joinpath(pwd(), "data", "2VQC.xml")
+ msa_file = joinpath(DATA, "PF09645_full.stockholm")
+ sifts_file = joinpath(DATA, "2vqc.xml.gz")
+ pdb_file = joinpath(DATA, "2VQC.xml")
msa = read(msa_file, Stockholm, generatemapping=true, useidcoordinates=true)
cmap = msacolumn2pdbresidue(msa, "F112_SSV1/3-112", "2VQC", "A", "PF09645", sifts_file)
res = residuesdict(read(pdb_file, PDBML), "1", "A", "ATOM", All)
diff --git a/test/SIFTS/SIFTS.jl b/test/SIFTS/SIFTS.jl
index d0a20f99..31606a38 100644
--- a/test/SIFTS/SIFTS.jl
+++ b/test/SIFTS/SIFTS.jl
@@ -1,6 +1,6 @@
@testset "SIFTS Mappings" begin
- sifts_file = joinpath(pwd(), "data", "2vqc.xml.gz")
+ sifts_file = joinpath(DATA, "2vqc.xml.gz")
@testset "parse" begin
@@ -37,7 +37,7 @@
@testset "Insert codes" begin
# 1SSX : Residues with insert codes: 15A 15B
- _1ssx_file = joinpath(pwd(), "data", "1ssx.xml.gz")
+ _1ssx_file = joinpath(DATA, "1ssx.xml.gz")
map = siftsmapping(_1ssx_file, dbPDBe, "1ssx", dbPDB, "1ssx", chain="A")
residue_A = map["1"]
@@ -66,7 +66,7 @@
#
# ...
- _1cbn_file = joinpath(pwd(), "data", "1cbn.xml.gz")
+ _1cbn_file = joinpath(DATA, "1cbn.xml.gz")
map = siftsmapping(_1cbn_file, dbPDBe, "1cbn", dbInterPro, "IPR001010", chain="A")
@test_throws KeyError map["1"] # Without InterPro
@@ -89,7 +89,7 @@
# loop
#
- _4cpa_file = joinpath(pwd(), "data", "4cpa.xml.gz")
+ _4cpa_file = joinpath(DATA, "4cpa.xml.gz")
map = read(_4cpa_file, SIFTSXML, chain="J")
res = filter(r -> r.PDBe.number == "2", map)[1]
@@ -103,7 +103,7 @@
@testset "NMR" begin
# 1AS5 : NMR
- _1as5_file = joinpath(pwd(), "data", "1as5.xml.gz")
+ _1as5_file = joinpath(DATA, "1as5.xml.gz")
map = siftsmapping(_1as5_file, dbPDBe, "1as5", dbUniProt, "P56529", chain="A")
# missings=true : NMR there are not missing residues
@@ -119,7 +119,7 @@
# Single unnamed chain in 1DPO contains insertions at postions 184 (Gly, Phe),
# 188 (Gly, Lys), and 221 (Ala, Leu) but no insertion letters.
- _1dpo_file = joinpath(pwd(), "data", "1dpo.xml.gz")
+ _1dpo_file = joinpath(DATA, "1dpo.xml.gz")
map = siftsmapping(_1dpo_file, dbPDBe, "1dpo", dbPDB, "1dpo", chain="A")
# Unnamed chain is "A" in SIFTS
@test map["164"] == "184"
@@ -135,7 +135,7 @@
# insertion block. For example, chain B in 1IGY contains a block of four residues
# inserted at sequence position 82. The block contains Leu-Ser-Ser-Leu.
- _1igy_file = joinpath(pwd(), "data", "1igy.xml.gz")
+ _1igy_file = joinpath(DATA, "1igy.xml.gz")
map = siftsmapping(_1igy_file, dbPDBe, "1igy", dbCATH, "2.60.40.10", chain="B")
@test map["82"] == "82"
@test map["83"] == "82A"
@@ -146,7 +146,7 @@
@testset "1HAG" begin
# 1HAG : Chain E begins with 1H, 1G, 1F, ... 1A, then 1 (in reverse alphabetic order)
- _1hag_file = joinpath(pwd(), "data", "1hag.xml.gz")
+ _1hag_file = joinpath(DATA, "1hag.xml.gz")
map = siftsmapping(_1hag_file, dbPDBe, "1hag", dbPDB, "1hag", chain="E")
@test map["1"] == "1H"
@test map["2"] == "1G"
@@ -163,7 +163,7 @@ end
@testset "1NSA" begin
# 1NSA : Contains a single (unnamed) protein chain with sequence 7A-95A that continues 4-308.
- _1nsa_file = joinpath(pwd(), "data", "1nsa.xml.gz")
+ _1nsa_file = joinpath(DATA, "1nsa.xml.gz")
mapping = read(_1nsa_file, SIFTSXML)
@testset "findall & read" begin
@@ -190,7 +190,7 @@ end
@testset "find & filter" begin
# 1IAO : Contains in chain B (in this order) 1S, 323P-334P, 6-94, 94A, 95-188, 1T, 2T
- mapp = read(joinpath(pwd(), "data", "1iao.xml.gz"), SIFTSXML)
+ mapp = read(joinpath(DATA, "1iao.xml.gz"), SIFTSXML)
@test filter(db -> db.id == "1iao" && db.number == "1S" && db.chain == "B", mapp, dbPDB)[1].PDBe.number == "1"
i = findall(db -> db.id == "1iao" && db.number == "1S" && db.chain == "B", mapp, dbPDB)[1]
@@ -201,7 +201,7 @@ end
@testset "MIToS 1.0 error" begin
- sf = joinpath(pwd(), "data", "4gcr.xml.gz")
+ sf = joinpath(DATA, "4gcr.xml.gz")
mapping = siftsmapping(sf, dbPfam, "PF00030", dbPDB, "4gcr")
@test mapping["3"] == "2"
@@ -210,7 +210,7 @@ end
@testset "download" begin
pdb = "2vqc"
- mapping = read(joinpath(pwd(), "data", "$(pdb).xml.gz"), SIFTSXML)
+ mapping = read(joinpath(DATA, "$(pdb).xml.gz"), SIFTSXML)
@test_throws AssertionError downloadsifts(pdb, source="http")
@test_throws AssertionError downloadsifts(pdb, filename="bad_name.txt")
@@ -227,7 +227,7 @@ end
# 18GS has multiple Ensembl annotations for each residue
# 18GS also has EC and GO annotations
- mapping = read(joinpath(pwd(), "data", "18gs.xml.gz"), SIFTSXML)
+ mapping = read(joinpath(DATA, "18gs.xml.gz"), SIFTSXML)
last_res = mapping[end]
@test length(last_res.Ensembl) == 2
@@ -243,7 +243,7 @@ end
@testset "SCOP2B" begin
# 1IVO has residues mapped into SCOP2B (05/08/2020)
- mapping = read(joinpath(pwd(), "data", "1ivo.xml.gz"), SIFTSXML)
+ mapping = read(joinpath(DATA, "1ivo.xml.gz"), SIFTSXML)
# First residue with SCOP2B annotation:
#
@@ -258,7 +258,7 @@ end
@testset "SCOP2" begin
# 1XYZ has residues mapped to two different SCOP2 domains (05/08/2020)
- mapping = read(joinpath(pwd(), "data", "1xyz.xml.gz"), SIFTSXML)
+ mapping = read(joinpath(DATA, "1xyz.xml.gz"), SIFTSXML)
# First residue with SCOP2 annotations:
#
diff --git a/test/runtests.jl b/test/runtests.jl
index 871f08aa..5801c381 100644
--- a/test/runtests.jl
+++ b/test/runtests.jl
@@ -1,93 +1,2 @@
using Test
-using Documenter
-
-using MIToS
-using MIToS.Utils
-using MIToS.MSA
-using MIToS.Information
-using MIToS.PDB
-using MIToS.SIFTS
-using MIToS.Pfam
-using LinearAlgebra
-using Random
-using Statistics # mean
-using DelimitedFiles # readdlm
-using ROCAnalysis # AUC
-using Clustering # test/MSA/Hobohm.jl
-using NamedArrays # array
-using StatsBase # WeightVec
-using PairwiseListMatrices # getlist
-
-const DATA = "data"
-
-# Utils
-@testset "Utils" begin
- include("Utils/GeneralUtils.jl")
-end
-
-# MSA
-@testset "MSA" begin
- include("MSA/Residues.jl")
- include("MSA/Alphabet.jl")
- include("MSA/ThreeLetters.jl")
- include("MSA/Annotations.jl")
- include("MSA/MultipleSequenceAlignment.jl")
- include("MSA/GeneralParserMethods.jl")
- include("MSA/IO.jl")
- include("MSA/General.jl")
- include("MSA/MSAEditing.jl")
- include("MSA/MSAStats.jl")
- include("MSA/Shuffle.jl")
- include("MSA/Identity.jl")
- include("MSA/Hobohm.jl")
- include("MSA/MSAAnnotations.jl")
- include("MSA/GetIndex.jl")
- include("MSA/Concatenation.jl")
-end
-
-# Information
-@testset "Information" begin
- include("Information/ContingencyTables.jl")
- include("Information/Counters.jl")
- include("Information/InformationMeasures.jl")
- include("Information/Iterations.jl")
- include("Information/CorrectedMutualInformation.jl")
- include("Information/Gaps.jl")
- include("Information/Externals.jl")
-end
-
-# PDB
-@testset "PDB" begin
- include("PDB/PDB.jl")
- include("PDB/Contacts.jl")
- include("PDB/Kabsch.jl")
- include("PDB/Internals.jl")
- include("PDB/Sequences.jl")
-end
-
-# SIFTS
-@testset "SIFTS" begin
- include("SIFTS/SIFTS.jl")
-end
-
-# Pfam
-@testset "Pfam" begin
- include("Pfam/Pfam.jl")
-end
-
-# Scripts
-@testset "Scripts" begin
- include("Scripts/Template.jl")
- include("Scripts/Scripts.jl")
-end
-
-# Doctests
-if VERSION >= v"1.7.0" # Julia 1.7 changed the default random number generator Mersenne Twister to Xoshiro256++
- doctest(MIToS)
-end
-
-print("""
-
------ =D -----
-
-""")
+include("tests.jl")
\ No newline at end of file
diff --git a/test/tests.jl b/test/tests.jl
new file mode 100644
index 00000000..af331668
--- /dev/null
+++ b/test/tests.jl
@@ -0,0 +1,92 @@
+using Documenter
+
+using MIToS
+using MIToS.Utils
+using MIToS.MSA
+using MIToS.Information
+using MIToS.PDB
+using MIToS.SIFTS
+using MIToS.Pfam
+using LinearAlgebra
+using Random
+using Statistics # mean
+using DelimitedFiles # readdlm
+using ROCAnalysis # AUC
+using Clustering # test/MSA/Hobohm.jl
+using NamedArrays # array
+using StatsBase # WeightVec
+using PairwiseListMatrices # getlist
+
+const DATA = joinpath(@__DIR__, "data")
+
+# Utils
+@testset "Utils" begin
+ include("Utils/GeneralUtils.jl")
+end
+
+# MSA
+@testset "MSA" begin
+ include("MSA/Residues.jl")
+ include("MSA/Alphabet.jl")
+ include("MSA/ThreeLetters.jl")
+ include("MSA/Annotations.jl")
+ include("MSA/MultipleSequenceAlignment.jl")
+ include("MSA/GeneralParserMethods.jl")
+ include("MSA/IO.jl")
+ include("MSA/General.jl")
+ include("MSA/MSAEditing.jl")
+ include("MSA/MSAStats.jl")
+ include("MSA/Shuffle.jl")
+ include("MSA/Identity.jl")
+ include("MSA/Hobohm.jl")
+ include("MSA/MSAAnnotations.jl")
+ include("MSA/GetIndex.jl")
+ include("MSA/Concatenation.jl")
+end
+
+# Information
+@testset "Information" begin
+ include("Information/ContingencyTables.jl")
+ include("Information/Counters.jl")
+ include("Information/InformationMeasures.jl")
+ include("Information/Iterations.jl")
+ include("Information/CorrectedMutualInformation.jl")
+ include("Information/Gaps.jl")
+ include("Information/Externals.jl")
+end
+
+# PDB
+@testset "PDB" begin
+ include("PDB/PDB.jl")
+ include("PDB/Contacts.jl")
+ include("PDB/Kabsch.jl")
+ include("PDB/Internals.jl")
+ include("PDB/Sequences.jl")
+end
+
+# SIFTS
+@testset "SIFTS" begin
+ include("SIFTS/SIFTS.jl")
+end
+
+# Pfam
+@testset "Pfam" begin
+ include("Pfam/Pfam.jl")
+end
+
+# Scripts
+@testset "Scripts" begin
+ include("Scripts/Template.jl")
+ include("Scripts/Scripts.jl")
+end
+
+# Doctests
+if VERSION >= v"1.7.0" # Julia 1.7 changed the default random number generator Mersenne Twister to Xoshiro256++
+ doctest(MIToS)
+end
+
+print("""
+
+----- =D -----
+
+""")
\ No newline at end of file