Getting WISECONDOR to work - VUmcCGP/wisecondor GitHub Wiki

Naming files

Pre-gc-corrected sample files are generally named .pickle, after gc-correction the scripts assume file extensions to be .gcc. Choosing any other name, including .pickle, will result in errors liks these: iLen = max([len(controls[key][iChrom]) for key in controls.keys()]) ValueError: max() arg is an empty sequence when trying to create a new reference table from your dataset.

I specified an output, the script runs without errors but there is nothing in the output directory

When specifiying the output for test.py, it assumes you provide it a path including a filename without an extension. The plots will take this path/file combination, add a dot, and add the plot type and pdf extension to it. As a result, providing a path such as ./output/ will result in output files such as ./output/.zscores.pdf, which, in unix systems, end up being hidden because they start with a dot. Simply add a basic file name to the output path such as ./output/filename and your files will show up. If you really need to see what hidden files you created, try pressing ctrl-h in a file browser to show hidden files.

I get a nice text output in my terminal but I want to save this to a file instead

The script was written rather rapidly and this never really seemed a problem to me. If you want to save this text output, the usual Unix approach (directing the output to a file) should suffice: python test.py ./input.gcc ./output ./reference > ./output.txt

Do I need to use specific versions of the packages/tools/dependencies?

As stated in the README, WISECONDOR was developed and tested using Python2.7. Below you will find the versions of the other tools used:

  • Numpy 1:1.6.2-1ubuntu1 (quantal)
  • Matplotlib 1.1.1-1 (quantal)
  • Biopython 1.60-0ubuntu1 (quantal)
  • Samtools 0.1.18
  • BWA 0.6.2
  • SOAP2 2.21

We have seen deviating results when using different versions of Numpy (also tested 1:1.6.1-6ubuntu1 precise). The older version seemed to result in slightly smaller calls. This is probably caused by the difference in handling the empty bins in the script. We recommend the use of the newer version. We have not yet tested WISECONDOR using other versions of the other tools. We are always interested in your experiences and observations using different versions.

OLD

I'm getting this Tk-something error:

Plotting Z-Scores
Traceback (most recent call last):
File "test.py", line 562, in
plotResults(sample,markedBins,kept,kept2,outputBase,zScoresDict,zSmoothDict,blindsDict)
File "test.py", line 344, in plotResults
ax = plt.figure(2)
File "/usr/lib/pymodules/python2.6/matplotlib/pyplot.py", line 254, in figure
**kwargs)

File "/usr/lib/pymodules/python2.6/matplotlib/backends/backend_tkagg.py", line 90, in new_figure_manager
window = Tk.Tk()
File "/usr/lib/python2.6/lib-tk/Tkinter.py", line 1646, in init
self.tk = _tkinter.create(screenName, baseName, className, interactive, wantobjects, useTk, sync, use)
_tkinter.TclError: no display name and no $DISPLAY environment variable

This appears to show up on computers that do not have the Tcl/Tk toolkit installed, which is often the case on compute nodes (headless servers). An easy fix for this is to tell matplotlib to use another backend for its graphical work:

  • Open test.py
  • Find the list of imports, somewhere about line 25 to 35
  • Add these lines to the list:
    import matplotlib
    matplotlib.use('Agg')

As the plots seem to differ slightly using this back-end I preferred not to make it the default until everything is tested to work correctly using this. This fix was suggested by W.Y.Leung, thank you!

⚠️ **GitHub.com Fallback** ⚠️