Skip to content

Commit

Permalink
update docstrings
Browse files Browse the repository at this point in the history
  • Loading branch information
pdimens committed Jul 27, 2021
1 parent e53cd99 commit 8343e79
Show file tree
Hide file tree
Showing 3 changed files with 22 additions and 36 deletions.
8 changes: 4 additions & 4 deletions src/Samples.jl
Original file line number Diff line number Diff line change
Expand Up @@ -43,17 +43,17 @@ allele frequencies derived from a `PopData` object. Returns a new `PopData` obje
**Example**
```julia
cats = nancycats();
cats = @nanycats;
julia> sims = simulate(cats , n = 100)
PopData Object
Markers: Microsatellite
9 Microsatellite Loci
Ploidy: 2
Samples: 1700
Loci: 9
Populations: 17
Coordinates: absent
julia> sims.meta
julia> sims.meta
1700×5 DataFrame
Row │ name population ploidy longitude latitude
Expand Down
8 changes: 3 additions & 5 deletions src/Sibship.jl
Original file line number Diff line number Diff line change
Expand Up @@ -163,17 +163,15 @@ there's a 50% chance parent_1 will give 2 alleles for every locus for that simul
**Example**
```
julia> cats = nancycats() ;
julia> cats = @nanycats ;
julia> fullsib_sims = simulate_sibship(cats, n = 50, relationship= "fullsib")
PopData Object
Markers: Microsatellite
9 Microsatellite Loci
Ploidy: 2
Samples: 100
Loci: 9
Populations: 1
Longitude: absent
Latitude: absent
Coordinates: absent
julia> fullsib_sims.meta_df100×5 DataFrame
│ Row │ name │ population │ ploidy │ longitude │ latitude │
Expand Down
42 changes: 15 additions & 27 deletions src/Utils.jl
Original file line number Diff line number Diff line change
Expand Up @@ -9,37 +9,31 @@ the two `PopData` objects do not have identical loci.
**Example**
```
julia> cats = nancycats()
julia> cats = @nancycats
PopData Object
Markers: Microsatellite
9 Microsatellite Loci
Ploidy: 2
Samples: 237
Loci: 9
Populations: 17
Longitude: absent
Latitude: absent
Coordinates: absent
julia> purrfect_pairs = cross(cats, "N200", "N7", generation = "F1")
PopData Object
Markers: Microsatellite
9 Microsatellite Loci
Ploidy: 2
Samples: 100
Loci: 9
Populations: 1
Longitude: absent
Latitude: absent
Coordinates: absent
julia> append!(cats, purrfect_pairs);
julia> cats
PopData Object
Markers: Microsatellite
9 Microsatellite
Ploidy: 2
Samples: 337
Loci: 9
Populations: 18
Longitude: absent
Latitude: absent
Coordinates: absent
```
"""
function Base.append!(data::PopData, data2::PopData)
Expand Down Expand Up @@ -73,35 +67,29 @@ objects do not have identical loci.
**Example**
```
julia> cats = nancycats()
julia> cats = @nanycats
PopData Object
Markers: Microsatellite
9 Microsatellite Loci
Ploidy: 2
Samples: 237
Loci: 9
Populations: 17
Longitude: absent
Latitude: absent
Coordinates: absent
julia> purrfect_pairs = cross(cats, "N200", "N7", generation = "F1")
PopData Object
Markers: Microsatellite
9 Microsatellite Loci
Ploidy: 2
Samples: 100
Loci: 9
Populations: 1
Longitude: absent
Latitude: absent
Coordinates: absent
julia> merged_cats = append(cats, purrfect_pairs)
PopData Object
Markers: Microsatellite
9 Microsatellite Loci
Ploidy: 2
Samples: 337
Loci: 9
Populations: 18
Longitude: absent
Latitude: absent
Coordinates: absent
```
"""
function append(data::PopData, data2::PopData)
Expand Down Expand Up @@ -154,7 +142,7 @@ an individual with a given `ploidy`. Returns a Vector of genotypes.
**Example**
```
julia> cats = nancycats() ;
julia> cats = @nanycats ;
julia> loc, alleles = allele_pool(cats) ;
julia> simulate_sample(alleles, loc, ploidy = 2)
9-element Array{Array{Int16,1},1}:
Expand Down

0 comments on commit 8343e79

Please sign in to comment.