# HG changeset patch # User Ido Tamir # Date 1348497981 -7200 # Node ID cc6707a1e044588c527ca5b493f6b942bc717291 # Parent 8ea9b4e5a389d3acffb62ccf18959fff4b70cbb5 added fixes from Brad Langhorst; https://bitbucket.org/account/notifications/read/3443176/patch-for-proportional-venn-tool-in-galaxy; added tool_dependencies for Mako template untested diff -r 8ea9b4e5a389 -r cc6707a1e044 README.md --- a/README.md Wed Jun 22 03:28:25 2011 -0400 +++ b/README.md Mon Sep 24 16:46:21 2012 +0200 @@ -11,7 +11,8 @@ contains an integration test for the cli interface (vennerTest.py), no galaxy unit tests. - +CLI example: +python venner.py --files testFiles/fileA.tab,testFiles/fileB.tab --columns 1,1 --outname out.html --asNames As,Bs Proportional Venn Diagram: -------------------------- @@ -26,6 +27,6 @@ Outputs: -------- -- Html page with the proportional Venn diagram and a table for the counts in each section. +- Html page with the proportional Venn diagram and a table for the counts in each set. diff -r 8ea9b4e5a389 -r cc6707a1e044 prop_venn.xml --- a/prop_venn.xml Wed Jun 22 03:28:25 2011 -0400 +++ b/prop_venn.xml Mon Sep 24 16:46:21 2012 +0200 @@ -1,14 +1,14 @@ - + from 2-3 sets venner.py #if str( $twoThree['tt']) == 'three': --files $inputFile1,$inputFile2,$twoThree.inputFile3 --columns $column1,$column2,$twoThree.column3 - --asNames $asName1,$asName2,$twoThree.asName3 + --asNames "$asName1","$asName2","$twoThree.asName3" #else: --file $inputFile1,$inputFile2 --columns $column1,$column2 - --asNames $asName1,$asName2 + --asNames "$asName1","$asName2" #end if --title '$title' --size $size @@ -16,7 +16,6 @@ - @@ -43,7 +42,7 @@ - + diff -r 8ea9b4e5a389 -r cc6707a1e044 tool_dependencies.xml --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/tool_dependencies.xml Mon Sep 24 16:46:21 2012 +0200 @@ -0,0 +1,19 @@ + + + + + + http://pypi.python.org/packages/source/M/Mako/Mako-0.7.2.tar.gz + $INSTALL_DIR/lib/python + export PYTHONPATH=$PYTHONPATH:$INSTALL_DIR/lib/python && python setup.py install --home $INSTALL_DIR --install-scripts $INSTALL_DIR/bin + + $INSTALL_DIR/lib/python + $INSTALL_DIR/bin + + + + + prop_venn uses a templating engine called mako + + + diff -r 8ea9b4e5a389 -r cc6707a1e044 venner.py --- a/venner.py Wed Jun 22 03:28:25 2011 -0400 +++ b/venner.py Mon Sep 24 16:46:21 2012 +0200 @@ -27,6 +27,7 @@ cleanname = re.sub("/","",name) self.name = urllib.quote(cleanname, safe="%/:=&?~#+!$,;'@()*[]") self.dict = {} + def read(self): dict = {} lineNr = 0 @@ -88,13 +89,12 @@ Venn diagram ${title} -

${ title }

- + @@ -104,7 +104,7 @@ """ - result = Template(template).render(one=self.one.name, two=self.two.name, n=numbers, title=self.title, url=self.toUrl()) + result = Template(template).render(one=urllib.unquote(self.one.name), two=urllib.unquote(self.two.name), n=numbers, title=self.title, url=self.toUrl()) return(result) @@ -158,13 +158,12 @@ Venn diagram ${title} -

${ title }

SegmentCount
SetCount
${ one }${ n.one_keys }
${ two }${ n.two_keys }
${ one } \ ${ two }${ n.one_only }
- + @@ -179,7 +178,7 @@ """ - result = Template(template).render(one=self.one.name, two=self.two.name, three=self.three.name, n=numbers, title=self.title, url=self.toUrl()) + result = Template(template).render(one=urllib.unquote(self.one.name), two=urllib.unquote(self.two.name), three=urllib.unquote(self.three.name), n=numbers, title=self.title, url=self.toUrl()) return(result)
SegmentCount
SetCount
${ one }${ n.one_keys }
${ two }${ n.two_keys }
${ three }${ n.three_keys }