Skip to content

Commit

Permalink
Update GeneFinder module and add tests
Browse files Browse the repository at this point in the history
  • Loading branch information
camilogarciabotero committed Dec 28, 2023
1 parent 08f54d2 commit 698e565
Show file tree
Hide file tree
Showing 7 changed files with 127 additions and 201 deletions.
142 changes: 35 additions & 107 deletions Manifest.toml
Original file line number Diff line number Diff line change
@@ -1,12 +1,8 @@
# This file is machine-generated - editing it directly is not advised

julia_version = "1.9.4"
julia_version = "1.10.0"
manifest_format = "2.0"
project_hash = "51fd5132cd6ba02b6fa80c05982319be6520bdf4"

[[deps.ArgTools]]
uuid = "0dad84c5-d112-42e6-8d28-ef12dabb789f"
version = "1.1.1"
project_hash = "adaf35fb55ecd7280ba5cc9b0adc89489f2fd31c"

[[deps.Artifacts]]
uuid = "56f22d72-fd6d-98f1-02f0-08ddc0907c33"
Expand All @@ -27,10 +23,10 @@ uuid = "47718e42-2ac5-11e9-14af-e5595289c2ea"
version = "0.1.4"

[[deps.BioMarkovChains]]
deps = ["BioSequences", "PrecompileTools", "StatsAPI", "TestItemRunner", "TestItems", "VectorizedKmers"]
git-tree-sha1 = "8ba82351d84233c9d140df8df21dfe3fb535a251"
deps = ["BioSequences", "PrecompileTools", "VectorizedKmers"]
git-tree-sha1 = "44da2d71c2e9a68babb324c4df69d87b9ff7a835"
uuid = "f861b655-cb5f-42ce-b66a-341b542d4f2c"
version = "0.8.0"
version = "0.9.0"

[deps.BioMarkovChains.extensions]
DiscreteMarkovChainsExt = "DiscreteMarkovChains"
Expand All @@ -54,9 +50,9 @@ version = "5.1.3"

[[deps.Compat]]
deps = ["UUIDs"]
git-tree-sha1 = "8a62af3e248a8c4bad6b32cbbe663ae02275e32c"
git-tree-sha1 = "886826d76ea9e72b35fcd000e535588f7b60f21d"
uuid = "34da2185-b29b-5c13-b0c7-acf172513d20"
version = "4.10.0"
version = "4.10.1"
weakdeps = ["Dates", "LinearAlgebra"]

[deps.Compat.extensions]
Expand All @@ -65,7 +61,7 @@ weakdeps = ["Dates", "LinearAlgebra"]
[[deps.CompilerSupportLibraries_jll]]
deps = ["Artifacts", "Libdl"]
uuid = "e66e0078-7015-5450-92f7-15fbd957f2ae"
version = "1.0.5+0"
version = "1.0.5+1"

[[deps.DataAPI]]
git-tree-sha1 = "8da84edb865b0b5b0100c0666a9bc9a0b71c553c"
Expand All @@ -88,11 +84,6 @@ git-tree-sha1 = "2fb1e02f2b635d0845df5d7c167fec4dd739b00d"
uuid = "ffbed154-4ef7-542d-bbb7-c09d3a79fcae"
version = "0.9.3"

[[deps.Downloads]]
deps = ["ArgTools", "FileWatching", "LibCURL", "NetworkOptions"]
uuid = "f43a241f-c20a-4ad4-852c-f6b1247861c6"
version = "1.6.0"

[[deps.FASTX]]
deps = ["Automa", "BioGenerics", "PrecompileTools", "StringViews", "TranscodingStreams"]
git-tree-sha1 = "bff5d62bf5e1c382a370ac701bcaea9a24115ac6"
Expand All @@ -103,9 +94,6 @@ weakdeps = ["BioSequences"]
[deps.FASTX.extensions]
BioSequencesExt = "BioSequences"

[[deps.FileWatching]]
uuid = "7b1f6079-737a-58dc-b8bc-7a2ca5c1b5ee"

[[deps.InteractiveUtils]]
deps = ["Markdown"]
uuid = "b77e0a4c-d291-57a0-90e8-8db25a27a240"
Expand All @@ -116,24 +104,19 @@ uuid = "92d709cd-6900-40b7-9082-c6be49f344b6"
version = "0.2.2"

[[deps.IterTools]]
git-tree-sha1 = "4ced6667f9974fc5c5943fa5e2ef1ca43ea9e450"
git-tree-sha1 = "274c38bd733f9d29036d0a73658fff1dc1d3a065"
uuid = "c8e1da08-722c-5040-9ed9-7db0dc04731e"
version = "1.8.0"

[[deps.LibCURL]]
deps = ["LibCURL_jll", "MozillaCACerts_jll"]
uuid = "b27032c2-a3e7-50c8-80cd-2d36dbcbfd21"
version = "0.6.4"

[[deps.LibCURL_jll]]
deps = ["Artifacts", "LibSSH2_jll", "Libdl", "MbedTLS_jll", "Zlib_jll", "nghttp2_jll"]
uuid = "deac9b47-8bc7-5906-a0fe-35ac56dc84c0"
version = "8.4.0+0"
version = "1.9.0"

[[deps.LibGit2]]
deps = ["Base64", "NetworkOptions", "Printf", "SHA"]
deps = ["Base64", "LibGit2_jll", "NetworkOptions", "Printf", "SHA"]
uuid = "76f85450-5226-5b5a-8eaa-529ad045b433"

[[deps.LibGit2_jll]]
deps = ["Artifacts", "LibSSH2_jll", "Libdl", "MbedTLS_jll"]
uuid = "e37daf67-58a4-590a-8e99-b0245dd2ffc5"
version = "1.6.4+0"

[[deps.LibSSH2_jll]]
deps = ["Artifacts", "Libdl", "MbedTLS_jll"]
uuid = "29816b5a-b9ab-546f-933c-edad1886dfa8"
Expand Down Expand Up @@ -162,46 +145,34 @@ version = "0.3.26"
ChangesOfVariables = "9e997f8a-9a97-42d5-a9f1-ce6bfc15e2c0"
InverseFunctions = "3587e190-3f89-42d0-90ee-14403ec27112"

[[deps.Logging]]
uuid = "56ddb016-857b-54e1-b83d-db4d58db5568"

[[deps.Markdown]]
deps = ["Base64"]
uuid = "d6f4376e-aef5-505a-96c1-9c027394607a"

[[deps.MbedTLS_jll]]
deps = ["Artifacts", "Libdl"]
uuid = "c8ffd9c3-330d-5841-b78e-0817d7145fa1"
version = "2.28.2+0"
version = "2.28.2+1"

[[deps.Missings]]
deps = ["DataAPI"]
git-tree-sha1 = "f66bdc5de519e8f8ae43bdc598782d35a25b1272"
uuid = "e1d29d7a-bbdc-5cf2-9ac0-f12de2c33e28"
version = "1.1.0"

[[deps.MozillaCACerts_jll]]
uuid = "14a3606d-f60d-562e-9121-12d972cd8159"
version = "2022.10.11"

[[deps.NetworkOptions]]
uuid = "ca575930-c2e3-43a9-ace4-1e988b2c1908"
version = "1.2.0"

[[deps.OpenBLAS_jll]]
deps = ["Artifacts", "CompilerSupportLibraries_jll", "Libdl"]
uuid = "4536629a-c528-5b80-bd46-f80d51c5b363"
version = "0.3.21+4"
version = "0.3.23+2"

[[deps.OrderedCollections]]
git-tree-sha1 = "2e73fe17cac3c62ad1aebe70d44c963c3cfdc3e3"
git-tree-sha1 = "dfdf5519f235516220579f949664f1bf44e741c5"
uuid = "bac558e1-5e72-5ebc-8fee-abe8a469f55d"
version = "1.6.2"

[[deps.Pkg]]
deps = ["Artifacts", "Dates", "Downloads", "FileWatching", "LibGit2", "Libdl", "Logging", "Markdown", "Printf", "REPL", "Random", "SHA", "Serialization", "TOML", "Tar", "UUIDs", "p7zip_jll"]
uuid = "44cfe95a-1eb2-52ea-b672-e2afdf69b78f"
version = "1.9.2"
version = "1.6.3"

[[deps.PrecompileTools]]
deps = ["Preferences"]
Expand All @@ -219,12 +190,8 @@ version = "1.4.1"
deps = ["Unicode"]
uuid = "de0858da-6303-5e67-8744-51eddeeeb8d7"

[[deps.REPL]]
deps = ["InteractiveUtils", "Markdown", "Sockets", "Unicode"]
uuid = "3fa0cd96-eef1-5676-8a61-b3b8758bbffb"

[[deps.Random]]
deps = ["SHA", "Serialization"]
deps = ["SHA"]
uuid = "9a3f8284-a2c9-5f02-9a11-845980a1fd5c"

[[deps.SHA]]
Expand All @@ -234,23 +201,21 @@ version = "0.7.0"
[[deps.Serialization]]
uuid = "9e88b42a-f829-5b0c-bbe9-9e923198166b"

[[deps.Sockets]]
uuid = "6462fe0b-24de-5631-8697-dd941f90decc"

[[deps.SortingAlgorithms]]
deps = ["DataStructures"]
git-tree-sha1 = "5165dfb9fd131cf0c6957a3a7605dede376e7b63"
git-tree-sha1 = "66e0a8e672a0bdfca2c3f5937efb8538b9ddc085"
uuid = "a2af1166-a08f-5f64-846c-94a0d3cef48c"
version = "1.2.0"
version = "1.2.1"

[[deps.SparseArrays]]
deps = ["Libdl", "LinearAlgebra", "Random", "Serialization", "SuiteSparse_jll"]
uuid = "2f01184e-e22b-5df5-ae63-d93ebab69eaf"
version = "1.10.0"

[[deps.Statistics]]
deps = ["LinearAlgebra", "SparseArrays"]
uuid = "10745b16-79ce-11e8-11f9-7d13ad32a3b2"
version = "1.9.0"
version = "1.10.0"

[[deps.StatsAPI]]
deps = ["LinearAlgebra"]
Expand All @@ -270,44 +235,27 @@ uuid = "354b36f9-a18e-4713-926e-db85100087ba"
version = "1.3.3"

[[deps.SuiteSparse_jll]]
deps = ["Artifacts", "Libdl", "Pkg", "libblastrampoline_jll"]
deps = ["Artifacts", "Libdl", "libblastrampoline_jll"]
uuid = "bea87d4a-7f5b-5778-9afe-8cc45184846c"
version = "5.10.1+6"
version = "7.2.1+1"

[[deps.TOML]]
deps = ["Dates"]
uuid = "fa267f1f-6049-4f14-aa54-33bafae1ed76"
version = "1.0.3"

[[deps.Tar]]
deps = ["ArgTools", "SHA"]
uuid = "a4e569a6-e804-4fa4-b0f3-eef7a1d5b13e"
version = "1.10.0"

[[deps.Test]]
deps = ["InteractiveUtils", "Logging", "Random", "Serialization"]
uuid = "8dfed614-e22c-5e08-85e1-65c5234f0b40"

[[deps.TestItemRunner]]
deps = ["Pkg", "TOML", "Test", "TestItems", "UUIDs"]
git-tree-sha1 = "7351f1f7389e048ce974b2c176513b817c94b15f"
uuid = "f8b46487-2199-4994-9208-9a1283c18c0a"
version = "0.2.2"

[[deps.TestItems]]
git-tree-sha1 = "8621ba2637b49748e2dc43ba3d84340be2938022"
uuid = "1c621080-faea-4a02-84b6-bbd5e436b8fe"
version = "0.1.1"

[[deps.TranscodingStreams]]
git-tree-sha1 = "1fbeaaca45801b4ba17c251dd8603ef24801dd84"
uuid = "3bb67fe8-82b1-5028-8e26-92a6c54297fa"
version = "0.10.2"
weakdeps = ["Random", "Test"]

[deps.TranscodingStreams.extensions]
TestExt = ["Test", "Random"]

[deps.TranscodingStreams.weakdeps]
Random = "9a3f8284-a2c9-5f02-9a11-845980a1fd5c"
Test = "8dfed614-e22c-5e08-85e1-65c5234f0b40"

[[deps.Twiddle]]
git-tree-sha1 = "29509c4862bfb5da9e76eb6937125ab93986270a"
uuid = "7200193e-83a8-5a55-b20d-5d36d44a0795"
Expand All @@ -321,35 +269,15 @@ uuid = "cf7118a7-6976-5b1a-9a39-7adc72f591a4"
uuid = "4ec0a83e-493e-50e2-b9ac-8f72acf5a8f5"

[[deps.VectorizedKmers]]
git-tree-sha1 = "efb4ffc102a47fce6d9ad94c7689a7c65b408db8"
git-tree-sha1 = "eaf497f1b720ae17dc52463dfe5fed5f74b0e4df"
uuid = "2ef45bd6-4c2b-43d8-88b3-40597287359a"
version = "0.7.0"
version = "0.8.1"
weakdeps = ["BioSequences"]

[deps.VectorizedKmers.extensions]
BioSeqCUDAExt = ["BioSequences", "CUDA"]
BioSequencesExt = "BioSequences"
CUDAExt = "CUDA"

[deps.VectorizedKmers.weakdeps]
BioSequences = "7e6ae17a-c86d-528c-b3b9-7f778a29fe59"
CUDA = "052768ef-5323-5732-b1bb-66c8b64840ba"

[[deps.Zlib_jll]]
deps = ["Libdl"]
uuid = "83775a58-1f1d-513f-b197-d71354ab007a"
version = "1.2.13+0"

[[deps.libblastrampoline_jll]]
deps = ["Artifacts", "Libdl"]
uuid = "8e850b90-86db-534c-a0d3-1478176c7d93"
version = "5.8.0+0"

[[deps.nghttp2_jll]]
deps = ["Artifacts", "Libdl"]
uuid = "8e850ede-7688-5339-a07c-302acd2aaf8d"
version = "1.52.0+1"

[[deps.p7zip_jll]]
deps = ["Artifacts", "Libdl"]
uuid = "3f19e933-33d8-53b3-aaab-bd5110c3b7a0"
version = "17.4.0+0"
version = "5.8.0+1"
15 changes: 5 additions & 10 deletions Project.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
name = "GeneFinder"
uuid = "2bc6ee46-2158-4f5a-a720-91cb2d7cee64"
authors = ["Camilo García"]
authors = ["Camilo García-Botero"]
version = "0.0.23"

[deps]
Expand All @@ -11,22 +11,17 @@ FASTX = "c2308a5c-f048-11e8-3e8a-31650f418d12"
IterTools = "c8e1da08-722c-5040-9ed9-7db0dc04731e"
PrecompileTools = "aea7be01-6a6a-4083-8856-8a6e6704d82a"
StatsBase = "2913bbd2-ae8a-5f71-8c99-4fb6c76f3a91"
TestItemRunner = "f8b46487-2199-4994-9208-9a1283c18c0a"
TestItems = "1c621080-faea-4a02-84b6-bbd5e436b8fe"

[compat]
BioSequences = "^3"
FASTX = "^2"
BioSequences = "3"
FASTX = "2"
IterTools = "1.4"
PrecompileTools = "1"
StatsBase = "^0.34.0"
TestItemRunner = "0.2"
TestItems = "0.1"
julia = "^1.6.0"
StatsBase = "0.34.0"
julia = "1"

[extras]
Test = "8dfed614-e22c-5e08-85e1-65c5234f0b40"
TestItemRunner = "f8b46487-2199-4994-9208-9a1283c18c0a"

[targets]
test = ["Test"]
9 changes: 4 additions & 5 deletions src/GeneFinder.jl
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
module GeneFinder

using Automa: RegExp
using BioSequences:
DNA,
DNA_Gap, DNA_A, DNA_C, DNA_M, DNA_G, DNA_R, DNA_S, DNA_V, DNA_T, DNA_W, DNA_Y, DNA_H, DNA_K, DNA_D, DNA_B, DNA_N,
Expand All @@ -15,14 +14,15 @@ using BioSequences:
@biore_str,
@dna_str,
GeneticCode,
reverse_complement
reverse_complement,
randdnaseq


using BioMarkovChains: BioMarkovChain
using FASTX: FASTA, sequence, FASTAReader
using IterTools: takewhile, iterated
using PrecompileTools: @setup_workload, @compile_workload
using StatsBase: countmap
using TestItems: @testitem

include("types.jl")
export ORF
Expand All @@ -41,14 +41,13 @@ include("extended.jl")
@setup_workload begin
# Putting some things in `@setup_workload` instead of `@compile_workload` can reduce the size of the
# precompile file and potentially make loading faster.
using BioSequences
seq = randdnaseq(99)
@compile_workload begin
# all calls in this block will be precompiled, regardless of whether
# they belong to your package or not (on Julia 1.8 and higher)
findorfs(seq)
getorfdna(seq)
getorfaa(seq)
# getorfaa(seq)
end
end

Expand Down
Loading

0 comments on commit 698e565

Please sign in to comment.