---
title: "Edit existing GWAS meta data"
output: rmarkdown::html_vignette
vignette: >
  %\VignetteIndexEntry{Edit existing GWAS meta data}
  %\VignetteEngine{knitr::rmarkdown}
  %\VignetteEncoding{UTF-8}
---

```{r, include = FALSE}
knitr::opts_chunk$set(
  collapse = TRUE,
  comment = "#>"
)
```

```{r setup}
library(GwasDataImport)
```

Create meta

```{r, eval=FALSE}
y <- Dataset$new(igd_id = id)
y$collect_metadata(
  list(
    trait = "updated trait",
    build = "HG19/GRCh37",
    category = "NA",
    subcategory = "NA",
    group_name = "public",
    population = "European",
    sex = "Males",
    note = 'asdasd'
  )
)
y$api_metadata_edit()
y$api_metadata_check() %>% httr::content()
y$collect_metadata(
  list(
    trait = "updated trait again",
    build = "HG19/GRCh37",
    category = "NA",
    subcategory = "NA",
    group_name = "public",
    population = "European",
    sex = "Males",
    note = 'asdasd'
  )
)
y$api_metadata_edit()
y$api_metadata_check() %>% httr::content()
```
