def test_roundtrip_commented_format():
 infile = utils.copy_test_data(u'old-style-format-w-comments.fq')
 outfile = utils.get_temp_filename(u'test2.fq')
 in_dir = os.path.dirname(infile)
 (_, out, err) = utils.runscript(u'split-paired-reads.py', [infile], in_dir)
 utils.runscript(u'interleave-reads.py', [(infile + u'.1'), (infile + u'.2'), u'-o', outfile], in_dir)
 r = open(infile).read()
 r2 = open(outfile).read()
 assert (r == r2), (r, r2)

def test_roundtrip_commented_format ( ) : infile = utils . copy_test_data ( u'old-style-format-w-comments.fq' ) outfile = utils . get_temp_filename ( u'test2.fq' ) in_dir = os . path . dirname ( infile ) ( _ , out , err ) = utils . runscript ( u'split-paired-reads.py' , [ infile ] , in_dir ) utils . runscript ( u'interleave-reads.py' , [ ( infile + u'.1' ) , ( infile + u'.2' ) , u'-o' , outfile ] , in_dir ) r = open ( infile ) . read ( ) r2 = open ( outfile ) . read ( ) assert ( r == r2 ) , ( r , r2 )
split/interleave roundtrip for old style format with comments .