It messes up my dots. Unfortunately the fastq validator is still
ugly. But at least its messages are a lot shorter.
There was one debugging function ls_tree in simulate_runfolder
that I renamed to print_ls_tree because I'll occasionally remember
to grep for print to find things I shouldn't commit.
from htsworkflow.util.rdfinfer import Infer
SOURCE_PATH = os.path.split(os.path.abspath(__file__))[0]
from htsworkflow.util.rdfinfer import Infer
SOURCE_PATH = os.path.split(os.path.abspath(__file__))[0]
class TestEncodeFind(TestCase):
def setUp(self):
class TestEncodeFind(TestCase):
def setUp(self):
""".format(lane=lane, index=index_seq)
return body
""".format(lane=lane, index=index_seq)
return body
+def print_ls_tree(root):
+ """List tree contents, useful for debugging.
+ """
for dirpath, dirnames, filenames in os.walk(root):
for filename in filenames:
print os.path.join(dirpath, filename)
for dirpath, dirnames, filenames in os.walk(root):
for filename in filenames:
print os.path.join(dirpath, filename)
e.results[sl1] = 'Lane1'
e_list = e.values()
e.results[sl1] = 'Lane1'
e_list = e.values()
self.assertEqual(e_list[0], 'Lane1')
self.assertEqual(e_list[1], 'Lane3')
self.assertEqual(e_list[2], 'Lane5')
self.assertEqual(e_list[0], 'Lane1')
self.assertEqual(e_list[1], 'Lane3')
self.assertEqual(e_list[2], 'Lane5')
- ls_tree(self.runfolder_dir)
hg_map = {'Lambda.fa': 'Lambda.fa'}
for i in range(1,22):
short_name = 'chr%d.fa' % (i,)
hg_map = {'Lambda.fa': 'Lambda.fa'}
for i in range(1,22):
short_name = 'chr%d.fa' % (i,)
glob.fnmatch.fnmatch("s_1_0001_qseq.txt", pattern),
False)
glob.fnmatch.fnmatch("s_1_0001_qseq.txt", pattern),
False)
def suite():
from unittest2 import TestSuite, defaultTestLoader
def suite():
from unittest2 import TestSuite, defaultTestLoader
conversion = conversion_funcs.get(condor_type, None)
if conversion is None:
errmsg = "Unrecognized type: {0} for {1}"
conversion = conversion_funcs.get(condor_type, None)
if conversion is None:
errmsg = "Unrecognized type: {0} for {1}"
- print errmsg.format(condor_type,
- pformat(available_sources))
+ LOGGER.error(errmsg.format(condor_type,
+ pformat(available_sources)))
continue
sources = available_sources.get(condor_type, None)
continue
sources = available_sources.get(condor_type, None)
condor_entries.setdefault(condor_type, []).append(
conversion(sources, target_pathname))
else:
condor_entries.setdefault(condor_type, []).append(
conversion(sources, target_pathname))
else:
- print " need file", target_pathname
+ LOGGER.warn(" need file %s", target_pathname)
def make_tree_from(self, source_path, destpath = None):
"""Create a tree using data files from source path.
"""
def make_tree_from(self, source_path, destpath = None):
"""Create a tree using data files from source path.
"""
- print source_path, destpath
if destpath is None:
destpath = os.getcwd()
if destpath is None:
destpath = os.getcwd()
source_rel_dir = os.path.join(source_path, lib_path)
source_lib_dir = os.path.abspath(source_rel_dir)
source_rel_dir = os.path.join(source_path, lib_path)
source_lib_dir = os.path.abspath(source_rel_dir)
- print "source_lib_dir", source_lib_dir
for filename in os.listdir(source_lib_dir):
source_pathname = os.path.join(source_lib_dir, filename)
target_pathname = os.path.join(lib_destination, filename)
if not os.path.exists(source_pathname):
raise IOError(
"{0} does not exist".format(source_pathname))
for filename in os.listdir(source_lib_dir):
source_pathname = os.path.join(source_lib_dir, filename)
target_pathname = os.path.join(lib_destination, filename)
if not os.path.exists(source_pathname):
raise IOError(
"{0} does not exist".format(source_pathname))
if not os.path.exists(target_pathname):
os.symlink(source_pathname, target_pathname)
LOGGER.info(
if not os.path.exists(target_pathname):
os.symlink(source_pathname, target_pathname)
LOGGER.info(
out = StringIO()
out = list(makebed.make_bed_from_multi_eland_generator(instream, 'name', 'desc', 'mm9_chr', 1))
out = StringIO()
out = list(makebed.make_bed_from_multi_eland_generator(instream, 'name', 'desc', 'mm9_chr', 1))
self.failUnlessEqual(len(out), 1)
self.failUnlessEqual(len(out), 1)