From 12520a5a491882b31eb602f09d15c4120d70977f Mon Sep 17 00:00:00 2001 From: PharmCat <13901158+PharmCat@users.noreply.github.com> Date: Sun, 11 Dec 2022 21:10:38 +0300 Subject: [PATCH 1/3] getindex --- src/types.jl | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/types.jl b/src/types.jl index 5973ded..f5a6e40 100644 --- a/src/types.jl +++ b/src/types.jl @@ -210,6 +210,9 @@ function Base.getindex(d::DataSet, ind::Int) d.ds[ind] end +Base.getindex(d::DataSet, inds::UnitRange{Int64}) = subset(d, inds) + + @inline function getresultindex_safe(rd::T, ind::Symbol) where T <: AbstractResultData getindormiss(rd.result, ind) end From 79c025c49f913ba96f54b56054ea6a4924719c38 Mon Sep 17 00:00:00 2001 From: PharmCat <13901158+PharmCat@users.noreply.github.com> Date: Sun, 11 Dec 2022 22:18:33 +0300 Subject: [PATCH 2/3] update --- src/types.jl | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/src/types.jl b/src/types.jl index f5a6e40..1910df8 100644 --- a/src/types.jl +++ b/src/types.jl @@ -353,6 +353,19 @@ function uniqueidlist(d::DataSet{T}, list::Symbol) where T <: AbstractIdData end dl end +#= +function uniqueidlist(d::DataSet{T}) where T <: AbstractIdData + dl = Vector{Dict}(undef, 0) + for i in d + id = getid(i) + if id ∉ dl push!(dl, id) end + end + dl +end +=# +function uniqueidlist(::DataSet{T}, ::Nothing) where T <: AbstractIdData + nothing +end function subset(d::DataSet{T}, sort::Dict) where T <: AbstractIdData From a29c5296107f2391392d479f4eb8f288760d907f Mon Sep 17 00:00:00 2001 From: PharmCat <13901158+PharmCat@users.noreply.github.com> Date: Sun, 11 Dec 2022 22:20:08 +0300 Subject: [PATCH 3/3] update --- Project.toml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Project.toml b/Project.toml index 4a59b38..52e8a97 100644 --- a/Project.toml +++ b/Project.toml @@ -1,7 +1,7 @@ name = "MetidaBase" uuid = "075456b7-4006-432f-9324-2f8453996c49" authors = ["PharmCat and contributors"] -version = "0.10.1" +version = "0.10.2" [deps] CategoricalArrays = "324d7699-5711-5eae-9e2f-1d82baa6b597" @@ -16,7 +16,7 @@ CPUSummary = "2a0fbf3d-bb9c-48f3-b0a9-814d99fd7ab9" [compat] CategoricalArrays = "0.8, 0.9, 0.10" -DataFrames = "0.22, 1" +DataFrames = "1" Distributions = "0.20, 0.21, 0.22, 0.23, 0.24, 0.25" StatsBase = "0.29, 0.30, 0.31, 0.32, 0.33" StatsModels = "0.6"