Giter Site home page Giter Site logo

Remove metadata option about pagoo HOT 3 OPEN

iferres avatar iferres commented on May 28, 2024
Remove metadata option

from pagoo.

Comments (3)

iferres avatar iferres commented on May 28, 2024

Hi @g1o thanks for reporting this. It is actually fixed in the latest version, but not in CRAN. I should push it as soon as possible.
Please reinstall pagoo using:

devtools::install_github("iferres/pagoo")

Then you can use the $add_metadata() method to overwrite existing columns.
Let me know if this solves your problem.

from pagoo.

iferres avatar iferres commented on May 28, 2024

See #44

from pagoo.

iferres avatar iferres commented on May 28, 2024

Hi again @g1o , yesterday I was just leaving so I read the issue very quickly and I didn't consider the possibility of removing metadata. It's true a method to remove metadata should exist. Now it's only possible to modify columns:

library(pagoo)
toy_rds <- system.file('extdata', 'campylobacter.RDS', package = 'pagoo')
a <- load_pangenomeRDS(toy_rds)
df <- a$organisms
df$country <- "Brazil"
a$add_metadata(map = "org", as.data.frame(df))
a$organisms # Now all organisms are from Brazil (country column)
DataFrame with 7 rows and 8 columns
         org          id      strain      year     country        host      source   accession
    <factor> <character> <character> <integer> <character> <character> <character> <character>
1 16244_6_6         FR15   2008/170h      2008      Brazil       Human       Feces   ERS672247
2 16244_6_18        FR27   2012/185h      2012      Brazil       Human       Blood   ERS672259
3 17059_2_16         AR1      99/801      1999      Brazil      Bovine     Prepuce   ERS739235
4 17059_2_23         AR8      04/875      2004      Brazil      Bovine       Fetus   ERS739242
5 17059_2_27        AR12      06/195      2006      Brazil      Bovine          VM   ERS739246
6 17150_1_73         CA1   001A-0374      2005      Brazil       Human       Blood   ERS686652
7 17059_2_42         TW6        1830      2008      Brazil       Human       Blood   ERS739261

.. but a method to remove columns is needed.
I will leave this issue open and I will try to address it in the next release.
Thanks again!

from pagoo.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.