/tools/expression/exptf_code.py

https://bitbucket.org/cistrome/cistrome-harvard/ · Python · 31 lines · 21 code · 7 blank · 3 comment · 2 complexity · 6e33216b94809ad380e3ef5472c04b97 MD5 · raw file

  1. #build list of available data
  2. import string, os, sys, glob, shutil, re
  3. import galaxy.util
  4. from galaxy import datatypes, config, jobs
  5. #repository = "/usr/local/galaxy/data/rg/library"
  6. def getSampleNames(sampleName):
  7. if not sampleName:
  8. return []
  9. fileName = sampleName.file_name
  10. f = file(fileName, 'r')
  11. sampleData = f.readlines()
  12. f.close()
  13. header = sampleData[0].strip()
  14. i = 0
  15. samples = []
  16. headerItems = header.split()
  17. for (sample) in headerItems:
  18. sample = string.strip(sample, '"')
  19. i += 1
  20. samples.append((sample,str(i),False))
  21. return samples
  22. def exec_after_process(app, inp_data, out_data, param_dict, tool, stdout, stderr):
  23. """Sets the name of the html file to the title"""
  24. pass