bokulich-lab / q2-coordinates Goto Github PK
View Code? Open in Web Editor NEWmethods for geographic mapping of qiime2 artifact data or metadata
License: BSD 3-Clause "New" or "Revised" License
methods for geographic mapping of qiime2 artifact data or metadata
License: BSD 3-Clause "New" or "Revised" License
adjust plugin to newest qiime2 version (2020.11.1 -> 2021.2.0)
Steps to reproduce:
qiime coordinates draw-interactive-map \
--m-metadata-file meta_sample.txt \
--p-latitude Latitude \
--p-longitude Longitude \
--p-column Depth \
--o-visualization test-viz.qzv
Expected behaviour:
Map is displayed correctly.
they should be larger, and dimensions should be fixed, or at least fixed height? Currently fixed width (I think), which results in lots of white space if maps are longer than wide.
Enhance visualisation of multiple samples from identical location, e.g. by adding jitter to scatter plot (inspiration) or aggregating values of same location. Currently samples from same location with differing values are not distinguishable.
This is a followup question/issue related to #10
I note that the quadtree is output as a Phylogeny[Rooted], but the README shows some provenance-breaking reformatting necessary to use with q2-empress. Is a new transformer needed? Or why is this reformatting not just done in the first place?
If reformatting is necessary for this to be used as a normal Phylogeny[Rooted], then a quadtree should have its own special type (maybe Phylogeny[quadtree]), and we can add a transformer or an action to perform this conversion.
Any thoughts @zoechallacombe @wasade ? Thanks!
automatically adjust scale to sensible unit, size, and intervals (e.g., 1 km intervals)
automatically locate to unused corner or outside of plot beneath legend.
they point to nbokulich/q2-coordinates
instead of bokulich-lab/q2-coordinates
also the dependencies, etc might need updating.
hence distances between points would take elevation into account.
column
should be optional in draw-interactive-map
and draw-map
, i.e., if no column is selected, all points should be colored uniformly. Currently, it is optional but omitting a column
raises an error:
Test data: metadata.txt
Command:
qiime coordinates draw-interactive-map \
--m-metadata-file metadata.txt \
--p-latitude lat \
--p-longitude lon \
--o-visualization map.qzv
Full traceback:
Traceback (most recent call last):
File "/Users/nbokulich/miniconda3/envs/q2coord/lib/python3.6/site-packages/q2cli/commands.py", line 329, in __call__
results = action(**arguments)
File "/Users/nbokulich/miniconda3/envs/q2coord/lib/python3.6/site-packages/decorator.py", line 232, in fun
return caller(func, *(extras + args), **kw)
File "/Users/nbokulich/miniconda3/envs/q2coord/lib/python3.6/site-packages/qiime2/sdk/action.py", line 245, in bound_callable
output_types, provenance)
File "/Users/nbokulich/miniconda3/envs/q2coord/lib/python3.6/site-packages/qiime2/sdk/action.py", line 452, in _callable_executor_
ret_val = self._callable(output_dir=temp_dir, **view_args)
File "/Users/nbokulich/miniconda3/envs/q2coord/lib/python3.6/site-packages/q2_coordinates/mapper.py", line 129, in draw_interactive_map
['column', 'latitude', 'longitude'], missing_data)
File "/Users/nbokulich/miniconda3/envs/q2coord/lib/python3.6/site-packages/q2_coordinates/_utilities.py", line 27, in _load_and_validate
metadata = metadata[columns]
File "/Users/nbokulich/miniconda3/envs/q2coord/lib/python3.6/site-packages/pandas/core/frame.py", line 2912, in __getitem__
indexer = self.loc._get_listlike_indexer(key, axis=1, raise_missing=True)[1]
File "/Users/nbokulich/miniconda3/envs/q2coord/lib/python3.6/site-packages/pandas/core/indexing.py", line 1254, in _get_listlike_indexer
self._validate_read_indexer(keyarr, indexer, axis, raise_missing=raise_missing)
File "/Users/nbokulich/miniconda3/envs/q2coord/lib/python3.6/site-packages/pandas/core/indexing.py", line 1304, in _validate_read_indexer
raise KeyError(f"{not_found} not in index")
KeyError: '[None] not in index'
However, selecting a column
causes this to work. E.g., command:
qiime coordinates draw-interactive-map \
--m-metadata-file metadata.txt \
--p-latitude lat \
--p-longitude lon \
--p-column language \
--o-visualization map.qzv
Looks like draw-map
raises the same error as draw-interactive-map
so column is not being handled appropriately by either...
The readme is quite outdated. Should be updated to:
Choropleth maps would be a useful feature, e.g., for plotting average values within a region, or even density of sampling within a region.
input: metadata
required params: latitude, longitude
output: interactive chloropleth map
optional inputs: metadata column to average per area [otherwise plot density by default]
Some examples and relevant projects:
https://plotly.com/python/choropleth-maps/
https://github.com/pysal/mapclassify
https://geopandas.org/en/stable/community/ecosystem.html
zoom, box selection, hover tools, drag
Currently the map resolution is autoscaled by default. Expose the resolution setting to the user.
allowing plugin to support python 3.8 and be compatible with newest QIIME2 version (2021.2.0 -> 2021.4.0 )
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.