Skip to content

Commit

Permalink
remove uses of metadata() (#107)
Browse files Browse the repository at this point in the history
Co-authored-by: Kevin Bonham <[email protected]>
  • Loading branch information
kescobo and Kevin Bonham authored Feb 2, 2023
1 parent 9a753ff commit b7e2243
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 6 deletions.
4 changes: 2 additions & 2 deletions Project.toml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ keywords = ["microbiology", "microbiome", "biology", "metagenomics"]
license = "MIT"
desc = "Convenience functions for working with the bioBakery"
authors = ["kescobo <[email protected]>", "annelle-abatoni <[email protected]>", "anikaluo <[email protected]>", "Vanja Klepac-Ceraj <[email protected]>"]
version = "0.6"
version = "0.7.0"

[deps]
CSV = "336ed68f-0bac-5ca0-87d4-7b16caf5d00b"
Expand All @@ -18,7 +18,7 @@ Tables = "bd369af6-aec1-5ad0-b16a-f7cc5008161c"
[compat]
CSV = "0.8, 0.9, 0.10"
Conda = "1.5"
Microbiome = "0.9"
Microbiome = "0.9.4,0.10"
Reexport = "0.2, 1"
ReTest = "0.3"
Tables = "1.2.1"
Expand Down
4 changes: 2 additions & 2 deletions docs/src/metaphlan.md
Original file line number Diff line number Diff line change
Expand Up @@ -317,7 +317,7 @@ SRS014459, SRS014464, SRS014470...SRS014476, SRS014494
julia> metadata(mps3)
julia> get(mps3)
6-element Vector{NamedTuple{(:sample, :STSite, :filename), Tuple{String, String, String}}}:
(sample = "SRS014459", STSite = "Stool", filename = "SRS014459-Stool_profile.tsv")
(sample = "SRS014464", STSite = "Anterior_nares", filename = "SRS014464-Anterior_nares_profile.tsv")
Expand Down Expand Up @@ -396,7 +396,7 @@ but there are [many other options](https://juliahub.com/ui/Search?q=plotting&typ
julia> using CairoMakie
julia> sites = [m.STSite for m in metadata(mps3)]
julia> sites = [m.STSite for m in get(mps3)] # or get(m, :STSite)
6-element Vector{String}:
"Stool"
"Anterior_nares"
Expand Down
4 changes: 2 additions & 2 deletions src/humann.jl
Original file line number Diff line number Diff line change
Expand Up @@ -231,7 +231,7 @@ from a `CommunityProfile` with metadata attached to the samples.
or a vector of symbols.
"""
function write_pcl(path, comm::CommunityProfile; usemetadata=:all)
coltab = Tables.columntable(metadata(comm))
coltab = Tables.columntable(get(comm))
if usemetadata == :all
usemetadata = collect(keys(coltab))
popfirst!(usemetadata)
Expand Down Expand Up @@ -269,7 +269,7 @@ function humann_barplot(comm::CommunityProfile, outpath; kwargs...)
write_pcl(tmp, comm)

cmd = ["humann_barplot", "--i", tmp, "-o", outpath,
"--last-metadata", string(last(keys(first(metadata(comm)))))]
"--last-metadata", string(last(keys(first(get(comm)))))]

add_cli_kwargs!(cmd, kwargs; optunderscores=false)
run(Cmd(cmd))
Expand Down

2 comments on commit b7e2243

@kescobo
Copy link
Member Author

@kescobo kescobo commented on b7e2243 Feb 2, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@JuliaRegistrator
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Registration pull request created: JuliaRegistries/General/76866

After the above pull request is merged, it is recommended that a tag is created on this repository for the registered package version.

This will be done automatically if the Julia TagBot GitHub Action is installed, or can be done manually through the github interface, or via:

git tag -a v0.7.0 -m "<description of version>" b7e2243e59aa493a7f56bf2336e111b101c0f2d3
git push origin v0.7.0

Please sign in to comment.