Mercurial > repos > devteam > picard1106
changeset 146:767bcb0a06df draft
fixed downsamplesam
author | Rayan Chikhi <chikhi@psu.edu> |
---|---|
date | Mon, 21 Jul 2014 15:24:40 -0400 |
parents | b2ca2d181fb4 |
children | 6a9f7fd3d6b6 |
files | igvtools.jar picard_CollectAlignmentSummaryMetrics.xml picard_wrapper.py |
diffstat | 3 files changed, 5 insertions(+), 6 deletions(-) [+] |
line wrap: on
line diff
--- a/picard_CollectAlignmentSummaryMetrics.xml Mon Jun 16 17:38:15 2014 -0400 +++ b/picard_CollectAlignmentSummaryMetrics.xml Mon Jul 21 15:24:40 2014 -0400 @@ -60,7 +60,7 @@ <param name="maxinsert" value="100000" /> <param name="refGenomeSource" value="history" /> <param name="ownFile" value="picard_input_hg18.trimmed.fasta" /> - <param name="input_file" value="picard_input_tiny.sam" dbkey="hg18" /> + <param name="input_file" value="picard_input_tiny.sam" dbkey="hg18" ftype="sam" /> <output name="html_file" file="picard_output_alignment_summary_metrics.html" ftype="html" lines_diff="55"/> </test> <test> @@ -71,7 +71,7 @@ <param name="maxinsert" value="100000" /> <param name="refGenomeSource" value="indexed" /> <param name="index" value="hg19" /> - <param name="input_file" value="picard_input_sorted_pair.sam" dbkey="hg19" /> + <param name="input_file" value="picard_input_sorted_pair.sam" dbkey="hg19" ftype="sam" /> <output name="html_file" file="picard_output_AsMetrics_indexed_hg18_sorted_pair.html" ftype="html" lines_diff="50"/> </test> </tests>
--- a/picard_wrapper.py Mon Jun 16 17:38:15 2014 -0400 +++ b/picard_wrapper.py Mon Jul 21 15:24:40 2014 -0400 @@ -804,7 +804,7 @@ elif pic.picname == "DownsampleSam": cl.append('I=%s' % opts.input) output_string = opts.output - if opts.datatype == 'sam': + if opts.output_format == 'sam': output_string = output_string + ".sam" cl.append('O=%s' % output_string) if float(opts.probability) > 0: @@ -812,9 +812,8 @@ if float(opts.seed) > 0: cl.append('RANDOM_SEED=%s' % opts.seed) stdouts,rval = pic.runPic(opts.jar, cl) - if opts.input.endswith(".sam"): - renamed_output = output_string.replace(".sam", "") - os.rename(output_string,renamed_output) + if opts.output_format == 'sam': + os.rename(output_string, opts.output) elif pic.picname == 'MeanQualityByCycle': isPDF = 'MeanQualityByCycle.pdf'