Skip to content

Commit

Permalink
revert append, add feature_req
Browse files Browse the repository at this point in the history
  • Loading branch information
pdimens committed Oct 18, 2021
1 parent 27701c1 commit 284aa97
Showing 1 changed file with 7 additions and 3 deletions.
10 changes: 7 additions & 3 deletions src/Utils.jl
Original file line number Diff line number Diff line change
Expand Up @@ -84,16 +84,18 @@ PopData{Diploid, 9 Microsatellite Loci}
```
"""
function append(data::PopData, data2::PopData)
#=
new_pdi = deepcopy(data.info)
append!(new_pdi.sampleinfo, data2.sampleinfo)
new_pdi.samples = data.info.samples + data2.info.samples
new_pdi.populations = length(unique(new_pdi.sampleinfo.population))
ploid = vcat(data.metadata.ploidy, data2.metadata.ploidy)
new_pdi.ploidy = length(unique(ploid)) == 1 ? ploid[1] : Int8[unique(ploidy)]
PopData(new_pdi, vcat(data.genodata, data2.genodata))
#tmp = copy(data)
#append!(tmp, data2)
#return tmp
=#
tmp = copy(data)
append!(tmp, data2)
return tmp
end


Expand Down Expand Up @@ -138,3 +140,5 @@ julia> simulate_sample(alleles, loc, ploidy = 2)
function simulate_sample(alleles::Dict{String,<:Tuple}, loc::Vector{String}; ploidy::Signed)
map(i -> rand(alleles[i], ploidy), loc)
end

feature_req() = "\nPlease open an Issue or Pull Request on https://www.github.com/pdimens/PopGenSims.jl if you would like this feature implemented"

0 comments on commit 284aa97

Please sign in to comment.