With the great need for data visualisation in the present world, we have introduced a few visual features to Intermine as well. We have tried to cover the most common needs of visualisation and have explained their use in this tutorial.
NOTE: This feature of Python Client is supported only on Python Versions>= 3.6 because of the dependencies.
from intermine import bar_chart as b b.save_mine_and_token("humanmine","<token>")
'An exception of type KeyError occurred. Check token'
'saves the given mine and token'
plot_go_vs_p(list name) can be used to print GO Terms vs p-value, as the name suggests. Also each bar in the bar-chart is labelled by the gene count corresponding to the particular GO Term.
plot_go_vs_count(list name) can be used to print GO Terms vs gene count. Again, each bar in the bar-chart is labelled by the annotation corresponding to the particular GO Term.
query_to_barchart_log(xml) is used to plot the query given as an argument in xml format.
Its important to note that the query should be in a format such that the first row contains the gene, the second row has content for x-axis and the third row consists if y-axis values.
Also, only if the second argument is 'true', the y axis values are converted to their corresponding loge values. Its really useful if the values have a diverse range. If not needed, the second argument can be any string but 't
b.query_to_barchart_log('<query model="genomic" view="Gene.name Gene.symbol Gene.length" sortOrder="Gene.name ASC" ><constraint path="Gene.length" op="<" value="450074" /><constraint path="Gene.name" op="=" value="translation initiation factor IF-2-like" /></query>','true')
We will soon be coming out with more plots. If you have any ideas feel free to open an issue in the Python Client repository.