dereneaton / ipyrad

Interactive assembly and analysis of RAD-seq data sets
http://ipyrad.readthedocs.io
GNU General Public License v3.0
72 stars 40 forks source link

Changes in Drawing class #409

Closed camayal closed 4 years ago

camayal commented 4 years ago

Now prune and sort method are in Drawing class, not in Baba class. This allows make baba plots from csv tables with sort and prune functions with a code like this:

#Plot from saved files
import pandas as pd
import toytree
from ipyrad.analysis.baba2 import Drawing

res = pd.read_csv("analysis-baba/abba-baba_results.csv", index_col=0)  
tax = pd.read_csv("analysis-baba/abba-baba_taxon.csv", index_col=0)
tree = toytree.tree("analysis-raxml/RAxML_bipartitions.spp_tree")

Drawing(res, tax, tree, width=900, height=1000, sort=True, prune=True, fade=True)

Also I added: Fading function that change opacity of blocks when the test has a Z-score non-significant fade=True Z-score threshold variable zscoreTH=2.5 Z-score vertical line in histograms panel Tooltips for some elements: names of samples in blocks, D-statistic, and Z-scores