commit/galaxy-central: 3 new changesets
3 new commits in galaxy-central: https://bitbucket.org/galaxy/galaxy-central/changeset/a807ed5389f4/ changeset: a807ed5389f4 user: fubar date: 2011-11-10 22:23:15 summary: Updates for picard tools 1.56 - they changed the params for CollectInsertSizeMetrics.jar - bless them - so you will need to update your local picard install in tool-data/shared/jars/picard Fixes to picard_wrapper.py so if a picard tool returns a non zero exit code, it will raise an error state. Sadly, this doesn't help the CollectInsertSizeMetrics problem it was meant to address - it will die with no outputs if given an input containing unpaired reads - but the exit code is still zero. Talk about irony. At least it should work right if they ever get around to setting exit codes to indicate a problem. affected #: 6 files diff -r 6ec2d7f4a64dcf6a1c49415bd8f40c8d4ca907c5 -r a807ed5389f4da39f509aa45e5baf7027ceb7a91 test-data/picard_input_sorted_pair.sam --- a/test-data/picard_input_sorted_pair.sam +++ b/test-data/picard_input_sorted_pair.sam @@ -5,11 +5,11 @@ @RG ID:rg1 SM:Z bar:record:1 77 chr1 10 0 * * 0 0 AAAAAAAAAAAAA 1111111111111 RG:Z:rg1 bar:record:1 141 chr1 20 0 * * 0 0 CCCCCCCCCCCCC 2222222222222 RG:Z:rg1 -bar:record:2 77 chr2 10 0 * * 0 0 AAAAAAAAAAAAA 1111111111111 RG:Z:rg1 -bar:record:2 141 chr2 30 0 * * 0 0 CCCCCCCCCCCCC 2222222222222 RG:Z:rg1 -bar:record:3 77 chr1 10 0 * * 0 0 AAAAAAAAAAAAA 1111111111111 RG:Z:rg1 -bar:record:3 141 chr3 20 0 * * 0 0 CCCCCCCCCCCCC 2222222222222 RG:Z:rg1 -bar:record:4 77 chr1 1 0 * * 0 0 AAAAAAAAAAAAA 1111111111111 RG:Z:rg1 -bar:record:4 141 chr1 40 0 * * 0 0 CCCCCCCCCCCCC 2222222222222 RG:Z:rg1 -bar:record:5 77 chr1 40 0 * * 0 0 AAAAAAAAAAAAA 1111111111111 RG:Z:rg1 -bar:record:5 141 chr3 40 0 * * 0 0 CCCCCCCCCCCCC 2222222222222 RG:Z:rg1 +bar:record:2 77 chr1 40 0 * * 0 0 AAAAAAAAAAAAA 1111111111111 RG:Z:rg1 +bar:record:2 141 chr1 50 0 * * 0 0 CCCCCCCCCCCCC 2222222222222 RG:Z:rg1 +bar:record:3 77 chr2 10 0 * * 0 0 AAAAAAAAAAAAA 1111111111111 RG:Z:rg1 +bar:record:3 141 chr2 20 0 * * 0 0 CCCCCCCCCCCCC 2222222222222 RG:Z:rg1 +bar:record:4 77 chr2 50 0 * * 0 0 AAAAAAAAAAAAA 1111111111111 RG:Z:rg1 +bar:record:4 141 chr2 60 0 * * 0 0 CCCCCCCCCCCCC 2222222222222 RG:Z:rg1 +bar:record:5 77 chr3 40 0 * * 0 0 AAAAAAAAAAAAA 1111111111111 RG:Z:rg1 +bar:record:5 141 chr3 50 0 * * 0 0 CCCCCCCCCCCCC 2222222222222 RG:Z:rg1 diff -r 6ec2d7f4a64dcf6a1c49415bd8f40c8d4ca907c5 -r a807ed5389f4da39f509aa45e5baf7027ceb7a91 test-data/picard_output_AsMetrics_indexed_hg18_sorted_pair.html --- a/test-data/picard_output_AsMetrics_indexed_hg18_sorted_pair.html +++ b/test-data/picard_output_AsMetrics_indexed_hg18_sorted_pair.html @@ -6,28 +6,51 @@ <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en"><head><meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> -<meta name="generator" content="Galaxy CollectAlignmentSummaryMetrics tool output - see http://getgalaxy.org/" /> +<meta name="generator" content="Galaxy picard_wrapper tool output - see http://getgalaxy.org/" /><title></title><link rel="stylesheet" href="/static/style/base.css" type="text/css" /></head><body><div class="document"> -Galaxy tool wrapper picard_wrapper at 09/05/2011 11:03:57</b><br/><b>The following output files were created (click the filename to view/download a copy):</b><hr/><table> +Galaxy tool CollectAlignmentSummaryMetrics run at 11/11/2011 08:07:27</b><br/><b>The following output files were created (click the filename to view/download a copy):</b><hr/><table><tr><td><a href="CollectAlignmentSummaryMetrics.log">CollectAlignmentSummaryMetrics.log</a></td></tr> +<tr><td><a href="CollectAlignmentSummaryMetrics.metrics.txt">CollectAlignmentSummaryMetrics.metrics.txt</a></td></tr></table><p/> -<b>Picard log</b><hr/> -<pre>## executing java -Xmx2g -jar /udd/rerla/galaxy-central/tool-data/shared/jars/CollectAlignmentSummaryMetrics.jar VALIDATION_STRINGENCY=LENIENT ASSUME_SORTED=true ADAPTER_SEQUENCE= IS_BISULFITE_SEQUENCED=false MAX_INSERT_SIZE=100000 OUTPUT=/udd/rerla/galaxy-central/database/job_working_directory/5/dataset_5_files/CollectAlignmentSummaryMetrics.metrics.txt R=/udd/rerla/galaxy-central/database/job_working_directory/5/dataset_5_files/hg19.fasta_fake.fasta TMP_DIR=/tmp INPUT=/export/tmp/tmpBrCiH5/database/files/000/dataset_4.dat returned status 1 and stderr: -[Mon May 09 11:03:51 EDT 2011] net.sf.picard.analysis.CollectAlignmentSummaryMetrics MAX_INSERT_SIZE=100000 ADAPTER_SEQUENCE=[AATGATACGGCGACCACCGAGATCTACACTCTTTCCCTACACGACGCTCTTCCGATCT, AGATCGGAAGAGCTCGTATGCCGTCTTCTGCTTG, AATGATACGGCGACCACCGAGATCTACACTCTTTCCCTACACGACGCTCTTCCGATCT, AGATCGGAAGAGCGGTTCAGCAGGAATGCCGAGACCGATCTCGTATGCCGTCTTCTGCTTG, AATGATACGGCGACCACCGAGATCTACACTCTTTCCCTACACGACGCTCTTCCGATCT, AGATCGGAAGAGCACACGTCTGAACTCCAGTCACNNNNNNNNATCTCGTATGCCGTCTTCTGCTTG, IS_BISULFITE_SEQUENCED=false] INPUT=/export/tmp/tmpBrCiH5/database/files/000/dataset_4.dat OUTPUT=/udd/rerla/galaxy-central/database/job_working_directory/5/dataset_5_files/CollectAlignmentSummaryMetrics.metrics.txt REFERENCE_SEQUENCE=/udd/rerla/galaxy-central/database/job_working_directory/5/dataset_5_files/hg19.fasta_fake.fasta ASSUME_SORTED=true TMP_DIR=/tmp VALIDATION_STRINGENCY=LENIENT IS_BISULFITE_SEQUENCED=false STOP_AFTER=0 VERBOSITY=INFO QUIET=false COMPRESSION_LEVEL=5 MAX_RECORDS_IN_RAM=500000 CREATE_INDEX=false CREATE_MD5_FILE=false -[Mon May 09 11:03:57 EDT 2011] net.sf.picard.analysis.CollectAlignmentSummaryMetrics done. -Runtime.totalMemory()=912588800 -Exception in thread "main" net.sf.picard.PicardException: Requesting earlier reference sequence: 0 < 1 - at net.sf.picard.reference.ReferenceSequenceFileWalker.get(ReferenceSequenceFileWalker.java:78) - at net.sf.picard.analysis.SinglePassSamProgram.makeItSo(SinglePassSamProgram.java:115) - at net.sf.picard.analysis.SinglePassSamProgram.doWork(SinglePassSamProgram.java:54) - at net.sf.picard.cmdline.CommandLineProgram.instanceMain(CommandLineProgram.java:157) - at net.sf.picard.cmdline.CommandLineProgram.instanceMainWithExit(CommandLineProgram.java:117) - at net.sf.picard.analysis.CollectAlignmentSummaryMetrics.main(CollectAlignmentSummaryMetrics.java:106) - +<b>Picard on line resources</b><ul> +<li><a href="http://picard.sourceforge.net/index.shtml">Click here for Picard Documentation</a></li> +<li><a href="http://picard.sourceforge.net/picard-metric-definitions.shtml">Click here for Picard Metrics definitions</a></li></ul><hr/> +<b>Picard output (transposed to make it easier to see)</b><hr/> +<table cellpadding="3" > +<tr class="d0"><td colspan="2">## net.sf.picard.metrics.StringHeader</td></tr><tr class="d1"><td colspan="2"># net.sf.picard.analysis.CollectAlignmentSummaryMetrics MAX_INSERT_SIZE=100000 ADAPTER_SEQUENCE=[AATGATACGGCGACCACCGAGATCTACACTCTTTCCCTACACGACGCTCTTCCGATCT, AGATCGGAAGAGCTCGTATGCCGTCTTCTGCTTG, AATGATACGGCGACCACCGAGATCTACACTCTTTCCCTACACGACGCTCTTCCGATCT, AGATCGGAAGAGCGGTTCAGCAGGAATGCCGAGACCGATCTCGTATGCCGTCTTCTGCTTG, AATGATACGGCGACCACCGAGATCTACACTCTTTCCCTACACGACGCTCTTCCGATCT, AGATCGGAAGAGCACACGTCTGAACTCCAGTCACNNNNNNNNATCTCGTATGCCGTCTTCTGCTTG, IS_BISULFITE_SEQUENCED=false] INPUT=/data/tmp/tmpLLcl1w/database/files/000/dataset_4.dat OUTPUT=/data/home/rlazarus/galaxy/database/job_working_directory/5/dataset_5_files/CollectAlignmentSummaryMetrics.metrics.txt REFERENCE_SEQUENCE=/data/home/rlazarus/galaxy/database/job_working_directory/5/dataset_5_files/hg19.fa_fake.fasta ASSUME_SORTED=true TMP_DIR=[/tmp] VALIDATION_STRINGENCY=LENIENT METRIC_ACCUMULATION_LEVEL=[ALL_READS] IS_BISULFITE_SEQUENCED=false STOP_AFTER=0 VERBOSITY=INFO QUIET=false COMPRESSION_LEVEL=5 MAX_RECORDS_IN_RAM=500000 CREATE_INDEX=false CREATE_MD5_FILE=false</td></tr><tr class="d0"><td colspan="2">## net.sf.picard.metrics.StringHeader</td></tr><tr class="d1"><td colspan="2"># Started on: Fri Nov 11 08:07:22 EST 2011</td></tr><tr class="d0"><td colspan="2">## METRICS CLASS net.sf.picard.analysis.AlignmentSummaryMetrics</td></tr><tr class="d0"><td>CATEGORY</td><td>FIRST_OF_PAIR </td></tr> +<tr class="d1"><td>TOTAL_READS</td><td>5 </td></tr> +<tr class="d0"><td>PF_READS</td><td>5 </td></tr> +<tr class="d1"><td>PCT_PF_READS</td><td>1 </td></tr> +<tr class="d0"><td>PF_NOISE_READS</td><td>0 </td></tr> +<tr class="d1"><td>PF_READS_ALIGNED</td><td>0 </td></tr> +<tr class="d0"><td>PCT_PF_READS_ALIGNED</td><td>0 </td></tr> +<tr class="d1"><td>PF_ALIGNED_BASES</td><td>0 </td></tr> +<tr class="d0"><td>PF_HQ_ALIGNED_READS</td><td>0 </td></tr> +<tr class="d1"><td>PF_HQ_ALIGNED_BASES</td><td>0 </td></tr> +<tr class="d0"><td>PF_HQ_ALIGNED_Q20_BASES</td><td>0 </td></tr> +<tr class="d1"><td>PF_HQ_MEDIAN_MISMATCHES</td><td>0 </td></tr> +<tr class="d0"><td>PF_MISMATCH_RATE</td><td>0 </td></tr> +<tr class="d1"><td>PF_HQ_ERROR_RATE</td><td>0 </td></tr> +<tr class="d0"><td>PF_INDEL_RATE</td><td>0 </td></tr> +<tr class="d1"><td>MEAN_READ_LENGTH</td><td>13 </td></tr> +<tr class="d0"><td>READS_ALIGNED_IN_PAIRS</td><td>0 </td></tr> +<tr class="d1"><td>PCT_READS_ALIGNED_IN_PAIRS</td><td>0 </td></tr> +<tr class="d0"><td>BAD_CYCLES</td><td>0 </td></tr> +<tr class="d1"><td>STRAND_BALANCE</td><td>0 </td></tr> +<tr class="d0"><td>PCT_CHIMERAS</td><td>0 </td></tr> +<tr class="d1"><td>PCT_ADAPTER</td><td>0 </td></tr> +<tr class="d0"><td>SAMPLE</td><td> </td></tr> +<tr class="d1"><td>LIBRARY</td><td> </td></tr> +<tr class="d0"><td>READ_GROUP +</td><td> + </td></tr> +</table> +<b>Picard Tool Run Log</b><hr/> +<pre>INFO:root:## executing java -Xmx4g -jar /data/home/rlazarus/galaxy/tool-data/shared/jars/picard/CollectAlignmentSummaryMetrics.jar VALIDATION_STRINGENCY=LENIENT ASSUME_SORTED=true ADAPTER_SEQUENCE= IS_BISULFITE_SEQUENCED=false MAX_INSERT_SIZE=100000 OUTPUT=/data/home/rlazarus/galaxy/database/job_working_directory/5/dataset_5_files/CollectAlignmentSummaryMetrics.metrics.txt R=/data/home/rlazarus/galaxy/database/job_working_directory/5/dataset_5_files/hg19.fa_fake.fasta TMP_DIR=/tmp INPUT=/data/tmp/tmpLLcl1w/database/files/000/dataset_4.dat returned status 0 and nothing on stderr </pre><hr/>The freely available <a href="http://picard.sourceforge.net/command-line-overview.shtml">Picard software</a> generated all outputs reported here running as a <a href="http://getgalaxy.org">Galaxy</a> tool</div></body></html> diff -r 6ec2d7f4a64dcf6a1c49415bd8f40c8d4ca907c5 -r a807ed5389f4da39f509aa45e5baf7027ceb7a91 test-data/picard_output_alignment_summary_metrics.html --- a/test-data/picard_output_alignment_summary_metrics.html +++ b/test-data/picard_output_alignment_summary_metrics.html @@ -12,7 +12,7 @@ </head><body><div class="document"> -Galaxy tool CollectAlignmentSummaryMetrics run at 11/05/2011 23:16:24</b><br/><b>The following output files were created (click the filename to view/download a copy):</b><hr/><table> +Galaxy tool CollectAlignmentSummaryMetrics run at 11/11/2011 08:07:10</b><br/><b>The following output files were created (click the filename to view/download a copy):</b><hr/><table><tr><td><a href="CollectAlignmentSummaryMetrics.log">CollectAlignmentSummaryMetrics.log</a></td></tr><tr><td><a href="CollectAlignmentSummaryMetrics.metrics.txt">CollectAlignmentSummaryMetrics.metrics.txt</a></td></tr></table><p/> @@ -21,43 +21,38 @@ <li><a href="http://picard.sourceforge.net/picard-metric-definitions.shtml">Click here for Picard Metrics definitions</a></li></ul><hr/><b>Picard output (transposed to make it easier to see)</b><hr/><table cellpadding="3" > -<tr class="d0"><td colspan="2">## net.sf.picard.metrics.StringHeader</td></tr><tr class="d1"><td colspan="2"># net.sf.picard.analysis.CollectAlignmentSummaryMetrics MAX_INSERT_SIZE=100000 ADAPTER_SEQUENCE=[AATGATACGGCGACCACCGAGATCTACACTCTTTCCCTACACGACGCTCTTCCGATCT, AGATCGGAAGAGCTCGTATGCCGTCTTCTGCTTG, AATGATACGGCGACCACCGAGATCTACACTCTTTCCCTACACGACGCTCTTCCGATCT, AGATCGGAAGAGCGGTTCAGCAGGAATGCCGAGACCGATCTCGTATGCCGTCTTCTGCTTG, AATGATACGGCGACCACCGAGATCTACACTCTTTCCCTACACGACGCTCTTCCGATCT, AGATCGGAAGAGCACACGTCTGAACTCCAGTCACNNNNNNNNATCTCGTATGCCGTCTTCTGCTTG, IS_BISULFITE_SEQUENCED=false] INPUT=/export/tmp/tmp1-mt_l/database/files/000/dataset_2.dat OUTPUT=/udd/rerla/galaxy-central/database/job_working_directory/3/dataset_3_files/CollectAlignmentSummaryMetrics.metrics.txt REFERENCE_SEQUENCE=/udd/rerla/galaxy-central/database/job_working_directory/3/dataset_3_files/CollectAlignmentSummaryMetricsZJS8q6.fasta_fake.fasta ASSUME_SORTED=true TMP_DIR=/tmp VALIDATION_STRINGENCY=LENIENT IS_BISULFITE_SEQUENCED=false STOP_AFTER=0 VERBOSITY=INFO QUIET=false COMPRESSION_LEVEL=5 MAX_RECORDS_IN_RAM=500000 CREATE_INDEX=false CREATE_MD5_FILE=false</td></tr><tr class="d0"><td colspan="2">## net.sf.picard.metrics.StringHeader</td></tr><tr class="d1"><td colspan="2"># Started on: Wed May 11 23:16:24 EDT 2011</td></tr><tr class="d0"><td colspan="2">## METRICS CLASS net.sf.picard.analysis.AlignmentSummaryMetrics</td></tr><tr class="d0"><td>CATEGORY</td><td>FIRST_OF_PAIR </td></tr> +<tr class="d0"><td colspan="2">## net.sf.picard.metrics.StringHeader</td></tr><tr class="d1"><td colspan="2"># net.sf.picard.analysis.CollectAlignmentSummaryMetrics MAX_INSERT_SIZE=100000 ADAPTER_SEQUENCE=[AATGATACGGCGACCACCGAGATCTACACTCTTTCCCTACACGACGCTCTTCCGATCT, AGATCGGAAGAGCTCGTATGCCGTCTTCTGCTTG, AATGATACGGCGACCACCGAGATCTACACTCTTTCCCTACACGACGCTCTTCCGATCT, AGATCGGAAGAGCGGTTCAGCAGGAATGCCGAGACCGATCTCGTATGCCGTCTTCTGCTTG, AATGATACGGCGACCACCGAGATCTACACTCTTTCCCTACACGACGCTCTTCCGATCT, AGATCGGAAGAGCACACGTCTGAACTCCAGTCACNNNNNNNNATCTCGTATGCCGTCTTCTGCTTG, IS_BISULFITE_SEQUENCED=false] INPUT=/data/tmp/tmpLLcl1w/database/files/000/dataset_2.dat OUTPUT=/data/home/rlazarus/galaxy/database/job_working_directory/3/dataset_3_files/CollectAlignmentSummaryMetrics.metrics.txt REFERENCE_SEQUENCE=/data/home/rlazarus/galaxy/database/job_working_directory/3/dataset_3_files/CollectAlignmentSummaryMetricsfq2hit.fasta_fake.fasta ASSUME_SORTED=true TMP_DIR=[/tmp] VALIDATION_STRINGENCY=LENIENT METRIC_ACCUMULATION_LEVEL=[ALL_READS] IS_BISULFITE_SEQUENCED=false STOP_AFTER=0 VERBOSITY=INFO QUIET=false COMPRESSION_LEVEL=5 MAX_RECORDS_IN_RAM=500000 CREATE_INDEX=false CREATE_MD5_FILE=false</td></tr><tr class="d0"><td colspan="2">## net.sf.picard.metrics.StringHeader</td></tr><tr class="d1"><td colspan="2"># Started on: Fri Nov 11 08:07:10 EST 2011</td></tr><tr class="d0"><td colspan="2">## METRICS CLASS net.sf.picard.analysis.AlignmentSummaryMetrics</td></tr><tr class="d0"><td>CATEGORY</td><td>FIRST_OF_PAIR </td></tr><tr class="d1"><td>TOTAL_READS</td><td>4 </td></tr><tr class="d0"><td>PF_READS</td><td>4 </td></tr><tr class="d1"><td>PCT_PF_READS</td><td>1 </td></tr><tr class="d0"><td>PF_NOISE_READS</td><td>0 </td></tr><tr class="d1"><td>PF_READS_ALIGNED</td><td>4 </td></tr><tr class="d0"><td>PCT_PF_READS_ALIGNED</td><td>1 </td></tr> -<tr class="d1"><td>PF_HQ_ALIGNED_READS</td><td>4 </td></tr> -<tr class="d0"><td>PF_HQ_ALIGNED_BASES</td><td>404 </td></tr> -<tr class="d1"><td>PF_HQ_ALIGNED_Q20_BASES</td><td>28 </td></tr> -<tr class="d0"><td>PF_HQ_MEDIAN_MISMATCHES</td><td>78 </td></tr> +<tr class="d1"><td>PF_ALIGNED_BASES</td><td>404 </td></tr> +<tr class="d0"><td>PF_HQ_ALIGNED_READS</td><td>4 </td></tr> +<tr class="d1"><td>PF_HQ_ALIGNED_BASES</td><td>404 </td></tr> +<tr class="d0"><td>PF_HQ_ALIGNED_Q20_BASES</td><td>28 </td></tr> +<tr class="d1"><td>PF_HQ_MEDIAN_MISMATCHES</td><td>78 </td></tr> +<tr class="d0"><td>PF_MISMATCH_RATE</td><td>0.777228 </td></tr><tr class="d1"><td>PF_HQ_ERROR_RATE</td><td>0.777228 </td></tr> -<tr class="d0"><td>MEAN_READ_LENGTH</td><td>101 </td></tr> -<tr class="d1"><td>READS_ALIGNED_IN_PAIRS</td><td>3 </td></tr> -<tr class="d0"><td>PCT_READS_ALIGNED_IN_PAIRS</td><td>0.75 </td></tr> -<tr class="d1"><td>BAD_CYCLES</td><td>63 </td></tr> -<tr class="d0"><td>STRAND_BALANCE</td><td>0.25 </td></tr> -<tr class="d1"><td>PCT_CHIMERAS</td><td>0 </td></tr> -<tr class="d0"><td>PCT_ADAPTER -</td><td>0 +<tr class="d0"><td>PF_INDEL_RATE</td><td>0 </td></tr> +<tr class="d1"><td>MEAN_READ_LENGTH</td><td>101 </td></tr> +<tr class="d0"><td>READS_ALIGNED_IN_PAIRS</td><td>3 </td></tr> +<tr class="d1"><td>PCT_READS_ALIGNED_IN_PAIRS</td><td>0.75 </td></tr> +<tr class="d0"><td>BAD_CYCLES</td><td>63 </td></tr> +<tr class="d1"><td>STRAND_BALANCE</td><td>0.25 </td></tr> +<tr class="d0"><td>PCT_CHIMERAS</td><td>0 </td></tr> +<tr class="d1"><td>PCT_ADAPTER</td><td>0 </td></tr> +<tr class="d0"><td>SAMPLE</td><td> </td></tr> +<tr class="d1"><td>LIBRARY</td><td> </td></tr> +<tr class="d0"><td>READ_GROUP +</td><td> </td></tr></table><b>Picard Tool Run Log</b><hr/> -<pre>Wed, 11 May 2011 23:16:24 INFO - ## executing java -Xmx2g -jar /udd/rerla/galaxy-central/tool-data/shared/jars/CreateSequenceDictionary.jar REFERENCE=/tmp/CollectAlignmentSummaryMetricsZJS8q6.fasta OUTPUT=/tmp/CollectAlignmentSummaryMetricsZJS8q6.dict URI=dataset_1.dat TRUNCATE_NAMES_AT_WHITESPACE=None returned status 0 and stderr: -[Wed May 11 23:16:24 EDT 2011] net.sf.picard.sam.CreateSequenceDictionary REFERENCE=/tmp/CollectAlignmentSummaryMetricsZJS8q6.fasta OUTPUT=/tmp/CollectAlignmentSummaryMetricsZJS8q6.dict URI=dataset_1.dat TRUNCATE_NAMES_AT_WHITESPACE=false NUM_SEQUENCES=2147483647 TMP_DIR=/tmp/rerla VERBOSITY=INFO QUIET=false VALIDATION_STRINGENCY=STRICT COMPRESSION_LEVEL=5 MAX_RECORDS_IN_RAM=500000 CREATE_INDEX=false CREATE_MD5_FILE=false -[Wed May 11 23:16:24 EDT 2011] net.sf.picard.sam.CreateSequenceDictionary done. -Runtime.totalMemory()=9109504 +<pre>INFO:root:## executing java -Xmx4g -jar /data/home/rlazarus/galaxy/tool-data/shared/jars/picard/CreateSequenceDictionary.jar REFERENCE=/tmp/CollectAlignmentSummaryMetricsfq2hit.fasta OUTPUT=/tmp/CollectAlignmentSummaryMetricsfq2hit.dict URI=dataset_1.dat TRUNCATE_NAMES_AT_WHITESPACE=None returned status 0 and nothing on stderr - -Wed, 11 May 2011 23:16:24 INFO - ## executing java -Xmx2g -jar /udd/rerla/galaxy-central/tool-data/shared/jars/CollectAlignmentSummaryMetrics.jar VALIDATION_STRINGENCY=LENIENT ASSUME_SORTED=true ADAPTER_SEQUENCE= IS_BISULFITE_SEQUENCED=false MAX_INSERT_SIZE=100000 OUTPUT=/udd/rerla/galaxy-central/database/job_working_directory/3/dataset_3_files/CollectAlignmentSummaryMetrics.metrics.txt R=/udd/rerla/galaxy-central/database/job_working_directory/3/dataset_3_files/CollectAlignmentSummaryMetricsZJS8q6.fasta_fake.fasta TMP_DIR=/tmp INPUT=/export/tmp/tmp1-mt_l/database/files/000/dataset_2.dat returned status 0 and stderr: -[Wed May 11 23:16:24 EDT 2011] net.sf.picard.analysis.CollectAlignmentSummaryMetrics MAX_INSERT_SIZE=100000 ADAPTER_SEQUENCE=[AATGATACGGCGACCACCGAGATCTACACTCTTTCCCTACACGACGCTCTTCCGATCT, AGATCGGAAGAGCTCGTATGCCGTCTTCTGCTTG, AATGATACGGCGACCACCGAGATCTACACTCTTTCCCTACACGACGCTCTTCCGATCT, AGATCGGAAGAGCGGTTCAGCAGGAATGCCGAGACCGATCTCGTATGCCGTCTTCTGCTTG, AATGATACGGCGACCACCGAGATCTACACTCTTTCCCTACACGACGCTCTTCCGATCT, AGATCGGAAGAGCACACGTCTGAACTCCAGTCACNNNNNNNNATCTCGTATGCCGTCTTCTGCTTG, IS_BISULFITE_SEQUENCED=false] INPUT=/export/tmp/tmp1-mt_l/database/files/000/dataset_2.dat OUTPUT=/udd/rerla/galaxy-central/database/job_working_directory/3/dataset_3_files/CollectAlignmentSummaryMetrics.metrics.txt REFERENCE_SEQUENCE=/udd/rerla/galaxy-central/database/job_working_directory/3/dataset_3_files/CollectAlignmentSummaryMetricsZJS8q6.fasta_fake.fasta ASSUME_SORTED=true TMP_DIR=/tmp VALIDATION_STRINGENCY=LENIENT IS_BISULFITE_SEQUENCED=false STOP_AFTER=0 VERBOSITY=INFO QUIET=false COMPRESSION_LEVEL=5 MAX_RECORDS_IN_RAM=500000 CREATE_INDEX=false CREATE_MD5_FILE=false -WARNING 2011-05-11 23:16:24 SinglePassSamProgram File reports sort order 'queryname', assuming it's coordinate sorted anyway. -[Wed May 11 23:16:24 EDT 2011] net.sf.picard.analysis.CollectAlignmentSummaryMetrics done. -Runtime.totalMemory()=9109504 - +INFO:root:## executing java -Xmx4g -jar /data/home/rlazarus/galaxy/tool-data/shared/jars/picard/CollectAlignmentSummaryMetrics.jar VALIDATION_STRINGENCY=LENIENT ASSUME_SORTED=true ADAPTER_SEQUENCE= IS_BISULFITE_SEQUENCED=false MAX_INSERT_SIZE=100000 OUTPUT=/data/home/rlazarus/galaxy/database/job_working_directory/3/dataset_3_files/CollectAlignmentSummaryMetrics.metrics.txt R=/data/home/rlazarus/galaxy/database/job_working_directory/3/dataset_3_files/CollectAlignmentSummaryMetricsfq2hit.fasta_fake.fasta TMP_DIR=/tmp INPUT=/data/tmp/tmpLLcl1w/database/files/000/dataset_2.dat returned status 0 and nothing on stderr </pre><hr/>The freely available <a href="http://picard.sourceforge.net/command-line-overview.shtml">Picard software</a> generated all outputs reported here running as a <a href="http://getgalaxy.org">Galaxy</a> tool</div></body></html> diff -r 6ec2d7f4a64dcf6a1c49415bd8f40c8d4ca907c5 -r a807ed5389f4da39f509aa45e5baf7027ceb7a91 tools/picard/picard_wrapper.py --- a/tools/picard/picard_wrapper.py +++ b/tools/picard/picard_wrapper.py @@ -125,14 +125,15 @@ tef.close() stderrs = self.readLarge(temperr) stdouts = self.readLarge(templog) - if len(stderrs) > 0: + if rval > 0: s = '## executing %s returned status %d and stderr: \n%s\n' % (cl,rval,stderrs) + stdouts = '%s\n%s' % (stdouts,stderrs) else: s = '## executing %s returned status %d and nothing on stderr\n' % (cl,rval) logging.info(s) os.unlink(templog) # always os.unlink(temperr) # always - return s, stdouts # sometimes this is an output + return s, stdouts, rval # sometimes s is an output def runPic(self, jar, cl): """ @@ -141,8 +142,8 @@ runme = ['java -Xmx%s' % self.opts.maxjheap] runme.append('-jar %s' % jar) runme += cl - s,stdout = self.runCL(cl=runme, output_dir=self.opts.outdir) - return stdout + s,stdouts,rval = self.runCL(cl=runme, output_dir=self.opts.outdir) + return stdouts,rval def samToBam(self,infile=None,outdir=None): """ @@ -150,8 +151,8 @@ """ fd,tempbam = tempfile.mkstemp(dir=outdir,suffix='rgutilsTemp.bam') cl = ['samtools view -h -b -S -o ',tempbam,infile] - tlog,stdouts = self.runCL(cl,outdir) - return tlog,tempbam + tlog,stdouts,rval = self.runCL(cl,outdir) + return tlog,tempbam,rval #def bamToSam(self,infile=None,outdir=None): # """ @@ -167,7 +168,7 @@ """ print '## sortSam got infile=%s,outfile=%s,outdir=%s' % (infile,outfile,outdir) cl = ['samtools sort',infile,outfile] - tlog,stdouts = self.runCL(cl,outdir) + tlog,stdouts,rval = self.runCL(cl,outdir) return tlog def cleanup(self): @@ -243,6 +244,9 @@ if len(pdflist) > 0: # assumes all pdfs come with thumbnail .jpgs for p in pdflist: imghref = '%s.jpg' % os.path.splitext(p)[0] # removes .pdf + mimghref = '%s-0.jpg' % os.path.splitext(p)[0] # multiple pages pdf -> multiple thumbnails without asking! + if mimghref in flist: + imghref=mimghref res.append('<table cellpadding="10"><tr><td>\n') res.append('<a href="%s"><img src="%s" title="Click image preview for a print quality PDF version" hspace="10" align="middle"></a>\n' % (p,imghref)) res.append('</tr></td></table>\n') @@ -383,6 +387,8 @@ op.add_option('', '--taillimit', default="0") op.add_option('', '--histwidth', default="0") op.add_option('', '--minpct', default="0.01") + op.add_option('', '--malevel', default="") + op.add_option('', '--deviations', default="0.0") # CollectAlignmentSummaryMetrics op.add_option('', '--maxinsert', default="20") op.add_option('', '--adaptors', action='append', type="string") @@ -430,7 +436,8 @@ tmp_dir = opts.outdir haveTempout = False # we use this where sam output is an option - + rval = 0 + stdouts = 'Not run yet' # set ref and dict files to use (create if necessary) ref_file_name = opts.ref if opts.ref_file <> None: @@ -453,7 +460,7 @@ pic.delme.append(dict_file_name) pic.delme.append(ref_file_name) pic.delme.append(tmp_ref_name) - s = pic.runPic(jarpath, cl) + stdouts,rval = pic.runPic(jarpath, cl) # run relevant command(s) # define temporary output @@ -486,7 +493,7 @@ cl.append('RGCN="%s"' % opts.rg_seq_center) if opts.rg_desc: cl.append('RGDS="%s"' % opts.rg_desc) - pic.runPic(opts.jar, cl) + stdouts,rval = pic.runPic(opts.jar, cl) haveTempout = True elif pic.picname == 'BamIndexStats': @@ -499,9 +506,9 @@ pic.delme.append(tmp_bam_name) pic.delme.append(tmp_bai_name) pic.delme.append(tmp_name) - s = pic.runPic( opts.jar, cl ) + stdouts,rval = pic.runPic( opts.jar, cl ) f = open(pic.metricsOut,'a') - f.write(s) # got this on stdout from runCl + f.write(stdouts) # got this on stdout from runCl f.write('\n') f.close() doTranspose = False # but not transposed @@ -519,7 +526,7 @@ cl.append('READ_NAME_REGEX="%s"' % opts.readregex) if float(opts.optdupdist) > 0: cl.append('OPTICAL_DUPLICATE_PIXEL_DISTANCE=%s' % opts.optdupdist) - pic.runPic(opts.jar,cl) + stdouts,rval = pic.runPic(opts.jar, cl) elif pic.picname == 'CollectAlignmentSummaryMetrics': # Why do we do this fakefasta thing? Because we need NO fai to be available or picard barfs unless it has the same length as the input data. @@ -532,7 +539,7 @@ info = s shutil.copy(ref_file_name,fakefasta) pic.delme.append(fakefasta) - cl.append('ASSUME_SORTED=%s' % opts.assumesorted) + cl.append('ASSUME_SORTED=true') adaptorseqs = ''.join([' ADAPTER_SEQUENCE=%s' % x for x in opts.adaptors]) cl.append(adaptorseqs) cl.append('IS_BISULFITE_SEQUENCED=%s' % opts.bisulphite) @@ -541,13 +548,24 @@ cl.append('R=%s' % fakefasta) cl.append('TMP_DIR=%s' % opts.tmpdir) if not opts.assumesorted.lower() == 'true': # we need to sort input - fakeinput = '%s.sorted' % opts.input - s = pic.sortSam(opts.input, fakeinput, opts.outdir) - pic.delme.append(fakeinput) - cl.append('INPUT=%s' % fakeinput) + sortedfile = '%s.sorted' % os.path.basename(opts.input) + if opts.datatype == 'sam': # need to work with a bam + tlog,tempbam,rval = pic.samToBam(opts.input,opts.outdir) + pic.delme.append(tempbam) + try: + tlog = pic.sortSam(tempbam,sortedfile,opts.outdir) + except: + print '## exception on sorting sam file %s' % opts.input + else: # is already bam + try: + tlog = pic.sortSam(opts.input,sortedfile,opts.outdir) + except: # bug - [bam_sort_core] not being ignored - TODO fixme + print '## exception on sorting bam file %s' % opts.input + cl.append('INPUT=%s.bam' % os.path.abspath(os.path.join(opts.outdir,sortedfile))) + pic.delme.append(os.path.join(opts.outdir,sortedfile)) else: cl.append('INPUT=%s' % os.path.abspath(opts.input)) - pic.runPic(opts.jar,cl) + stdouts,rval = pic.runPic(opts.jar, cl) elif pic.picname == 'CollectGcBiasMetrics': @@ -575,10 +593,10 @@ cl.append('TMP_DIR=%s' % opts.tmpdir) cl.append('CHART_OUTPUT=%s' % temppdf) cl.append('SUMMARY_OUTPUT=%s' % pic.metricsOut) - pic.runPic(opts.jar,cl) + stdouts,rval = pic.runPic(opts.jar, cl) if os.path.isfile(temppdf): cl2 = ['convert','-resize x400',temppdf,os.path.join(opts.outdir,jpgname)] # make the jpg for fixPicardOutputs to find - s,stdouts = pic.runCL(cl=cl2,output_dir=opts.outdir) + s,stdouts,rval = pic.runCL(cl=cl2,output_dir=opts.outdir) else: s='### runGC: Unable to find pdf %s - please check the log for the causal problem\n' % temppdf lf = open(pic.log_filename,'a') @@ -587,29 +605,39 @@ lf.close() elif pic.picname == 'CollectInsertSizeMetrics': + """ <command interpreter="python"> + picard_wrapper.py -i "$input_file" -n "$out_prefix" --tmpdir "${__new_file_path__}" --deviations "$deviations" + --histwidth "$histWidth" --minpct "$minPct" --malevel "$malevel" + -j "${GALAXY_DATA_INDEX_DIR}/shared/jars/picard/CollectInsertSizeMetrics.jar" -d "$html_file.files_path" -t "$html_file" + </command> + """ isPDF = 'InsertSizeHist.pdf' pdfpath = os.path.join(opts.outdir,isPDF) histpdf = 'InsertSizeHist.pdf' cl.append('I=%s' % opts.input) cl.append('O=%s' % pic.metricsOut) cl.append('HISTOGRAM_FILE=%s' % histpdf) - if opts.taillimit <> '0': - cl.append('TAIL_LIMIT=%s' % opts.taillimit) + #if opts.taillimit <> '0': # this was deprecated although still mentioned in the docs at 1.56 + # cl.append('TAIL_LIMIT=%s' % opts.taillimit) if opts.histwidth <> '0': cl.append('HISTOGRAM_WIDTH=%s' % opts.histwidth) if float( opts.minpct) > 0.0: cl.append('MINIMUM_PCT=%s' % opts.minpct) - pic.runPic(opts.jar,cl) + if float(opts.deviations) > 0.0: + cl.append('DEVIATIONS=%s' % opts.deviations) + if opts.malevel.strip(): + malevels = ['METRIC_ACCUMULATION_LEVEL=%s' % x for x in opts.malevel.split(',')] + cl.append(' '.join(malevels)) + stdouts,rval = pic.runPic(opts.jar, cl) if os.path.exists(pdfpath): # automake thumbnail - will be added to html cl2 = ['mogrify', '-format jpg -resize x400 %s' % pdfpath] - s,stdouts = pic.runCL(cl=cl2,output_dir=opts.outdir) + pic.runCL(cl=cl2,output_dir=opts.outdir) else: s = 'Unable to find expected pdf file %s<br/>\n' % pdfpath s += 'This <b>always happens if single ended data was provided</b> to this tool,\n' s += 'so please double check that your input data really is paired-end NGS data.<br/>\n' s += 'If your input was paired data this may be a bug worth reporting to the galaxy-bugs list\n<br/>' - stdouts = '' - logging.info(s) + logging.info(s) if len(stdouts) > 0: logging.info(stdouts) @@ -627,13 +655,13 @@ cl.append('READ_NAME_REGEX="%s"' % opts.readregex) # maximum offset between two duplicate clusters cl.append('OPTICAL_DUPLICATE_PIXEL_DISTANCE=%s' % opts.optdupdist) - pic.runPic(opts.jar, cl) + stdouts,rval = pic.runPic(opts.jar, cl) elif pic.picname == 'FixMateInformation': cl.append('I=%s' % opts.input) cl.append('O=%s' % tempout) cl.append('SORT_ORDER=%s' % opts.sortorder) - pic.runPic(opts.jar,cl) + stdouts,rval = pic.runPic(opts.jar,cl) haveTempout = True elif pic.picname == 'ReorderSam': @@ -649,14 +677,14 @@ # contig length discordance if opts.allow_contig_len_discord == 'true': cl.append('ALLOW_CONTIG_LENGTH_DISCORDANCE=true') - pic.runPic(opts.jar, cl) + stdouts,rval = pic.runPic(opts.jar, cl) haveTempout = True elif pic.picname == 'ReplaceSamHeader': cl.append('INPUT=%s' % opts.input) cl.append('OUTPUT=%s' % tempout) cl.append('HEADER=%s' % opts.header_file) - pic.runPic(opts.jar, cl) + stdouts,rval = pic.runPic(opts.jar, cl) haveTempout = True elif pic.picname == 'CalculateHsMetrics': @@ -673,7 +701,7 @@ cl.append('INPUT=%s' % os.path.abspath(opts.input)) cl.append('OUTPUT=%s' % pic.metricsOut) cl.append('TMP_DIR=%s' % opts.tmpdir) - pic.runPic(opts.jar,cl) + stdouts,rval = pic.runPic(opts.jar,cl) elif pic.picname == 'ValidateSamFile': import pysam @@ -682,7 +710,7 @@ stf = open(pic.log_filename,'w') tlog = None if opts.datatype == 'sam': # need to work with a bam - tlog,tempbam = pic.samToBam(opts.input,opts.outdir) + tlog,tempbam,rval = pic.samToBam(opts.input,opts.outdir) try: tlog = pic.sortSam(tempbam,sortedfile,opts.outdir) except: @@ -709,7 +737,7 @@ cl.append('IS_BISULFITE_SEQUENCED=true') if opts.ref <> None or opts.ref_file <> None: cl.append('R=%s' % ref_file_name) - pic.runPic(opts.jar,cl) + stdouts,rval = pic.runPic(opts.jar,cl) if opts.datatype == 'sam': pic.delme.append(tempbam) newsam = opts.output @@ -725,10 +753,12 @@ if haveTempout: # Some Picard tools produced a potentially intermediate bam file. # Either just move to final location or create sam - shutil.move(tempout, os.path.abspath(opts.output)) - + if os.path.exists(tempout): + shutil.move(tempout, os.path.abspath(opts.output)) if opts.htmlout <> None or doFix: # return a pretty html page pic.fixPicardOutputs(transpose=doTranspose,maxloglines=maxloglines) - + if rval <> 0: + print >> sys.stderr, '## exit code=%d; stdout=%s' % (rval,stdouts) + # signal failure if __name__=="__main__": __main__() diff -r 6ec2d7f4a64dcf6a1c49415bd8f40c8d4ca907c5 -r a807ed5389f4da39f509aa45e5baf7027ceb7a91 tools/picard/rgPicardASMetrics.xml --- a/tools/picard/rgPicardASMetrics.xml +++ b/tools/picard/rgPicardASMetrics.xml @@ -1,7 +1,7 @@ <tool name="SAM/BAM Alignment Summary Metrics" id="PicardASMetrics" version="0.03.1"><command interpreter="python"> picard_wrapper.py -i "$input_file" -d "$html_file.files_path" -t "$html_file" - --assumesorted "$sorted" -b "$bisulphite" --adaptors "$adaptors" --maxinsert "$maxinsert" -n "$out_prefix" + --assumesorted "$sorted" -b "$bisulphite" --adaptors "$adaptors" --maxinsert "$maxinsert" -n "$out_prefix" --datatype "$input_file.ext" -j ${GALAXY_DATA_INDEX_DIR}/shared/jars/picard/CollectAlignmentSummaryMetrics.jar #if $genomeSource.refGenomeSource == "history": --ref-file "$genomeSource.ownFile" diff -r 6ec2d7f4a64dcf6a1c49415bd8f40c8d4ca907c5 -r a807ed5389f4da39f509aa45e5baf7027ceb7a91 tools/picard/rgPicardInsertSize.xml --- a/tools/picard/rgPicardInsertSize.xml +++ b/tools/picard/rgPicardInsertSize.xml @@ -1,9 +1,9 @@ -<tool name="Insertion size metrics" id="PicardInsertSize" version="0.3.1"> +<tool name="Insertion size metrics" id="PicardInsertSize" version="0.3.2"><description>for PAIRED data</description><requirements><requirement type="package">picard</requirement></requirements><command interpreter="python"> - picard_wrapper.py -i "$input_file" -n "$out_prefix" --tmpdir "${__new_file_path__}" --taillimit "$tailLimit" - --histwidth "$histWidth" --minpct "$minPct" + picard_wrapper.py -i "$input_file" -n "$out_prefix" --tmpdir "${__new_file_path__}" --deviations "$deviations" + --histwidth "$histWidth" --minpct "$minPct" --malevel "$malevel" -j "${GALAXY_DATA_INDEX_DIR}/shared/jars/picard/CollectInsertSizeMetrics.jar" -d "$html_file.files_path" -t "$html_file" </command><inputs> @@ -11,15 +11,22 @@ help="If empty, upload or import a SAM/BAM dataset."/><param name="out_prefix" value="Insertion size metrics" type="text" label="Title for the output file" help="Use this remind you what the job was for" size="120" /> - <param name="tailLimit" value="10000" type="integer" - label="Tail limit" size="5" - help="When calculating mean and stdev stop when the bins in the tail of the distribution contain fewer than mode/TAIL_LIMIT items" /> + <param name="deviations" value="10.0" type="float" + label="Deviations" size="5" + help="See Picard documentation: Generate mean, sd and plots by trimming the data down to MEDIAN + DEVIATIONS*MEDIAN_ABSOLUTE_DEVIATION" /><param name="histWidth" value="0" type="integer" label="Histogram width" size="5" - help="Explicitly sets the histogram width, overriding the TAIL_LIMIT option - leave 0 to ignore" /> - <param name="minPct" value="0.01" type="float" + help="Explicitly sets the histogram width option - leave 0 to ignore" /> + <param name="minPct" value="0.05" type="float" label="Minimum percentage" size="5" help="Discard any data categories (out of FR, TANDEM, RF) that have fewer than this percentage of overall reads" /> + <param name="malevel" value="0" type="select" multiple="true" label="Metric Accumulation Level" + help="Level(s) at which metrics will be accumulated"> + <option value="ALL_READS" selected="true">All reads (default)</option> + <option value="SAMPLE" default="true">Sample</option> + <option value="LIBRARY" default="true">Library</option> + <option value="READ_GROUP" default="true">Read group</option> + </param></inputs><outputs><data format="html" name="html_file" label="InsertSize_${out_prefix}.html"/> @@ -28,9 +35,10 @@ <test><param name="input_file" value="picard_input_tiny.sam" /><param name="out_prefix" value="Insertion size metrics" /> - <param name="tailLimit" value="10000" /> + <param name="deviations" value="10.0" /><param name="histWidth" value="0" /><param name="minPct" value="0.01" /> + <param name="malevel" value="ALL_READS" /><output name="html_file" file="picard_output_insertsize_tinysam.html" ftype="html" compare="contains" lines_diff="40" /></test></tests> https://bitbucket.org/galaxy/galaxy-central/changeset/1da4a4a928fb/ changeset: 1da4a4a928fb user: fubar date: 2011-11-11 02:01:07 summary: Some minor additional cleanup to the picard suite affected #: 1 file diff -r a807ed5389f4da39f509aa45e5baf7027ceb7a91 -r 1da4a4a928fb46a7725375a2cb0baa18f32c44b4 tools/picard/picard_wrapper.py --- a/tools/picard/picard_wrapper.py +++ b/tools/picard/picard_wrapper.py @@ -102,7 +102,7 @@ pass tmp.close() except Exception, e: - stop_err( 'Error : %s' % str( e ) ) + stop_err( 'Read Large Exception : %s' % str( e ) ) return s def runCL(self,cl=None,output_dir=None): @@ -154,15 +154,6 @@ tlog,stdouts,rval = self.runCL(cl,outdir) return tlog,tempbam,rval - #def bamToSam(self,infile=None,outdir=None): - # """ - # use samtools view to convert bam to sam - # """ - # fd,tempsam = tempfile.mkstemp(dir=outdir,suffix='rgutilsTemp.sam') - # cl = ['samtools view -h -o ',tempsam,infile] - # tlog,stdouts = self.runCL(cl,outdir) - # return tlog,tempsam - def sortSam(self, infile=None,outfile=None,outdir=None): """ """ @@ -243,10 +234,11 @@ pdflist = [x for x in flist if os.path.splitext(x)[-1].lower() == '.pdf'] if len(pdflist) > 0: # assumes all pdfs come with thumbnail .jpgs for p in pdflist: - imghref = '%s.jpg' % os.path.splitext(p)[0] # removes .pdf - mimghref = '%s-0.jpg' % os.path.splitext(p)[0] # multiple pages pdf -> multiple thumbnails without asking! + pbase = os.path.splitext(p)[0] # removes .pdf + imghref = '%s.jpg' % pbase + mimghref = '%s-0.jpg' % pbase # multiple pages pdf -> multiple thumbnails without asking! if mimghref in flist: - imghref=mimghref + imghref=mimghref # only one for thumbnail...it's a multi page pdf res.append('<table cellpadding="10"><tr><td>\n') res.append('<a href="%s"><img src="%s" title="Click image preview for a print quality PDF version" hspace="10" align="middle"></a>\n' % (p,imghref)) res.append('</tr></td></table>\n') @@ -387,7 +379,7 @@ op.add_option('', '--taillimit', default="0") op.add_option('', '--histwidth', default="0") op.add_option('', '--minpct', default="0.01") - op.add_option('', '--malevel', default="") + op.add_option('', '--malevel', action='append', type="string") op.add_option('', '--deviations', default="0.0") # CollectAlignmentSummaryMetrics op.add_option('', '--maxinsert', default="20") @@ -529,13 +521,14 @@ stdouts,rval = pic.runPic(opts.jar, cl) elif pic.picname == 'CollectAlignmentSummaryMetrics': - # Why do we do this fakefasta thing? Because we need NO fai to be available or picard barfs unless it has the same length as the input data. + # Why do we do this fakefasta thing? + # Because we need NO fai to be available or picard barfs unless it matches the input data. # why? Dunno Seems to work without complaining if the .bai file is AWOL.... fakefasta = os.path.join(opts.outdir,'%s_fake.fasta' % os.path.basename(ref_file_name)) try: os.symlink(ref_file_name,fakefasta) except: - s = '## unable to symlink %s to %s - different devices? May need to replace with shutil.copy' + s = '## unable to symlink %s to %s - different devices? Will shutil.copy' info = s shutil.copy(ref_file_name,fakefasta) pic.delme.append(fakefasta) @@ -550,7 +543,7 @@ if not opts.assumesorted.lower() == 'true': # we need to sort input sortedfile = '%s.sorted' % os.path.basename(opts.input) if opts.datatype == 'sam': # need to work with a bam - tlog,tempbam,rval = pic.samToBam(opts.input,opts.outdir) + tlog,tempbam,trval = pic.samToBam(opts.input,opts.outdir) pic.delme.append(tempbam) try: tlog = pic.sortSam(tempbam,sortedfile,opts.outdir) @@ -559,8 +552,8 @@ else: # is already bam try: tlog = pic.sortSam(opts.input,sortedfile,opts.outdir) - except: # bug - [bam_sort_core] not being ignored - TODO fixme - print '## exception on sorting bam file %s' % opts.input + except : # bug - [bam_sort_core] not being ignored - TODO fixme + print '## exception %s on sorting bam file %s' % (sys.exc_info()[0],opts.input) cl.append('INPUT=%s.bam' % os.path.abspath(os.path.join(opts.outdir,sortedfile))) pic.delme.append(os.path.join(opts.outdir,sortedfile)) else: @@ -625,8 +618,8 @@ cl.append('MINIMUM_PCT=%s' % opts.minpct) if float(opts.deviations) > 0.0: cl.append('DEVIATIONS=%s' % opts.deviations) - if opts.malevel.strip(): - malevels = ['METRIC_ACCUMULATION_LEVEL=%s' % x for x in opts.malevel.split(',')] + if opts.malevel: + malevels = ['METRIC_ACCUMULATION_LEVEL=%s' % x for x in opts.malevel] cl.append(' '.join(malevels)) stdouts,rval = pic.runPic(opts.jar, cl) if os.path.exists(pdfpath): # automake thumbnail - will be added to html https://bitbucket.org/galaxy/galaxy-central/changeset/0474dfc4d30f/ changeset: 0474dfc4d30f user: fubar date: 2011-11-11 02:45:25 summary: branch merge affected #: 14 files diff -r 1da4a4a928fb46a7725375a2cb0baa18f32c44b4 -r 0474dfc4d30f0d77aac42f1a0a8355998f213bfd lib/galaxy/web/base/controller.py --- a/lib/galaxy/web/base/controller.py +++ b/lib/galaxy/web/base/controller.py @@ -19,7 +19,6 @@ from Cheetah.Template import Template - pkg_resources.require( 'elementtree' ) from elementtree import ElementTree, ElementInclude from elementtree.ElementTree import Element @@ -1298,6 +1297,9 @@ group_list_grid = None quota_list_grid = None repository_list_grid = None + delete_operation = None + undelete_operation = None + purge_operation = None @web.expose @web.require_admin @@ -2217,6 +2219,13 @@ **kwd ) ) elif operation == "manage roles and groups": return self.manage_roles_and_groups_for_user( trans, **kwd ) + if trans.app.config.allow_user_deletion: + if self.delete_operation not in self.user_list_grid.operations: + self.user_list_grid.operations.append( self.delete_operation ) + if self.undelete_operation not in self.user_list_grid.operations: + self.user_list_grid.operations.append( self.undelete_operation ) + if self.purge_operation not in self.user_list_grid.operations: + self.user_list_grid.operations.append( self.purge_operation ) # Render the list view return self.user_list_grid( trans, **kwd ) @web.expose diff -r 1da4a4a928fb46a7725375a2cb0baa18f32c44b4 -r 0474dfc4d30f0d77aac42f1a0a8355998f213bfd lib/galaxy/web/controllers/admin.py --- a/lib/galaxy/web/controllers/admin.py +++ b/lib/galaxy/web/controllers/admin.py @@ -93,11 +93,6 @@ allow_popup=False, url_args=dict( webapp="galaxy", action="reset_user_password" ) ) ] - #TODO: enhance to account for trans.app.config.allow_user_deletion here so that we can eliminate these operations if - # the setting is False - #operations.append( grids.GridOperation( "Delete", condition=( lambda item: not item.deleted ), allow_multiple=True ) ) - #operations.append( grids.GridOperation( "Undelete", condition=( lambda item: item.deleted and not item.purged ), allow_multiple=True ) ) - #operations.append( grids.GridOperation( "Purge", condition=( lambda item: item.deleted and not item.purged ), allow_multiple=True ) ) standard_filters = [ grids.GridColumnFilter( "Active", args=dict( deleted=False ) ), grids.GridColumnFilter( "Deleted", args=dict( deleted=True, purged=False ) ), @@ -443,6 +438,9 @@ group_list_grid = GroupListGrid() quota_list_grid = QuotaListGrid() repository_list_grid = RepositoryListGrid() + delete_operation = grids.GridOperation( "Delete", condition=( lambda item: not item.deleted ), allow_multiple=True ) + undelete_operation = grids.GridOperation( "Undelete", condition=( lambda item: item.deleted and not item.purged ), allow_multiple=True ) + purge_operation = grids.GridOperation( "Purge", condition=( lambda item: item.deleted and not item.purged ), allow_multiple=True ) @web.expose @web.require_admin diff -r 1da4a4a928fb46a7725375a2cb0baa18f32c44b4 -r 0474dfc4d30f0d77aac42f1a0a8355998f213bfd lib/galaxy/webapps/community/config.py --- a/lib/galaxy/webapps/community/config.py +++ b/lib/galaxy/webapps/community/config.py @@ -61,6 +61,7 @@ self.remote_user_logout_href = kwargs.get( "remote_user_logout_href", None ) self.require_login = string_as_bool( kwargs.get( "require_login", "False" ) ) self.allow_user_creation = string_as_bool( kwargs.get( "allow_user_creation", "True" ) ) + self.allow_user_deletion = string_as_bool( kwargs.get( "allow_user_deletion", "False" ) ) self.enable_openid = string_as_bool( kwargs.get( 'enable_openid', False ) ) self.template_path = resolve_path( kwargs.get( "template_path", "templates" ), self.root ) self.template_cache = resolve_path( kwargs.get( "template_cache_path", "database/compiled_templates/community" ), self.root ) diff -r 1da4a4a928fb46a7725375a2cb0baa18f32c44b4 -r 0474dfc4d30f0d77aac42f1a0a8355998f213bfd lib/galaxy/webapps/demo_sequencer/config.py --- a/lib/galaxy/webapps/demo_sequencer/config.py +++ b/lib/galaxy/webapps/demo_sequencer/config.py @@ -40,6 +40,7 @@ self.remote_user_logout_href = kwargs.get( "remote_user_logout_href", None ) self.require_login = string_as_bool( kwargs.get( "require_login", "False" ) ) self.allow_user_creation = string_as_bool( kwargs.get( "allow_user_creation", "True" ) ) + self.allow_user_deletion = string_as_bool( kwargs.get( "allow_user_deletion", "False" ) ) self.template_path = resolve_path( kwargs.get( "template_path", "templates" ), self.root ) self.template_cache = resolve_path( kwargs.get( "template_cache_path", "database/compiled_templates/demo_sequencer" ), self.root ) self.admin_users = kwargs.get( "admin_users", "" ) diff -r 1da4a4a928fb46a7725375a2cb0baa18f32c44b4 -r 0474dfc4d30f0d77aac42f1a0a8355998f213bfd lib/galaxy/webapps/reports/config.py --- a/lib/galaxy/webapps/reports/config.py +++ b/lib/galaxy/webapps/reports/config.py @@ -31,6 +31,8 @@ self.template_path = resolve_path( kwargs.get( "template_path", "templates" ), self.root ) self.template_cache = resolve_path( kwargs.get( "template_cache_path", "database/compiled_templates/reports" ), self.root ) self.sendmail_path = kwargs.get('sendmail_path',"/usr/sbin/sendmail") + self.allow_user_creation = string_as_bool( kwargs.get( "allow_user_creation", "True" ) ) + self.allow_user_deletion = string_as_bool( kwargs.get( "allow_user_deletion", "False" ) ) self.log_actions = string_as_bool( kwargs.get( 'log_actions', 'False' ) ) self.brand = kwargs.get( 'brand', None ) self.wiki_url = kwargs.get( 'wiki_url', 'http://wiki.g2.bx.psu.edu/FrontPage' ) diff -r 1da4a4a928fb46a7725375a2cb0baa18f32c44b4 -r 0474dfc4d30f0d77aac42f1a0a8355998f213bfd static/images/fugue/chevron-expand-bw.png Binary file static/images/fugue/chevron-expand-bw.png has changed diff -r 1da4a4a928fb46a7725375a2cb0baa18f32c44b4 -r 0474dfc4d30f0d77aac42f1a0a8355998f213bfd static/images/fugue/toggle-bw.png Binary file static/images/fugue/toggle-bw.png has changed diff -r 1da4a4a928fb46a7725375a2cb0baa18f32c44b4 -r 0474dfc4d30f0d77aac42f1a0a8355998f213bfd static/images/fugue/toggle-expand-bw.png Binary file static/images/fugue/toggle-expand-bw.png has changed diff -r 1da4a4a928fb46a7725375a2cb0baa18f32c44b4 -r 0474dfc4d30f0d77aac42f1a0a8355998f213bfd static/june_2007_style/base.css.tmpl --- a/static/june_2007_style/base.css.tmpl +++ b/static/june_2007_style/base.css.tmpl @@ -865,10 +865,6 @@ -sprite-group: fugue; -sprite-image: fugue/toggle-expand.png; } -.icon-button.toggle { - -sprite-group: fugue; - -sprite-image: fugue/toggle.png; -} .icon-button.toggle-contract { -sprite-group: fugue; -sprite-image: fugue/toggle.png; diff -r 1da4a4a928fb46a7725375a2cb0baa18f32c44b4 -r 0474dfc4d30f0d77aac42f1a0a8355998f213bfd static/june_2007_style/blue/base.css --- a/static/june_2007_style/blue/base.css +++ b/static/june_2007_style/blue/base.css @@ -151,9 +151,10 @@ .icon-button.tag{background:url(fugue.png) no-repeat 0px -0px;} .icon-button.tags{background:url(fugue.png) no-repeat 0px -26px;} .icon-button.tag--plus{background:url(fugue.png) no-repeat 0px -52px;} -.icon-button.toggle-expand{background:url(fugue.png) no-repeat 0px -78px;} -.icon-button.toggle{background:url(fugue.png) no-repeat 0px -104px;} -.icon-button.toggle-contract{background:url(fugue.png) no-repeat 0px -104px;} +.icon-button.toggle-expand{background:transparent url(../images/fugue/toggle-expand-bw.png) no-repeat;} +.icon-button.toggle-expand:hover{background:url(fugue.png) no-repeat 0px -78px;} +.icon-button.toggle-contract{background:transparent url(../images/fugue/toggle-bw.png) no-repeat;} +.icon-button.toggle-contract:hover{background:url(fugue.png) no-repeat 0px -104px;} .icon-button.arrow-circle{background:url(fugue.png) no-repeat 0px -130px;} .icon-button.chevron{background:url(fugue.png) no-repeat 0px -156px;} .icon-button.bug{background:url(fugue.png) no-repeat 0px -182px;} diff -r 1da4a4a928fb46a7725375a2cb0baa18f32c44b4 -r 0474dfc4d30f0d77aac42f1a0a8355998f213bfd static/june_2007_style/blue/trackster.css --- a/static/june_2007_style/blue/trackster.css +++ b/static/june_2007_style/blue/trackster.css @@ -56,7 +56,9 @@ .tool-name{font-size:110%;font-weight:bold;} .param-row{margin-top:0.2em;margin-left:1em;} .param-label{float:left;font-weight:bold;padding-top:0.2em;} -.menu-button{padding:0px 4px 0px 4px;} +.menu-button{margin:0px 4px 0px 4px;} +.chevron-expand{background:transparent url(../images/fugue/chevron-expand-bw.png) no-repeat;} +.chevron-expand:hover{background:transparent url(../images/fugue/chevron-expand.png) no-repeat;} .settings-icon{background:transparent url(../images/fugue/gear-bw.png) no-repeat;} .settings-icon:hover{background:transparent url(../images/fugue/gear.png) no-repeat;} .overview-icon{background:transparent url(../images/fugue/application-dock-270-bw.png) no-repeat;} diff -r 1da4a4a928fb46a7725375a2cb0baa18f32c44b4 -r 0474dfc4d30f0d77aac42f1a0a8355998f213bfd static/june_2007_style/trackster.css.tmpl --- a/static/june_2007_style/trackster.css.tmpl +++ b/static/june_2007_style/trackster.css.tmpl @@ -295,7 +295,13 @@ padding-top: 0.2em; } .menu-button { - padding: 0px 4px 0px 4px; + margin: 0px 4px 0px 4px; +} +.chevron-expand { + background: transparent url(../images/fugue/chevron-expand-bw.png) no-repeat; +} +.chevron-expand:hover { + background:transparent url(../images/fugue/chevron-expand.png) no-repeat; } .settings-icon { background: transparent url(../images/fugue/gear-bw.png) no-repeat; diff -r 1da4a4a928fb46a7725375a2cb0baa18f32c44b4 -r 0474dfc4d30f0d77aac42f1a0a8355998f213bfd static/scripts/trackster.js --- a/static/scripts/trackster.js +++ b/static/scripts/trackster.js @@ -2381,16 +2381,18 @@ // Create and initialize track header and icons. if (show_header) { - this.header_div = $("<div class='track-header' />").appendTo(this.container_div); + this.header_div = $("<div class='track-header'/>").appendTo(this.container_div); if (this.view.editor) { this.drag_div = $("<div/>").addClass(this.drag_handle_class).appendTo(this.header_div); } this.name_div = $("<div/>").addClass("track-name").appendTo(this.header_div).text(this.name) .attr( "id", this.name.replace(/\s+/g,'-').replace(/[^a-zA-Z0-9\-]/g,'').toLowerCase() ); this.icons_div = $("<div/>").css("float", "left").appendTo(this.header_div).hide(); // Track icons. + this.mode_icon = $("<a/>").attr("href", "javascript:void(0);").attr("title", "Set display mode") + .addClass("icon-button chevron-expand").tipsy( {gravity: 's'} ).appendTo(this.icons_div); this.toggle_icon = $("<a/>").attr("href", "javascript:void(0);").attr("title", "Hide/show track content") - .addClass("icon-button toggle").tipsy( {gravity: 's'} ) - .appendTo(this.icons_div); + .addClass("icon-button toggle-contract").tipsy( {gravity: 's'} ) + .appendTo(this.icons_div); this.settings_icon = $("<a/>").attr("href", "javascript:void(0);").attr("title", "Edit settings") .addClass("icon-button settings-icon").tipsy( {gravity: 's'} ) .appendTo(this.icons_div); @@ -2407,21 +2409,42 @@ .addClass("icon-button remove-icon").tipsy( {gravity: 's'} ) .appendTo(this.icons_div); var track = this; - + // Suppress double clicks in header so that they do not impact viz. this.header_div.dblclick( function(e) { e.stopPropagation(); } ); + + // Set up behavior for modes popup. + if (track.display_modes !== undefined) { + var init_mode = (track.config && track.config.values['mode'] ? + track.config.values['mode'] : track.display_modes[0]); + track.mode = init_mode; + this.mode_icon.attr("title", "Set display mode (now: " + track.mode + ")"); + + var mode_mapping = {}; + for (var i = 0, len = track.display_modes.length; i < len; i++) { + var mode = track.display_modes[i]; + mode_mapping[mode] = function(mode) { + return function() { + track.change_mode(mode); + // HACK: the popup menu messes with the track's hover event, so manually show/hide + // icons div for now. + track.icons_div.show(); + track.container_div.mouseleave(function() { track.icons_div.hide(); } ); }; + }(mode); + } + + make_popupmenu(this.mode_icon, mode_mapping); + } - // Toggle icon hides or shows the track content + // Toggle icon hides or shows the track content. this.toggle_icon.click( function() { if ( track.content_visible ) { - track.toggle_icon.addClass("toggle-expand").removeClass("toggle"); + track.toggle_icon.addClass("toggle-expand").removeClass("toggle-contract"); track.hide_contents(); - track.mode_div.hide(); track.content_visible = false; } else { - track.toggle_icon.addClass("toggle").removeClass("toggle-expand"); + track.toggle_icon.addClass("toggle-contract").removeClass("toggle-expand"); track.content_visible = true; - track.mode_div.show(); track.show_contents(); } }); @@ -2481,35 +2504,12 @@ $(".tipsy").remove(); track.remove(); }); + + // Show icons when users is hovering over track. + this.container_div.hover( function() { track.icons_div.show(); }, function() { track.icons_div.hide(); } ); - // Set up behavior for modes popup. - if (track.display_modes !== undefined) { - if (track.mode_div === undefined) { - track.mode_div = $("<div class='right-float menubutton popup' />").appendTo(track.header_div); - var init_mode = (track.config && track.config.values['mode'] ? - track.config.values['mode'] : track.display_modes[0]); - track.mode = init_mode; - track.mode_div.text(init_mode); - - var mode_mapping = {}; - for (var i = 0, len = track.display_modes.length; i < len; i++) { - var mode = track.display_modes[i]; - mode_mapping[mode] = function(mode) { - return function() { track.change_mode(mode); }; - }(mode); - } - make_popupmenu(track.mode_div, mode_mapping); - } else { - track.mode_div.hide(); - } - - this.header_div.append( $("<div/>").css("clear", "both") ); - - // Set up config icon. - - // Show icons when users is hovering over track. - this.container_div.hover( function() { track.icons_div.show(); }, function() { track.icons_div.hide(); } ); - } + // Needed for floating elts in header. + $("<div style='clear: both'/>").appendTo(this.container_div); } // @@ -2696,12 +2696,12 @@ */ change_mode: function(name) { var track = this; - track.mode_div.text(name); // TODO: is it necessary to store the mode in two places (.mode and track_config)? track.mode = name; track.config.values['mode'] = name; track.tile_cache.clear(); track.request_draw(); + this.mode_icon.attr("title", "Set display mode (now: " + track.mode + ")"); return track; }, /** @@ -3405,13 +3405,14 @@ } }, update_auto_mode: function( mode ) { + var mode; if ( this.mode == "Auto" ) { if ( mode == "no_detail" ) { mode = "feature spans"; } else if ( mode == "summary_tree" ) { mode = "coverage histogram"; } - this.mode_div.text( "Auto (" + mode + ")" ); + this.mode_icon.attr("title", "Set display mode (now: Auto/" + mode + ")"); } }, /** diff -r 1da4a4a928fb46a7725375a2cb0baa18f32c44b4 -r 0474dfc4d30f0d77aac42f1a0a8355998f213bfd tools/picard/picard_wrapper.py --- a/tools/picard/picard_wrapper.py +++ b/tools/picard/picard_wrapper.py @@ -379,11 +379,11 @@ op.add_option('', '--taillimit', default="0") op.add_option('', '--histwidth', default="0") op.add_option('', '--minpct', default="0.01") - op.add_option('', '--malevel', action='append', type="string") + op.add_option('', '--malevel', default='') op.add_option('', '--deviations', default="0.0") # CollectAlignmentSummaryMetrics op.add_option('', '--maxinsert', default="20") - op.add_option('', '--adaptors', action='append', type="string") + op.add_option('', '--adaptors', default='') # FixMateInformation and validate # CollectGcBiasMetrics op.add_option('', '--windowsize', default='100') @@ -533,8 +533,9 @@ shutil.copy(ref_file_name,fakefasta) pic.delme.append(fakefasta) cl.append('ASSUME_SORTED=true') - adaptorseqs = ''.join([' ADAPTER_SEQUENCE=%s' % x for x in opts.adaptors]) - cl.append(adaptorseqs) + adaptlist = opts.adaptors.split(',') + adaptorseqs = ['ADAPTER_SEQUENCE=%s' % x for x in adaptlist] + cl += adaptorseqs cl.append('IS_BISULFITE_SEQUENCED=%s' % opts.bisulphite) cl.append('MAX_INSERT_SIZE=%s' % opts.maxinsert) cl.append('OUTPUT=%s' % pic.metricsOut) @@ -619,8 +620,9 @@ if float(opts.deviations) > 0.0: cl.append('DEVIATIONS=%s' % opts.deviations) if opts.malevel: - malevels = ['METRIC_ACCUMULATION_LEVEL=%s' % x for x in opts.malevel] - cl.append(' '.join(malevels)) + malists = opts.malevel.split(',') + malist = ['METRIC_ACCUMULATION_LEVEL=%s' % x for x in malists] + cl += malist stdouts,rval = pic.runPic(opts.jar, cl) if os.path.exists(pdfpath): # automake thumbnail - will be added to html cl2 = ['mogrify', '-format jpg -resize x400 %s' % pdfpath] Repository URL: https://bitbucket.org/galaxy/galaxy-central/ -- This is a commit notification from bitbucket.org. You are receiving this because you have the service enabled, addressing the recipient of this email.
participants (1)
-
Bitbucket