#NEWLINE# def setup_csv_file( ) : #NEWLINE# #INDENT# '\n    Print some variants to a vcf file and return the filename\n    ' #NEWLINE# variant_lines = [ '1\t1\t11900\t.\tA\tT\t100\tPASS\tMQ=1\tGT:GQ\t0/1:60\t0/1:60\t1/1:60\n' , '3\t3\t947378\t.\tA\tT\t100\tPASS\tMQ=1\tGT:GQ\t0/0:60\t0/0:60\t0/1:60\n' , '1\t1\t879586\t.\tA\tT\t100\tPASS\tMQ=1\tGT:GQ\t0/0:60\t0/1:60\t0/1:60\n' , '23\tX\t879586\t.\tA\tT\t100\tPASS\tMQ=1\tGT:GQ\t0/0:60\t0/1:60\t0/1:60\n' , '1\t1\t879585\t.\tA\tT\t100\tPASS\tMQ=1\tGT:GQ\t0/1:60\t0/0:60\t0/1:60\n' , '1\t1\t947378\t.\tA\tT\t100\tPASS\tMQ=1\tGT:GQ\t0/0:60\t0/0:60\t0/1:60\n' ] #NEWLINE# csv_file = NamedTemporaryFile ( mode = 'w+t' , delete = False , suffix = '.vcf' ) #NEWLINE# csv_file . writelines ( variant_lines ) #NEWLINE# csv_file . seek ( 0 ) #NEWLINE# csv_file . close ( ) #NEWLINE# return csv_file . name