Commit 7dcaa182 authored by Liubov Chuprikova's avatar Liubov Chuprikova
Browse files

New upstream version 2019.7.0

parent 9c19f62d
Loading
Loading
Loading
Loading
+3 −3
Original line number Diff line number Diff line
@@ -23,9 +23,9 @@ def get_keywords():
    # setup.py/versioneer.py will grep for the variable names, so they must
    # each be defined on a line of their own. _version.py will just call
    # get_keywords().
    git_refnames = " (tag: 2019.4.0)"
    git_full = "b68f7f2cf216a6dd942c115337a4c0eaeda84006"
    git_date = "2019-05-03 04:14:42 +0000"
    git_refnames = " (tag: 2019.7.0)"
    git_full = "bc018fe8540f9f0fb4f4cf6729d840a53f5d8c31"
    git_date = "2019-07-30 18:15:55 +0000"
    keywords = {"refnames": git_refnames, "full": git_full, "date": git_date}
    return keywords

+5 −0
Original line number Diff line number Diff line
@@ -24,6 +24,11 @@ TEMPLATES = pkg_resources.resource_filename('q2_taxa', 'assets')

def barplot(output_dir: str, table: pd.DataFrame, taxonomy: pd.Series,
            metadata: Metadata) -> None:
    ids_not_in_metadata = set(table.index) - set(metadata.ids)
    if ids_not_in_metadata:
        raise ValueError('Feature IDs found in the table are missing in the '
                         f'metadata: {ids_not_in_metadata!r}.')

    metadata = metadata.to_dataframe()
    jsonp_files, csv_files = [], []
    collapsed_tables = _extract_to_level(taxonomy, table)
+20 −9
Original line number Diff line number Diff line
@@ -2,8 +2,8 @@ import { select } from 'd3';

import render from './render';
import {
  availableColorSchemes,
  addTaxaPicker,
  addWidthSlider,
  addColorPicker,
  addSortByPicker,
  addDownloadLinks,
@@ -12,9 +12,20 @@ import { setupData, sort } from './data';
import plotLegend from './legend';


export default function init(level) {
/* Re-initializes the display.
 *
 * "state" is an object that should contain the following entries:
 *
 * level -- an integer indicating the currently selected index in the
 *          "Taxonomic Level" dropdown (starts at 0)
 *
 * colorScheme -- the name of the current color scheme
 *
 * barWidth -- an integer indicating the currently selected bar width value
 */
export default function init(state) {
  /* global d */
  const data = d[level].data;
  const data = d[state.level].data;

  // DOM
  const body = select('body .container-fluid');
@@ -47,19 +58,19 @@ export default function init(level) {
    .style('font', '12px sans-serif')
    .text('Sample');

  const initialColorScheme = availableColorSchemes[0].name;
  const dataMeta = setupData(d[level], svgBar);
  const dataMeta = setupData(d[state.level], svgBar);
  const { sortedKeysReverse, levels } = dataMeta;

  const initialSort = sort(data, [sortedKeysReverse[0]], ['Ascending'], [false], dataMeta);
  const chartInfo = render(svgBar, initialColorScheme, initialSort, dataMeta);
  const chartInfo = render(svgBar, state.colorScheme, initialSort, dataMeta, state.barWidth);

  plotLegend(legendCol, chartInfo);

  // Controls
  const ctrlRowOne = controls.append('div').attr('class', 'row');
  addDownloadLinks(ctrlRowOne, svgBar, legendCol.select('svg'), level + 1);
  addTaxaPicker(ctrlRowOne, levels, level + 1);
  addColorPicker(ctrlRowOne, svgBar, legendCol, data, dataMeta);
  addDownloadLinks(ctrlRowOne, svgBar, legendCol.select('svg'), state.level + 1);
  addTaxaPicker(ctrlRowOne, levels, state.level + 1);
  addColorPicker(ctrlRowOne, svgBar, legendCol, data, dataMeta, state.colorScheme);
  addSortByPicker(ctrlRowOne, svgBar, data, dataMeta);
  addWidthSlider(ctrlRowOne, svgBar, data, dataMeta, state.barWidth);
}
+2 −2
Original line number Diff line number Diff line
import init from './init';
import { getBarWidth, getColorScheme } from './toolbar';


init(0);
init({ level: 0, colorScheme: getColorScheme(), barWidth: getBarWidth() });
+2 −2
Original line number Diff line number Diff line
@@ -14,9 +14,9 @@ import { availableColorSchemes } from './toolbar';

export const transitionDur = 500;

export default function render(svg, colorScheme, xOrdering, dataMeta) {
export default function render(svg, colorScheme, xOrdering, dataMeta, barWidth) {
  const { sortMap, sortedSampleIDs } = xOrdering;
  const width = sortedSampleIDs.length * 10;
  const width = sortedSampleIDs.length * barWidth;
  const height = 600;
  const margin = { top: 20, left: 60, right: 0, bottom: 50 };
  const { keys } = dataMeta;
Loading