comparison bismark_methylation_extractor.py @ 4:427fb56f2e41 draft default tip

- new options - fixes
author bjoern-gruening
date Fri, 01 Mar 2013 13:39:22 -0500
parents 36d124f44c0a
children
comparison
equal deleted inserted replaced
3:7eefe5d6eecd 4:427fb56f2e41
23 def __main__(): 23 def __main__():
24 #Parse Command Line 24 #Parse Command Line
25 parser = argparse.ArgumentParser(description='Wrapper for the bismark methylation caller.') 25 parser = argparse.ArgumentParser(description='Wrapper for the bismark methylation caller.')
26 26
27 # input options 27 # input options
28 parser.add_argument( '--bismark_path', dest='bismark_path', help='Path to the bismark perl scripts' )
29
28 parser.add_argument( '--infile', help='Input file in SAM format.' ) 30 parser.add_argument( '--infile', help='Input file in SAM format.' )
29 parser.add_argument( '--single-end', dest='single_end', action="store_true" ) 31 parser.add_argument( '--single-end', dest='single_end', action="store_true" )
30 parser.add_argument( '--paired-end', dest='paired_end', action="store_true" ) 32 parser.add_argument( '--paired-end', dest='paired_end', action="store_true" )
31 33
32 parser.add_argument( '--report-file', dest='report_file' ) 34 parser.add_argument( '--report-file', dest='report_file' )
68 70
69 71
70 # Build methylation extractor command 72 # Build methylation extractor command
71 output_dir = tempfile.mkdtemp() 73 output_dir = tempfile.mkdtemp()
72 cmd = 'bismark_methylation_extractor --no_header -o %s %s %s' 74 cmd = 'bismark_methylation_extractor --no_header -o %s %s %s'
75 if args.bismark_path:
76 # add the path to the bismark perl scripts, that is needed for galaxy
77 cmd = os.path.join(args.bismark_path, cmd)
73 78
74 additional_opts = '' 79 additional_opts = ''
75 # Set up all options 80 # Set up all options
76 if args.single_end: 81 if args.single_end:
77 additional_opts += ' --single-end ' 82 additional_opts += ' --single-end '