Skip to content

Commit

Permalink
📚 README
Browse files Browse the repository at this point in the history
  • Loading branch information
tpoisot committed Apr 17, 2019
1 parent e1464de commit 81107f9
Showing 1 changed file with 0 additions and 41 deletions.
41 changes: 0 additions & 41 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,44 +12,3 @@ database was funded by the [Canadian Foundation for Innovation][cfi] and
[cfi]: https://www.innovation.ca/
[nserc]: http://www.nserc-crsng.gc.ca/index_eng.asp
[jl]: https://julialang.org/

#### Short introduction

This version is currently *not* tagged, you can install the package from the Pkg
mode (`]`) with:

~~~
add https://github.com/PoisotLab/Mangal.jl
~~~

To get a list of datasets,

~~~ julia
datasets()
~~~

To get networks within a given dataset,

~~~ julia
networks(dataset(10))
~~~

#### Counting objects

~~~ julia
using Mangal

base_q = ["type" => "parasitism"]

n_parasitism = count(MangalInteraction, base_q...)
page_size = 200
n_pages = ceil(n_parasitism/page_size)
parasitism_int = MangalInteraction[]
@progress for p in 1:n_pages
@info "Starting page $p"
paging_q = ["count" => "$page_size", "page" => "$p"]
append!(paging_q, base_q)
append!(parasitism_int, interactions(paging_q...))
@info "Page $p -- $length(parasitism_int) done"
end
~~~

0 comments on commit 81107f9

Please sign in to comment.