diff --git a/introduction/getting-started/index.md b/introduction/getting-started/index.md index 5e90177..297d645 100644 --- a/introduction/getting-started/index.md +++ b/introduction/getting-started/index.md @@ -2,7 +2,7 @@ ## Overview -Using **`dms-viz`** involves two steps. First, using a command line tool called [`configure-dms-viz`](https://pypi.org/project/configure-dms-viz/), you specifcy some information about your dataset to generate a `.json` format specification file. Second, you open up the [web-based tool](https://dms-viz.github.io/) and upload your specification file to generate a visualization. Below are some quickstart instructions to get you oriented. +Using **`dms-viz`** involves two steps. First, using a command line tool called [`configure-dms-viz`](https://pypi.org/project/configure-dms-viz/), you specifcy some information about your dataset to generate a `.json` format specification file. Second, you open up the [web-based tool](https://dms-viz.github.io/) and upload your specification file to generate an interactive visualization. Below are some quickstart instructions to get you oriented. ::: tip Want to Skip Ahead? If you're insterested in the detailed command line API, check out the reference [here](/preparing-data/command-line-api/). If you've already formatted your data and you're ready to start visualizing it, check out the instructions for that [here](/visualizing-data/web-tool-api/). @@ -46,16 +46,16 @@ You should see the help message for the tool printed to the terminal. ## Basic Usage -`configure_dms_viz` is a command-line tool designed to create a `.json` format specification file for **`dms-viz`**. You provide the data that you'd like to visualize along with additional information to customize the analysis. The resulting specification file can be uploaded to [**`dms-viz`**](https://dms-viz.github.io/) for interactive visualization of your data. Below is an overview of the process of using `configure_dms_viz`. +`configure_dms_viz` is a command-line tool designed to create a `JSON` format specification file for **`dms-viz`**. You provide the data that you'd like to visualize along with additional information to customize the analysis. The resulting specification file can be uploaded to [**`dms-viz`**](https://dms-viz.github.io/) for interactive visualization of your data. Below is an overview of the process of using `configure_dms_viz`. ::: tip Looking for more details? -For a detailed explaination of the features of `configure_dms_viz` as well as the command line API check out the reference [here](/preparing-data/command-line-api/). +For a detailed explaination of the features of `configure_dms_viz` check out the reference [here](/preparing-data/command-line-api/). ::: -To format your data, you execute the `configure-dms-viz` command with the required and optional arguments as needed: +`configure-dms-viz` has two commands, `format` and `join`. To format a single dataset for **`dms-viz`**, you execute the `configure-dms-viz format` command with the required and optional arguments as needed: ```bash -configure-dms-viz \ +configure-dms-viz format \ --name \ --input \ --metric \ @@ -85,7 +85,7 @@ Now, let's use `configure-dms-viz` on some example data. This data is included i **Input** ```bash -configure-dms-viz \ +configure-dms-viz format \ --name LyCoV-1404 \ --input tests/sars2/escape/LyCoV-1404_avg.csv \ --sitemap tests/sars2/site_numbering_map.csv \ @@ -121,7 +121,11 @@ About 11.96% of the data sites are missing from the structure. Success! The visualization json was written to 'tests/sars2/output/LyCoV-1404.json' ``` -This message provides some information about the `configure-dms-viz` run on your dataset. In addition to this message, there should be a `.json` file located where you specified the output path ([`tests/sars2/output/LyCoV-1404.json`](https://github.com/dms-viz/configure_dms_viz/blob/main/tests/sars2/output/LyCoV-1404.json)). In the next section, you'll take this `.json` visualization file and visualize your data with [**`dms-viz`**](https://dms-viz.github.io/). +This message provides some information about the `configure-dms-viz format` run on your dataset. In addition to this message, there should be a `.json` file located where you specified the output path ([`tests/sars2/output/LyCoV-1404.json`](https://github.com/dms-viz/configure_dms_viz/blob/main/tests/sars2/output/LyCoV-1404.json)). + +This is how you can use `configure-dms-viz` to format a single dataset. You can optionally combine multiple datasets into a single `.json` specification file using the `configure-dms-viz join` command. this command takes a list of `.json` files as an arguments along with an optional description of the datasets. For more details on combining datasets, check out the [API](/preparing-data/command-line-api). + +For now, since we're only visualizing a single dataset, we can skip this step. In the next section, you'll take this `.json` visualization file and visualize your data with [**`dms-viz`**](https://dms-viz.github.io/). ## Visualizing @@ -151,4 +155,4 @@ You can try yourself by pasting the following link into the URL text box: https://raw.githubusercontent.com/dms-viz/configure_dms_viz/main/tests/sars2/output/sars2.json ``` -This approach has some advantages. For example, after providing a link to your data, this link is saved in the URL, allowing you to share a view of **`dms-viz`** with the data pre-loaded and ready to view. Also, this approach allows you to proivde a markdown description (also hosted remotely) of the datasets. For more details on using the web-based portion of **`dms-viz`** including hosting, interacting, and sharing your files, check out the [interaction reference](/visualizing-data/web-tool-api/). +This approach has some advantages. For example, after providing a link to your data, this link is saved in the URL, allowing you to share a view of **`dms-viz`** with the data pre-loaded and ready to view. For more details on using the web-based interface of **`dms-viz`** including hosting, interacting, and sharing your files, check out the [interaction reference](/visualizing-data/web-tool-api/). diff --git a/introduction/what-is-dms-viz/index.md b/introduction/what-is-dms-viz/index.md index 3d4fbe7..e920c9c 100644 --- a/introduction/what-is-dms-viz/index.md +++ b/introduction/what-is-dms-viz/index.md @@ -1,6 +1,6 @@ # What is dms-viz? -Hi there 👋, if you've got some mutation-level data that you want to view on an interactive 3D protein structure, you're in the right place! **`dms-viz`** is a suite of tools that help you take quantitative data associated with mutations to a protein and analyze that data using intutive visual summaries in the context of a 3D protein structure. Visualizations created with **`dms-viz`** are intended to be _flexible_, _customizable_, and _shareable_. +Hi there 👋, if you've got some mutation-level data that you want to view on an interactive 3D protein structure, you're in the right place! **`dms-viz`** is a tool that helps you take quantitative data associated with mutations to a protein and analyze that data using intutive visual summaries in the context of an interactive 3D protein structure. Visualizations created with **`dms-viz`** are intended to be _flexible_, _customizable_, and _shareable_. ::: tip Ready to use the tool? You can skip to the [Quickstart](/introduction/getting-started/) to learn how to prepare your own data, or you can see what the visualization tool looks like [here](https://dms-viz.github.io/). @@ -8,23 +8,23 @@ You can skip to the [Quickstart](/introduction/getting-started/) to learn how to ## Purpose -Understanding the repercussions of mutations on a protein's structure, function, and evolutionary trajectory is invaluable, especially in the realm of infectious disease research. The advancement of high-throughput techniques, such as deep-mutational scanning (_the 'DMS' which lends this project its name_), coupled with the expansion of viral surveillance sequencing, has massivley increased our access to data on the impacts of various mutations in proteins across different contexts. Increasingly, studies leverage this pool of data to accomplish a range of objectives, from mapping antibody and serum escape by viral glycoproteins \[[1]()\] to determining the influence of numerous mutations on viral fitness \[[2]()\], inferring viral fitness from extensive phylogenies \[[3]()\], and understanding the fluctuating effects of mutations as a result of epistasis \[[4]()\]. +Understanding how mutations impact a protein's functions is valuable for many types of biological questions. High-throughput techniques such as deep-mutational scanning (DMS) have greatly expanded the number of mutation-function datasets. For instance, DMS has been used to determine how mutations to viral proteins affect antibody escape, receptor affinity, and essential functions such as viral genome transcription and replication. -To further facilitate the analysis of mutation-level data, we have developed **`dms-viz`**, envisioned as the successor to the remarkable tool [**`dms-view`**](https://dms-view.github.io/). The latter pioneered the integration of summary visualizations with interactive 3D protein structures, streamlining the workflow for analyzing mutation-level data. Building on the strengths of **`dms-view`**, we aimed to create a tool that was _adaptable_ to various types of input data, offering enhanced _customization_ options through the addition of filters and other manipulations. Furthermore, we preserved the _shareable_ links that were a feature of dms-view, while also incorporating the functionality to utilize privately stored local data, enhancing both accessibility and privacy. +The mutation-based data generated by these approaches is often best understood in the context of a protein’s 3D structure; for instance, to assess questions like how mutations that affect antibody escape relate to the physical antibody binding epitope on the protein. However, current approaches for visualizing mutation data in the context of a protein’s structure are often cumbersome and require multiple steps and softwares. To streamline the visualization of mutation-associated data in the context of a protein structure, we developed a web-based tool, **`dms-viz`**. With **`dms-viz`**, users can straightforwardly visualize mutation-based data such as those from DMS experiments in the context of a 3D protein model in an interactive format. ## Why use dms-viz? - **Flexible Inputs** - Utilize our command-line tool, `configure-dms-viz`, to streamline data formatting effortlessly. It facilitates the integration of data from varied sources into a singular, universal `.json` specification file. Moreover, this tool makes it easy to incorporate additional datasets from different locations, stipulate custom filters and tooltips, and identify common errors. + Our command-line tool, `configure-dms-viz`, helps streamline data formatting by facillitating the integration of data from different sources into a singular, universal `JSON` specification file. Moreover, `configure-dms-viz` helps you define custom filters and tooltips, and identify common errors. - **Customizable Visualizations** - Experience unparalleled customization with your visualizations. You have the liberty to select the appearance of the protein structure, visualize multiple conditions per dataset, and extend functionalities with custom filters, tooltips, and beyond. + We've designed **`dms-viz`** with customization in mind. You can tailor the appearance of the protein structure to fit your needs. Futhermore, you can extend the functionality of the tool with custom filters, tooltips, colors, and more. - **Shareable URLs** - Should your data be hosted online (like in a [GitHub](https://github.com/) repository), sharing becomes a breeze with URLs that can automatically load the visualizations. Moreover, these URLs retain the configuration settings of your visualization, enhancing the sharing experience. However, if you don't want to host your data online, you can still use **`dms-viz`** on your local files. + If your data is hosted online (e.g. in a [GitHub](https://github.com/) repository), you can share your data with URLs that automatically load the visualization while keeping your settings. However, if you don't want to host your data online, you can still use **`dms-viz`** with locally stored `.json` files. ## Development diff --git a/preparing-data/command-line-api/index.md b/preparing-data/command-line-api/index.md index 37a5446..3848f82 100644 --- a/preparing-data/command-line-api/index.md +++ b/preparing-data/command-line-api/index.md @@ -1,13 +1,13 @@ -# Command Line Interface +# Command Line API ## Basic Usage -`configure_dms_viz` is a command-line tool designed to create a `.JSON` format specification file for [**`dms-viz`**](https://dms-viz.github.io/). You provide the data that you'd like to visualize along with additional information to customize the analysis. The resulting specification file can be uploaded to **`dms-viz`** for interactive visualization of your data. Below is an overview of the process of using `configure_dms_viz`. +`configure_dms_viz` is a command-line tool designed to create a `JSON` format specification file for [**`dms-viz`**](https://dms-viz.github.io/). You provide the data that you'd like to visualize along with additional information to customize the analysis. The resulting specification file can be uploaded to **`dms-viz`** for interactive visualization of your data. Below is an overview of the process of using `configure_dms_viz`. -To format your data, you execute the `configure-dms-viz` command with the required and optional arguments as needed: +`configure-dms-viz` has two commands; `format` and `join`. To format your data, you execute the `configure-dms-viz format` command with the required and optional arguments as needed: ```bash -configure-dms-viz \ +configure-dms-viz format \ --name \ --input \ --metric \ @@ -17,13 +17,24 @@ configure-dms-viz \ [optional_arguments] ``` -## Command Line API +This creates a single dataset that can be loaded into **`dms-viz`**. However, in some cases, you might want to visualize multiple datasets simultaneously. To do this, you use the `configure-dms-viz join` command. The `join` command takes a list of formatted `.json` files and combines them into a single `.json` specification file containing each dataset. Optionally, you can also provide a description of the file by specifying the path to a `.md` file with your desired description: + +```bash +configure-dms-viz join \ + --input \ + --output \ + --description +``` + +## `configure-dms-viz format` + +_This subcommand formats your data for **`dms-viz`**. Below is a description of each arguement._ - ### `--input` `` - Path to a CSV file with site- and mutation-level data to visualize on a protein structure. [See details here](/preparing-data/data-requirements/) for required columns and format. + Path to a `.csv` file with site- and mutation-level data to visualize on a protein structure. [See details here](/preparing-data/data-requirements/) for required columns and format. - ### `--name` @@ -35,7 +46,7 @@ configure-dms-viz \ `` - Path to a CSV file containing a map between reference sites in the experiment and sequential sites. [See details here](/preparing-data/data-requirements/) for required columns and format. + Path to a `.csv` file containing a map between reference sites in the experiment and sequential sites. [See details here](/preparing-data/data-requirements/) for required columns and format. - ### `--metric` @@ -53,7 +64,7 @@ configure-dms-viz \ `` - Path to save the \*.json file containing the data for the visualization tool. + Path to save the `\*.json` file containing the data for the visualization tool. - ### `--condition` @@ -77,7 +88,7 @@ configure-dms-viz \ `` - A comma separated list of CSV file with data to join to the visualization data. This data can then be used in the visualization tooltips or filters. [See details here](/preparing-data/data-requirements/) for formatting requirements. + A comma separated list of `.csv` file with data to join to the visualization data. This data can then be used in the visualization tooltips or filters. [See details here](/preparing-data/data-requirements/) for formatting requirements. - ### `--tooltip-cols` @@ -150,3 +161,26 @@ configure-dms-viz \ `` A short title to appear above the plot. + +## `configure-dms-viz join` + +_This subcommand joins multiple formatted `.json` datasets into one that you can then visualize with **`dms-viz`**. Below is a description of each arguement._ + +- ### `--input` + + `` + + A comma separated list of paths to the `.json` visualization files created by `configure-dms-viz format`. I.e. `--input path/to/my/specification_1.json, path/to/my/specification_2.json, path/to/my/specification_3.json` + +- ### `--output` + + `` + + Path to save the joined `\*.json` file for the visualization tool. + + +- ### `--description` + + `` + + Path to a `markdown` file describing your dataset. diff --git a/preparing-data/data-requirements/index.md b/preparing-data/data-requirements/index.md index bd24bdf..e0ee5c8 100644 --- a/preparing-data/data-requirements/index.md +++ b/preparing-data/data-requirements/index.md @@ -1,10 +1,14 @@ # Data Requirements -There are three main types of data that you'll need to use **`dms-viz`**; your [input data](#input-data), a [map of the sites](#sitemap) in your experiment to a reference and/or protein structure, and _optionally_, some [additional data](#join-data) that you want to join with your input data. Below are details of what this data should look like along with examples. +To use **`dms-viz`**, you'll need two files. First, you'll need some [input data](#input-data) that contains the mutation-based data you'd like to visualize. Second, you'll need [a map](#sitemap) of the sites mutagenized in your dataset to the sites in the reference and protein structure. + +_optionally_, if you have [additional data files](#join-data), you can join these with your input data. + +Below are the detailed requirements for each datafile along with example datasets. ## Input Data -The **Input Data** is the data that you'd like to summarize and visualize on a protein structure. It must contain a column with a quantitative metric that's associated with substitutions in a protein sequence. For example, this data could be a fitness score associated with mutations to a viral protein, or a score that represents how a mutation abrogates antibody binding to a protein. For detailed examples of **`dms-viz`** being used to visualize this kind of data, check out the [Vignettes](/visualizing-data/vignettes/). +The **Input Data** is the data that you'd like to summarize and visualize on an interactive protein structure. It must contain a column with a quantitative metric that's associated with mutations in a protein sequence. For example, this data could be a fitness score associated with mutations to a protein, or a score that represents how a mutation changes antibody binding to an antigen. For detailed examples of **`dms-viz`** in action, check out these [Vignettes](/visualizing-data/vignettes/). ::: warning Important! The input data must be in `.csv` format. If your data is tabular but in another format, please convert it to `.csv`. @@ -14,37 +18,37 @@ The input data must contain the following columns with **exactly** these names: - ### `site` or `reference_site` - This column should contain the **site** in the protein at which each measurement was made. This column can be numeric (i.e., `[1, 2, 3, 4]`) or it can contain strings (i.e., `[1, 2, 2a, 2b, 3]`). Additionally, the sites do not need to be continuous (i.e., `[1, 4, 5, 8]`). The numeric order of your sites will be specified in the [Sitemap](#sitemap). The sites in this column will be displayed on the x-axis of summary plots. + This column should contain the **site** in the protein at which each measurement was made. This column can be numeric (i.e., `[1, 2, 3, 4]`) or it can contain strings (i.e., `[1, 2, 2a, 2b, 3]`). Additionally, the sites do not need to be continuous (i.e., `[1, 4, 5, 8]`). The order of your sites will be specified in the [Sitemap](#sitemap) using the `sequential_site` column. These sites will label the x-axis of all summary plots in **`dms-viz`**. - For more detail on what we mean by 'reference_site', check out the [description in the sitemap](#reference-site). + For more details on what we mean by 'reference_site', check out the [description of the sitemap file](/preparing-data/data-requirements/#reference-site). - ### `mutant` - This column should contain the identity of the **mutation** that each measurement is associated with. These mutations should be represented using the [IUPAC single letter codes](https://www.bioinformatics.org/sms/iupac.html) along with symbols for stop codons and gaps (i.e., `R, M, P, *, -`). If you need to extend this alphabet with other symbols, you can do so using the [`--alphabet`](/preparing-data/command-line-api/#alphabet) flag. + This column should contain the identity of the **mutation** that each measurement is associated with. These mutations should be represented using the [IUPAC single letter codes](https://www.bioinformatics.org/sms/iupac.html) along with symbols for stop codons and gaps (i.e., `R, M, P, *, -`). If you need to extend or shrink this alphabet, you can do so using the [`--alphabet`](/preparing-data/command-line-api/#alphabet) flag of `configure-dms-viz`. - ### `wildtype` - This column should contain the **wildtype** identity of residues at a given site in the protien. For example, if a Proline (`P`) was mutatated to an Alanine (`A`) at position 120 in the protein (`P120A`), there should be a `P` in the wildtype column for every row where the value of the site column is 120. + This column should contain the **wildtype** identity of residues at a given site in the protien. For example, if a Proline (`P`) was mutatated to an Alanine (`A`) at position 120 in the protein (`P120A`), there should be a `P` in the wildtype column for every row where the value of the site column is 120. This column will also be used to check how well the protein structure you provided matches the wildtype sites in your data. Significant discepencies can indicate that you're `reference`, `sequential`, and `protein` sites are misaligned. --- -In addition to these three mandatory columns, you will also need to specify a `metric` column. The identity of this column is specified with [`--metric`](/preparing-data/command-line-api/#metric) flag and it can have any name: +In addition to these three mandatory columns, you will also need to specify a `metric` column. The identity of this column is specified with [`--metric`](/preparing-data/command-line-api/#metric) flag of `configure-dms-viz`, and it can have any name: - ### `` - This column should contain the **quantitative metric** that you'd like to summarize and view on a protein structure. For example, this column could be called `fitness` and contain a score that reflects how individual mutations alter a protein's function. + This column should contain the **quantitative metric** that you'd like to summarize and view on a protein structure. For example, this column could be called `fitness` and contain a score that reflects how individual mutations alter a protein's fitness. --- -_Optionally_, depending on the structure of your experiment, you can also include a "_condition column_" that specifies how your data is grouped if there are multiple measurements per mutation: +_Optionally_, depending on the design of your experiment, you can also include a "_condition column_" that specifies how your data is grouped if there are multiple measurements per mutation: - ### `condition` - This column should only be included if there are multiple measurements in the [``](/preparing-data/command-line-api/#metric) column for the same `site`/`mutation` combinations. An example of this would be if you have a measurement like antibody escape for multiple 'epitopes' in a protein. This column contains a unique identifier that's used to deliniate between these measurements for each mutation. + This column should only be included if there are multiple measurements in the [``](/preparing-data/command-line-api/#metric) column for the same `site`/`mutation` combinations. An example of this would be if you have a measurement like antibody escape for multiple 'epitopes' in an antigen. This column contains a unique identifier that's used to deliniate between these measurements for each mutation. This 'identifier' will show up in an interactive legend next to the visualization. ## Sitemap -The **Sitemap** is a tabular dataframe that specifies the order of the [`site`](#site-or-reference-site) column in your input data and, _optionally_, how the [`site`](#site-or-reference-site) column corresponds to the site numbering in the [protein structure](/preparing-data/command-line-api/#structure) you provide. +The **Sitemap** is a tabular `.csv` dataframe that specifies the order of the [`site`](/preparing-data/data-requirements/#site-or-reference-site) (`reference_site`) column in your input data and, _optionally_, how the [`site`](/preparing-data/data-requirements/#site-or-reference-site) column corresponds to the numbering in the [protein structure](/preparing-data/command-line-api/#structure) you provide. ::: warning Important! The sitemap must be in `.csv` format. If your data is tabular but in another format, please convert it to `.csv`. @@ -52,9 +56,9 @@ The sitemap must be in `.csv` format. If your data is tabular but in another for - ### `reference_site` - This column **must** correspond to the `site` or `reference_site` column in your [input data](#input-data). If the [`protein_site`](#protein-site) isn't provided, this column is also assumed to correspond to the identity of the sites in the [protein structure](/preparing-data/command-line-api/#structure) + This column **must** correspond to the `site` or `reference_site` column in your [input data](#input-data). If the [`protein_site`](/preparing-data/data-requirements/#protein-site) isn't provided, this column is also assumed to correspond to the identity of the sites in the [protein structure](/preparing-data/command-line-api/#structure) - The `reference_site` refers to the labels that are applied to the sites on the x-axis of the plots. These can sometimes differ from the `sequential_site` ([described below](#sequential-site)); for example, the current SARS-CoV-2 Spike protein variants now have indels that cause the widely used Wuhan-Hu-1 'reference' numbering to differ from the sequential, numeric order of the data. + The `reference_site` refers to the identity of the sites that are mutagenized in your dataset. These sites will ultimatley label the x-axis of the visualization. These '_reference_' sites can sometimes differ from the `sequential_site` ([described below](/preparing-data/data-requirements/#sequential-site)); for example, the current SARS-CoV-2 Spike protein variants have insertaion and deletions that cause the widely used Wuhan-Hu-1 'reference' numbering to differ from the sequential, numeric order of the data. - ### `sequential_site` @@ -66,7 +70,7 @@ The sitemap must be in `.csv` format. If your data is tabular but in another for ## Join Data -_Optionally_, you might have some more data that you want to combine with your [Input Data](#input-data). You might want to do this so that you can include columnns from this **Join Data** in the [filters](/preparing-data/command-line-api/#filter-cols) or [tooltips](/preparing-data/command-line-api/#tooltip-cols) of your visualization. This option is to streamline that workflow. +_Optionally_, you might have some additional data that you want to combine with your [Input Data](#input-data). You do this so you can include columnns from this **Join Data** in the [filters](/preparing-data/command-line-api/#filter-cols) or [tooltips](/preparing-data/command-line-api/#tooltip-cols) of your visualization. This option helps streamline that workflow. ::: warning Important! The join data must be in `.csv` format. If your data is tabular but in another format, please convert it to `.csv`. @@ -74,4 +78,4 @@ The join data must be in `.csv` format. If your data is tabular but in another f You can specify more than one `.csv` file if there are multiple sources of data that you want to take columns from. Check out the API reference entry on the [`--join-data`](/preparing-data/command-line-api/#join-data) flag for more details. -The **Join Data** must contain a [`site`](#site-or-reference-site), [`wildtype`](#wildtype), and [`mutant`](#mutant) column, as these are used to join your incoming data with the [Input Data](#input-data). +The **Join Data** must contain a [`site`](/preparing-data/data-requirements/#site-or-reference-site), [`wildtype`](#wildtype), and [`mutant`](#mutant) column, as these are used to join your incoming data with the [Input Data](#input-data). diff --git a/visualizing-data/vignettes/index.md b/visualizing-data/vignettes/index.md index 8d288a2..3a30643 100644 --- a/visualizing-data/vignettes/index.md +++ b/visualizing-data/vignettes/index.md @@ -17,7 +17,7 @@ You can find the original antibody escape data for this study [here](https://git [`configure-dms-viz`](/preparing-data/command-line-api/) is designed to prepare a single dataset at a time. For each of the 7 datasets in this study, the values for each of the [command line arguments](/preparing-data/command-line-api/) is described in this [`datasets.csv`](https://github.com/dms-viz/configure_dms_viz/blob/main/tests/HIV-Envelope-BF520-DMS/datasets.csv) file. Here is an example of a single command for the serum sample `IDC508`: ```bash -configure-dms-viz +configure-dms-viz format --input tests/HIV-Envelope-BF520-DMS/input/IDC508_avg.csv --sitemap tests/HIV-Envelope-BF520-DMS/sitemap/sitemap.csv --output tests/HIV-Envelope-BF520-DMS/output/IDC508.json @@ -35,41 +35,21 @@ configure-dms-viz --title "IDC508" ``` -This results in an output `.json` file that can be visualized in the **`dms-viz`** right away. However, if you want to visualize all 7 experiments together, it's possible to combine them together into a single `.json` file using some simple python code: +This results in an output `.json` file that can be visualized in the **`dms-viz`** right away. However, if you want to visualize all 7 experiments together, it's possible to combine them together into a single `.json` file using the `configure-dms-viz join` command like so: -```python -def combine_jsons(input_files, output_file): - """ - Combines multiple JSON files into a single file. - - Parameters - ---------- - input_files : list of str - List of paths to the input JSON files. - output_file : str - Path where the combined JSON should be saved. - - Returns - ------- - None - Writes combined data to a JSON file. - """ - - combined_data = {} - for input_file in input_files: - with open(input_file) as f: - data = json.load(f) - combined_data.update(data) - with open(output_file, "w") as f: - json.dump(combined_data, f) +```bash +configure-dms-viz join + --input tests/HIV-Envelope-BF520-DMS/input/IDC508_avg.csv, tests/HIV-Envelope-BF520-DMS/input/IDC513_avg.csv, tests/HIV-Envelope-BF520-DMS/input/IDC561_avg.csv, ... + --output tests/HIV-Envelope-BF520-DMS/output/HIV-Envelope-BF520-DMS.json + --description tests/HIV-Envelope-BF520-DMS/README.md ``` -Which results in the `.json` specification located [here](https://github.com/dms-viz/configure_dms_viz/blob/main/tests/HIV-Envelope-BF520-DMS/output/HIV-Envelope-BF520-DMS.json). You can visualize this with **`dms-viz`** below, or you can [click here](https://dms-viz.github.io/v0/?data=https%3A%2F%2Fraw.githubusercontent.com%2Fdms-viz%2Fconfigure_dms_viz%2Fmain%2Ftests%2FHIV-Envelope-BF520-DMS%2Foutput%2FHIV-Envelope-BF520-DMS.json&markdown=https%3A%2F%2Fraw.githubusercontent.com%2Fdms-viz%2Fconfigure_dms_viz%2Fmain%2Ftests%2FHIV-Envelope-BF520-DMS%2FREADME.md&e=IDC508&ce=%255B%25221%2522%252C%25222%2522%255D) to see the visualization on a separate page. +Which results in the `.json` specification located [here](https://github.com/dms-viz/configure_dms_viz/blob/main/tests/HIV-Envelope-BF520-DMS/output/HIV-Envelope-BF520-DMS.json). You can visualize this with **`dms-viz`** below, or you can [click here](https://dms-viz.github.io/v0/?data=https%3A%2F%2Fraw.githubusercontent.com%2Fdms-viz%2Fconfigure_dms_viz%2Fmain%2Ftests%2FHIV-Envelope-BF520-DMS%2Foutput%2FHIV-Envelope-BF520-DMS.json&e=IDC508&ce=%255B%25221%2522%252C%25222%2522%255D) to see the visualization on a separate page.