Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

A few tweaks to allow my server to run #19

Open
wants to merge 3 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions src/output_formats.jl
Original file line number Diff line number Diff line change
Expand Up @@ -197,6 +197,7 @@ function write_result(config::ChloeConfig, target::FwdRev{CircularSequence}, res
if ~config.no_gff || config.gbk || config.embl
biojulia = chloe2biojulia(result)
if ~config.no_gff
biojulia.sequence = dna""
out = filestem * ".chloe.gff"
GFF.printgff(out, biojulia)
end
Expand Down
6 changes: 2 additions & 4 deletions src/reference.jl
Original file line number Diff line number Diff line change
@@ -1,7 +1,5 @@
include("globals.jl")

const KWARGS = ["no_transform", "sensitivity", "asgff3", "no_filter", "reference"]

struct ChloeConfig
no_transform::Bool
sensitivity::Float64
Expand All @@ -23,10 +21,10 @@ struct ChloeConfig
)
return new(no_transform, sensitivity, sff, no_gff, gbk, embl, no_filter, reference)
end

# needs to be V <: Any since this is coming from a JSON blob
function ChloeConfig(dict::Dict{String,V} where {V<:Any})
return ChloeConfig(; Dict(Symbol(k) => v for (k, v) in dict if k in KWARGS)...)
fields = fieldnames(ChloeConfig)
return ChloeConfig(; Dict(Symbol(k) => v for (k, v) in dict if Symbol(k) in fields)...)
end
end

Expand Down