def runTest(self): for num, info in sorted(samples['small_signals'].items()): # Prepare paths # orig_bigwig_path = info['bigwig'] orig_sql_path = info['sql'] test_sql_path = temporary_path('.sql') test_bigwig_path = temporary_path('.bigwig') # From bigwig to SQL # try: track.convert(orig_bigwig_path, test_sql_path, assembly='sacCer2') except MissingExecutableError as err: sys.stderr.write("skipping: {0} ".format(err.message)) break else: self.assertTrue(assert_file_equal(orig_sql_path, test_sql_path)) # From SQL to bigwig # try: track.convert(test_sql_path, test_bigwig_path) except MissingExecutableError as err: sys.stderr.write("skipping: {0} ".format(err.message)) break else: self.assertTrue( assert_file_equal(orig_bigwig_path, test_bigwig_path, start_a=1, start_b=1)) # Clean up # os.remove(test_sql_path) os.remove(test_bigwig_path)
def runTest(self): for num, info in sorted(samples['small_signals'].items()): # Prepare paths # orig_bigwig_path = info['bigwig'] orig_sql_path = info['sql'] test_sql_path = temporary_path('.sql') test_bigwig_path = temporary_path('.bigwig') # From bigwig to SQL # try: track.convert(orig_bigwig_path, test_sql_path, assembly='sacCer2') except MissingExecutableError as err: sys.stderr.write("skipping: {0} ".format(err.message)) break else: self.assertTrue(assert_file_equal(orig_sql_path, test_sql_path)) # From SQL to bigwig # try: track.convert(test_sql_path, test_bigwig_path) except MissingExecutableError as err: sys.stderr.write("skipping: {0} ".format(err.message)) break else: self.assertTrue(assert_file_equal(orig_bigwig_path, test_bigwig_path, start_a=1, start_b=1)) # Clean up # os.remove(test_sql_path) os.remove(test_bigwig_path)
def runTest(self): for num, info in sorted(samples['small_signals'].items()): # Prepare paths # orig_bigwig_path = info['bigwig'] orig_sql_path = info['sql'] test_sql_path = temporary_path('.sql') test_bigwig_path = temporary_path('.bigwig') # From bigwig to SQL # track.convert(orig_bigwig_path, test_sql_path, assembly='sacCer2') self.assertTrue(assert_file_equal(orig_sql_path, test_sql_path)) # From SQL to bigwig # track.convert(test_sql_path, test_bigwig_path) self.assertTrue(assert_file_equal(orig_bigwig_path, test_bigwig_path, start_a=1, start_b=1)) # Clean up # os.remove(test_sql_path) os.remove(test_bigwig_path)
def runTest(self): for num, info in sorted(samples['gtf_tracks'].items()): if num == 'GenRep': continue orig_gtf_path = info['gtf'] orig_sql_path = info['sql'] test_sql_path = temporary_path('.sql') test_gtf_path = temporary_path('.gtf') # From GTF to SQL # track.convert(orig_gtf_path, test_sql_path) self.assertTrue(assert_file_equal(orig_sql_path, test_sql_path)) # From SQL to GTF # # Use Track() instead. # track.convert(test_sql_path, test_gtf_path) self.assertTrue(assert_file_equal(orig_gtf_path, test_gtf_path, start_b=1)) # Clean up # os.remove(test_sql_path) os.remove(test_gtf_path)
def runTest(self): for num, info in sorted(samples['small_features'].items()): # Prepare paths # orig_bed_path = info['bed'] orig_sql_path = info['sql'] test_sql_path = temporary_path('.sql') test_bed_path = temporary_path('.bed') # From BED to SQL # track.convert(orig_bed_path, test_sql_path, assembly='sacCer2') self.assertTrue(assert_file_equal(orig_sql_path, test_sql_path)) # From SQL to BED # with track.load(test_sql_path) as t: t.roman_to_integer() track.convert(test_sql_path, test_bed_path) self.assertTrue(assert_file_equal(orig_bed_path, test_bed_path, start_b=1)) # Clean up # os.remove(test_sql_path) os.remove(test_bed_path)
def runTest(self): for num, info in sorted(samples['gtf_tracks'].items()): if num == 'GenRep': continue orig_gtf_path = info['gtf'] orig_sql_path = info['sql'] test_sql_path = temporary_path('.sql') test_gtf_path = temporary_path('.gtf') # From GTF to SQL # track.convert(orig_gtf_path, test_sql_path) self.assertTrue(assert_file_equal(orig_sql_path, test_sql_path)) # From SQL to GTF # # Use Track() instead. # track.convert(test_sql_path, test_gtf_path) self.assertTrue( assert_file_equal(orig_gtf_path, test_gtf_path, start_b=1)) # Clean up # os.remove(test_sql_path) os.remove(test_gtf_path)
def runTest(self): for num, info in sorted(samples["gff_tracks"].items()): # Prepare paths # orig_gff_path = info["gff"] orig_sql_path = info["sql"] test_sql_path = temporary_path(".sql") test_gff_path = temporary_path(".gff") # From GFF to SQL # track.convert(orig_gff_path, test_sql_path, assembly="sacCer2") self.assertTrue(assert_file_equal(orig_sql_path, test_sql_path)) # From SQL to GFF # with track.load(test_sql_path) as t: t.roman_to_integer() track.convert(test_sql_path, test_gff_path) self.assertTrue(assert_file_equal(orig_gff_path, test_gff_path, start_a=1, start_b=1)) # Clean up # os.remove(test_sql_path) os.remove(test_gff_path)
def runTest(self): for num, info in sorted(samples['small_signals'].items()): # Some files cannot be roundtriped # if num == 3 or num == 7: continue # Prepare paths # orig_wig_path = info['wig'] orig_sql_path = info['sql'] test_sql_path = temporary_path('.sql') test_wig_path = temporary_path('.wig') # From WIG to SQL # track.convert(orig_wig_path, test_sql_path, assembly='sacCer2') self.assertTrue(assert_file_equal(orig_sql_path, test_sql_path)) # From SQL to WIG # with track.load(test_sql_path) as t: t.roman_to_integer() track.convert(test_sql_path, test_wig_path) self.assertTrue(assert_file_equal(orig_wig_path, test_wig_path, start_b=1)) # Clean up # os.remove(test_sql_path) os.remove(test_wig_path)
def runTest(self): for num, info in sorted(samples['small_features'].items()): # Prepare paths # orig_bed_path = info['bed'] orig_sql_path = info['sql'] test_sql_path = temporary_path('.sql') test_bed_path = temporary_path('.bed') # From BED to SQL # track.convert(orig_bed_path, test_sql_path, assembly='sacCer2') self.assertTrue(assert_file_equal(orig_sql_path, test_sql_path)) # From SQL to BED # with track.load(test_sql_path) as t: t.roman_to_integer() track.convert(test_sql_path, test_bed_path) self.assertTrue( assert_file_equal(orig_bed_path, test_bed_path, start_b=1)) # Clean up # os.remove(test_sql_path) os.remove(test_bed_path)
def runTest(self): # Prepare paths # orig_gzip_path = samples['gzip_tracks'][1]['gzip'] orig_sql_path = samples['small_features'][1]['sql'] test_sql_path = temporary_path('.sql') # From BED to SQL # track.convert(orig_gzip_path, test_sql_path, assembly='sacCer2') self.assertTrue(assert_file_equal(orig_sql_path, test_sql_path)) # Clean up # os.remove(test_sql_path)
def runTest(self): info = samples['small_signals'][1] # Prepare paths # orig_sql_path = info['sql'] orig_sga_path = info['sga'] test_sga_path = temporary_path('.sga') # From SGA to SQL # track.convert(orig_sql_path, test_sga_path, assembly='hg19') self.assertTrue(assert_file_equal(orig_sga_path, test_sga_path)) # Clean up # os.remove(test_sga_path)
def runTest(self): for num, info in sorted(samples['sga_tracks'].items()): # Prepare paths # orig_sga_path = info['sga'] orig_sql_path = info['sql'] test_sql_path = temporary_path('.sql') # From SGA to SQL # track.convert(orig_sga_path, test_sql_path, assembly='hg19') self.assertTrue(assert_file_equal(orig_sql_path, test_sql_path)) # Clean up # os.remove(test_sql_path)
def runTest(self): for num, info in sorted(samples['yeast_features'].items()): # Prepare paths # orig_bed_path = info['bed'] orig_sql_path = info['sql'] test_sql_path = temporary_path('.sql') # From BED to SQL # track.convert(orig_bed_path, test_sql_path, assembly='sacCer2') self.assertTrue(assert_file_equal(orig_sql_path, test_sql_path)) # Clean up # os.remove(test_sql_path)
def runTest(self): for num, info in sorted(samples['rand_signals'].items()): # Prepare paths # orig_wig_path = info['wig'] orig_sql_path = info['sql'] test_sql_path = temporary_path('.sql') # From WIG to SQL # track.convert(orig_wig_path, test_sql_path, assembly='sacCer2') self.assertTrue(assert_file_equal(orig_sql_path, test_sql_path)) # Clean up # os.remove(test_sql_path)
def runTest(self): for num, info in sorted(samples['small_signals'].items()): # Prepare paths # orig_bigwig_path = info['bigwig'] orig_sql_path = info['sql'] test_sql_path = temporary_path('.sql') test_bigwig_path = temporary_path('.bigwig') # From bigwig to SQL # track.convert(orig_bigwig_path, test_sql_path, assembly='sacCer2') self.assertTrue(assert_file_equal(orig_sql_path, test_sql_path)) # From SQL to bigwig # track.convert(test_sql_path, test_bigwig_path) self.assertTrue( assert_file_equal(orig_bigwig_path, test_bigwig_path, start_a=1, start_b=1)) # Clean up # os.remove(test_sql_path) os.remove(test_bigwig_path)
def runTest(self): for num, info in sorted(samples['small_signals'].items()): # Some files cannot be roundtriped # if num == 3 or num == 7: continue # Prepare paths # orig_wig_path = info['wig'] orig_sql_path = info['sql'] test_sql_path = temporary_path('.sql') test_wig_path = temporary_path('.wig') # From WIG to SQL # track.convert(orig_wig_path, test_sql_path, assembly='sacCer2') self.assertTrue(assert_file_equal(orig_sql_path, test_sql_path)) # From SQL to WIG # with track.load(test_sql_path) as t: t.roman_to_integer() track.convert(test_sql_path, test_wig_path) self.assertTrue( assert_file_equal(orig_wig_path, test_wig_path, start_b=1)) # Clean up # os.remove(test_sql_path) os.remove(test_wig_path)
def runTest(self): for num, info in sorted(samples['gtf_tracks'].items()): # This one is too large # if num == 'GenRep': continue # Prepare paths # orig_gtf_path = info['gtf'] orig_sql_path = info['sql'] test_sql_path = temporary_path('.sql') # From GTF to SQL # track.convert(orig_gtf_path, test_sql_path) self.assertTrue(assert_file_equal(orig_sql_path, test_sql_path)) # Clean up # os.remove(test_sql_path)
def runTest(self): for num, info in sorted(samples['gff_tracks'].items()): # Prepare paths # orig_gff_path = info['gff'] orig_sql_path = info['sql'] test_sql_path = temporary_path('.sql') test_gff_path = temporary_path('.gff') # From GFF to SQL # track.convert(orig_gff_path, test_sql_path, assembly='sacCer2') self.assertTrue(assert_file_equal(orig_sql_path, test_sql_path)) # From SQL to GFF # with track.load(test_sql_path) as t: t.roman_to_integer() track.convert(test_sql_path, test_gff_path) self.assertTrue( assert_file_equal(orig_gff_path, test_gff_path, start_a=1, start_b=1)) # Clean up # os.remove(test_sql_path) os.remove(test_gff_path)