# HG changeset patch # User devteam # Date 1437076390 14400 # Node ID 3a3234d7a2e8e85cfe154ad74b1a90260863c356 # Parent 379fdf4c41ac57267a2e806ac515134465e87b72 planemo upload for repository https://github.com/galaxyproject/tools-devteam/tree/master/tools/picard commit 00a7926c285bc4a339bd7deebf40b28f39c7d947-dirty diff -r 379fdf4c41ac -r 3a3234d7a2e8 picard_AddCommentsToBam.xml --- a/picard_AddCommentsToBam.xml Thu Jan 29 16:11:15 2015 -0500 +++ b/picard_AddCommentsToBam.xml Thu Jul 16 15:53:10 2015 -0400 @@ -1,11 +1,9 @@ - + add comments to BAM dataset - picard - picard_macros.xml - + @java_options@ java -jar \$JAVA_JAR_PATH/picard.jar diff -r 379fdf4c41ac -r 3a3234d7a2e8 picard_AddOrReplaceReadGroups.xml --- a/picard_AddOrReplaceReadGroups.xml Thu Jan 29 16:11:15 2015 -0500 +++ b/picard_AddOrReplaceReadGroups.xml Thu Jul 16 15:53:10 2015 -0400 @@ -1,40 +1,26 @@ - + add or replaces read group information - - picard - - picard_macros.xml + read_group_macros.xml - + + @define_read_group_helpers@ + #set $rg_auto_name = $read_group_name_default($inputFile) + @set_read_group_vars@ @java_options@ java -jar \$JAVA_JAR_PATH/picard.jar AddOrReplaceReadGroups INPUT="${inputFile}" - RGLB="${rglb}" - RGPL="${rgpl}" - RGPU="${rgpu}" - RGSM="${rgsm}" - RGID="${rgid}" - - #if str( $rgcn): - RGCN="${rgcn}" - #end if - - #if str( $rgds): - RGDS="${rgds}" - #end if - - #if str( $rgpi): - RGPI="${rgpi}" - #end if - - #if str( $rgdt): - RGDT="${rgdt}" - #end if - + $format_read_group("RGLB=", $rg_lb, '"') + $format_read_group("RGPL=", $rg_pl, '"') + $format_read_group("RGPU=", $rg_pu, '"') + $format_read_group("RGSM=", $rg_sm, '"') + $format_read_group("RGID=", $rg_id, '"') + $format_read_group("RGDS=", $rg_ds, '"') + $format_read_group("RGPI=", $rg_pi, '"') + $format_read_group("RGDT=", $rg_dt, '"') VALIDATION_STRINGENCY="${validation_stringency}" QUIET=true VERBOSITY=ERROR @@ -44,17 +30,7 @@ - - - - - - - - - - - + @@ -70,11 +46,11 @@ - - - - - + + + + + @@ -146,3 +122,4 @@ + diff -r 379fdf4c41ac -r 3a3234d7a2e8 picard_BedToIntervalList.xml --- a/picard_BedToIntervalList.xml Thu Jan 29 16:11:15 2015 -0500 +++ b/picard_BedToIntervalList.xml Thu Jul 16 15:53:10 2015 -0400 @@ -1,11 +1,9 @@ - + convert coordinate data into picard interval list format - picard - picard_macros.xml - + @java_options@ diff -r 379fdf4c41ac -r 3a3234d7a2e8 picard_CleanSam.xml --- a/picard_CleanSam.xml Thu Jan 29 16:11:15 2015 -0500 +++ b/picard_CleanSam.xml Thu Jul 16 15:53:10 2015 -0400 @@ -1,15 +1,9 @@ - - + perform SAM/BAM grooming - - - picard - - picard_macros.xml - + @java_options@ java -jar \$JAVA_JAR_PATH/picard.jar @@ -60,4 +54,4 @@ @more_info@ - \ No newline at end of file + diff -r 379fdf4c41ac -r 3a3234d7a2e8 picard_CollectAlignmentSummaryMetrics.xml --- a/picard_CollectAlignmentSummaryMetrics.xml Thu Jan 29 16:11:15 2015 -0500 +++ b/picard_CollectAlignmentSummaryMetrics.xml Thu Jul 16 15:53:10 2015 -0400 @@ -1,13 +1,9 @@ - + writes a file containing summary alignment metrics - - picard - - picard_macros.xml - + @java_options@ ##set up input files @@ -55,7 +51,7 @@ - + diff -r 379fdf4c41ac -r 3a3234d7a2e8 picard_CollectBaseDistributionByCycle.xml --- a/picard_CollectBaseDistributionByCycle.xml Thu Jan 29 16:11:15 2015 -0500 +++ b/picard_CollectBaseDistributionByCycle.xml Thu Jul 16 15:53:10 2015 -0400 @@ -1,13 +1,11 @@ - + charts the nucleotide distribution per cycle in a SAM or BAM dataset - - picard - - picard_macros.xml - + + R + @java_options@ ##set up input files diff -r 379fdf4c41ac -r 3a3234d7a2e8 picard_CollectGcBiasMetrics.xml --- a/picard_CollectGcBiasMetrics.xml Thu Jan 29 16:11:15 2015 -0500 +++ b/picard_CollectGcBiasMetrics.xml Thu Jul 16 15:53:10 2015 -0400 @@ -1,13 +1,11 @@ - + charts the GC bias metrics - - picard - - picard_macros.xml - + + R + @java_options@ ##set up input files diff -r 379fdf4c41ac -r 3a3234d7a2e8 picard_CollectInsertSizeMetrics.xml --- a/picard_CollectInsertSizeMetrics.xml Thu Jan 29 16:11:15 2015 -0500 +++ b/picard_CollectInsertSizeMetrics.xml Thu Jul 16 15:53:10 2015 -0400 @@ -1,13 +1,11 @@ - + plots distribution of insert sizes - - picard - - picard_macros.xml - + + R + @java_options@ ##set up input files diff -r 379fdf4c41ac -r 3a3234d7a2e8 picard_CollectRnaSeqMetrics.xml --- a/picard_CollectRnaSeqMetrics.xml Thu Jan 29 16:11:15 2015 -0500 +++ b/picard_CollectRnaSeqMetrics.xml Thu Jul 16 15:53:10 2015 -0400 @@ -1,16 +1,13 @@ - - collect metrics about the alignment of RNA to various functional classes of loci in the genome - - picard - + + collect metrics about the alignment of RNA to various functional classes of loci in the genome + + picard_macros.xml + + + R + + - - picard_macros.xml - - - - - ## Set up input files ## Reference sequences diff -r 379fdf4c41ac -r 3a3234d7a2e8 picard_CollectWgsMetrics.xml --- a/picard_CollectWgsMetrics.xml Thu Jan 29 16:11:15 2015 -0500 +++ b/picard_CollectWgsMetrics.xml Thu Jul 16 15:53:10 2015 -0400 @@ -1,13 +1,9 @@ - + compute metrics for evaluating of whole genome sequencing experiments - - picard - - picard_macros.xml - + @java_options@ ##set up input files diff -r 379fdf4c41ac -r 3a3234d7a2e8 picard_DownsampleSam.xml --- a/picard_DownsampleSam.xml Thu Jan 29 16:11:15 2015 -0500 +++ b/picard_DownsampleSam.xml Thu Jul 16 15:53:10 2015 -0400 @@ -1,13 +1,9 @@ - + Downsample a file to retain a subset of the reads - - picard - - picard_macros.xml - + @java_options@ java -jar diff -r 379fdf4c41ac -r 3a3234d7a2e8 picard_EstimateLibraryComplexity.xml --- a/picard_EstimateLibraryComplexity.xml Thu Jan 29 16:11:15 2015 -0500 +++ b/picard_EstimateLibraryComplexity.xml Thu Jul 16 15:53:10 2015 -0400 @@ -1,13 +1,9 @@ - + assess sequence library complexity from read sequences - - picard - - picard_macros.xml - + @java_options@ diff -r 379fdf4c41ac -r 3a3234d7a2e8 picard_FastqToSam.xml --- a/picard_FastqToSam.xml Thu Jan 29 16:11:15 2015 -0500 +++ b/picard_FastqToSam.xml Thu Jul 16 15:53:10 2015 -0400 @@ -1,13 +1,9 @@ - + convert Fastq data into unaligned BAM - - picard - - picard_macros.xml - + @java_options@ diff -r 379fdf4c41ac -r 3a3234d7a2e8 picard_FilterSamReads.xml --- a/picard_FilterSamReads.xml Thu Jan 29 16:11:15 2015 -0500 +++ b/picard_FilterSamReads.xml Thu Jul 16 15:53:10 2015 -0400 @@ -1,13 +1,9 @@ - + include or exclude aligned and unaligned reads and read lists - - picard - - picard_macros.xml - + @java_options@ @@ -41,7 +37,7 @@ - + diff -r 379fdf4c41ac -r 3a3234d7a2e8 picard_FixMateInformation.xml --- a/picard_FixMateInformation.xml Thu Jan 29 16:11:15 2015 -0500 +++ b/picard_FixMateInformation.xml Thu Jul 16 15:53:10 2015 -0400 @@ -1,13 +1,9 @@ - + ensure that all mate-pair information is in sync between each read and it's mate pair - - picard - - picard_macros.xml - + @java_options@ diff -r 379fdf4c41ac -r 3a3234d7a2e8 picard_MarkDuplicates.xml --- a/picard_MarkDuplicates.xml Thu Jan 29 16:11:15 2015 -0500 +++ b/picard_MarkDuplicates.xml Thu Jul 16 15:53:10 2015 -0400 @@ -1,13 +1,9 @@ - + examine aligned records in BAM datasets to locate duplicate molecules - - picard - - picard_macros.xml - + @java_options@ diff -r 379fdf4c41ac -r 3a3234d7a2e8 picard_MarkDuplicatesWithMateCigar.xml --- a/picard_MarkDuplicatesWithMateCigar.xml Thu Jan 29 16:11:15 2015 -0500 +++ b/picard_MarkDuplicatesWithMateCigar.xml Thu Jul 16 15:53:10 2015 -0400 @@ -1,13 +1,9 @@ - + examine aligned records in BAM datasets to locate duplicate molecules - - picard - - picard_macros.xml - + @java_options@ @@ -18,10 +14,8 @@ OUTPUT="${outFile}" METRICS_FILE="${metrics_file}" - #for $element in $comments: - COMMENT="${element.comment}" - #end for - + COMMENT="${comment}" + MINIMUM_DISTANCE="${minimum_distance}" SKIP_PAIRS_WITH_NO_MATE_CIGAR="${skip_pairs_with_no_mate_cigar}" diff -r 379fdf4c41ac -r 3a3234d7a2e8 picard_MeanQualityByCycle.xml --- a/picard_MeanQualityByCycle.xml Thu Jan 29 16:11:15 2015 -0500 +++ b/picard_MeanQualityByCycle.xml Thu Jul 16 15:53:10 2015 -0400 @@ -1,13 +1,11 @@ - + chart distribution of base qualities - - picard - - picard_macros.xml - + + R + @java_options@ ##set up input files diff -r 379fdf4c41ac -r 3a3234d7a2e8 picard_MergeBamAlignment.xml --- a/picard_MergeBamAlignment.xml Thu Jan 29 16:11:15 2015 -0500 +++ b/picard_MergeBamAlignment.xml Thu Jul 16 15:53:10 2015 -0400 @@ -1,11 +1,9 @@ - + merge alignment data with additional info stored in an unmapped BAM dataset - picard - picard_macros.xml - + @java_options@ #set $picard_dict = "localref.dict" @@ -42,7 +40,7 @@ READ1_ALIGNED_BAM="${dataset.read1_aligned_bam}" #end for #for $dataset in $aligned_or_read1_and_read2.read2_aligned_bams: - READ2_ALIGNED_BAM="${dataset.read1_aligned_bam}" + READ2_ALIGNED_BAM="${dataset.read2_aligned_bam}" #end for #else #for $dataset in $aligned_or_read1_and_read2.read1_aligned_bams: diff -r 379fdf4c41ac -r 3a3234d7a2e8 picard_MergeSamFiles.xml --- a/picard_MergeSamFiles.xml Thu Jan 29 16:11:15 2015 -0500 +++ b/picard_MergeSamFiles.xml Thu Jul 16 15:53:10 2015 -0400 @@ -1,13 +1,9 @@ - + merges multiple SAM/BAM datasets into one - - picard - - picard_macros.xml - + @java_options@ diff -r 379fdf4c41ac -r 3a3234d7a2e8 picard_NormalizeFasta.xml --- a/picard_NormalizeFasta.xml Thu Jan 29 16:11:15 2015 -0500 +++ b/picard_NormalizeFasta.xml Thu Jul 16 15:53:10 2015 -0400 @@ -1,13 +1,9 @@ - + normalize fasta datasets - - picard - - picard_macros.xml - + @java_options@ diff -r 379fdf4c41ac -r 3a3234d7a2e8 picard_QualityScoreDistribution.xml --- a/picard_QualityScoreDistribution.xml Thu Jan 29 16:11:15 2015 -0500 +++ b/picard_QualityScoreDistribution.xml Thu Jul 16 15:53:10 2015 -0400 @@ -1,13 +1,11 @@ - + chart quality score distribution - - picard - - picard_macros.xml - + + R + @java_options@ ##set up input files diff -r 379fdf4c41ac -r 3a3234d7a2e8 picard_ReorderSam.xml --- a/picard_ReorderSam.xml Thu Jan 29 16:11:15 2015 -0500 +++ b/picard_ReorderSam.xml Thu Jul 16 15:53:10 2015 -0400 @@ -1,11 +1,9 @@ - + reorder reads to match ordering in reference sequences - picard - picard_macros.xml - + @java_options@ #set $picard_dict = "localref.dict" diff -r 379fdf4c41ac -r 3a3234d7a2e8 picard_ReplaceSamHeader.xml --- a/picard_ReplaceSamHeader.xml Thu Jan 29 16:11:15 2015 -0500 +++ b/picard_ReplaceSamHeader.xml Thu Jul 16 15:53:10 2015 -0400 @@ -1,13 +1,9 @@ - + replace header in a SAM/BAM dataset - - picard - - picard_macros.xml - + @java_options@ diff -r 379fdf4c41ac -r 3a3234d7a2e8 picard_RevertOriginalBaseQualitiesAndAddMateCigar.xml --- a/picard_RevertOriginalBaseQualitiesAndAddMateCigar.xml Thu Jan 29 16:11:15 2015 -0500 +++ b/picard_RevertOriginalBaseQualitiesAndAddMateCigar.xml Thu Jul 16 15:53:10 2015 -0400 @@ -1,13 +1,9 @@ - + revert the original base qualities and add the mate cigar tag - - picard - - picard_macros.xml - + @java_options@ diff -r 379fdf4c41ac -r 3a3234d7a2e8 picard_RevertSam.xml --- a/picard_RevertSam.xml Thu Jan 29 16:11:15 2015 -0500 +++ b/picard_RevertSam.xml Thu Jul 16 15:53:10 2015 -0400 @@ -1,13 +1,9 @@ - + revert SAM/BAM datasets to a previous state - - picard - - picard_macros.xml - + @java_options@ diff -r 379fdf4c41ac -r 3a3234d7a2e8 picard_SamToFastq.xml --- a/picard_SamToFastq.xml Thu Jan 29 16:11:15 2015 -0500 +++ b/picard_SamToFastq.xml Thu Jul 16 15:53:10 2015 -0400 @@ -1,13 +1,9 @@ - + extract reads and qualities from SAM/BAM dataset and convert to fastq - - picard - - picard_macros.xml - + echo "BAM" > $report && ## This is necessary for output dataset detection (see output tags below) diff -r 379fdf4c41ac -r 3a3234d7a2e8 picard_SortSam.xml --- a/picard_SortSam.xml Thu Jan 29 16:11:15 2015 -0500 +++ b/picard_SortSam.xml Thu Jul 16 15:53:10 2015 -0400 @@ -1,15 +1,9 @@ - - + sort SAM/BAM dataset - - - picard - - picard_macros.xml - + @java_options@ java -jar \$JAVA_JAR_PATH/picard.jar @@ -67,4 +61,4 @@ @more_info@ - \ No newline at end of file + diff -r 379fdf4c41ac -r 3a3234d7a2e8 picard_ValidateSamFile.xml --- a/picard_ValidateSamFile.xml Thu Jan 29 16:11:15 2015 -0500 +++ b/picard_ValidateSamFile.xml Thu Jul 16 15:53:10 2015 -0400 @@ -1,13 +1,9 @@ - + assess validity of SAM/BAM dataset - - picard - - picard_macros.xml - + ##set the maximum number of open file to hard maximum or 4096 if on a mac (mac gives 'unlimited' as output of `ulimit -Hn` command diff -r 379fdf4c41ac -r 3a3234d7a2e8 picard_macros.xml --- a/picard_macros.xml Thu Jan 29 16:11:15 2015 -0500 +++ b/picard_macros.xml Thu Jul 16 15:53:10 2015 -0400 @@ -6,7 +6,16 @@ - + + 1.136 + + + + picard + + + + _JAVA_OPTIONS=\${_JAVA_OPTIONS:-'-Xmx2048m -Xms256m'} && export _JAVA_OPTIONS && diff -r 379fdf4c41ac -r 3a3234d7a2e8 read_group_macros.xml --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/read_group_macros.xml Thu Jul 16 15:53:10 2015 -0400 @@ -0,0 +1,294 @@ + + + +#def identifier_or_name($input1) + #if hasattr($input1, 'element_identifier') + #return $input1.element_identifier + #else + #return $input1.name.rstrip('.gz').rstrip('.fastq').rstrip('.fq') + #end if +#end def + +#def clean(name) + #import re + #set $name_clean = re.sub('[^\w\-_\.]', '_', $name) + #return $name_clean +#end def + +#def read_group_name_default($input1, $input2=None) + #if $input2 is None + #return $clean($identifier_or_name($input1)) + #else + #import itertools + #set $input_name1 = $clean($identifier_or_name($input1)) + #set $input_name2 = $clean($identifier_or_name($input2)) + #set $common_prefix = ''.join([c[0] for c in itertools.takewhile(lambda x: all(x[0] == y for y in x), itertools.izip(*[$input_name1, $input_name2]))]) + #if len($common_prefix) > 3 + #return $common_prefix + #else + #return $input_name1 + #end if + #end if +#end def + +#def format_read_group(prefix, value, quote='', arg='') + #if $value + #return $arg + $quote + $prefix + $value + $quote + #else + #return '' + #end if +#end def + +#def rg_param(name) + #if $varExists("rg") + #return $rg.get($name, None) + #else + #return $getVar($name, None) + #end if +#end def + +#set $use_rg = True + + + +#if $use_rg + #if $rg_param('read_group_id_conditional') is None + #set $rg_id = $rg_auto_name + #elif $rg_param('read_group_id_conditional').do_auto_name + #set $rg_id = $rg_auto_name + #else + #set $rg_id = str($rg_param('read_group_id_conditional').ID) + #end if + + #if $rg_param('read_group_sm_conditional') is None + #set $rg_sm = '' + #elif $rg_param('read_group_sm_conditional').do_auto_name + #set $rg_sm = $rg_auto_name + #else + #set $rg_sm = str($rg_param('read_group_sm_conditional').SM) + #end if + + #if $rg_param('PL') + #set $rg_pl = str($rg_param('PL')) + #else + #set $rg_pl = '' + #end if + + #if $rg_param('read_group_lb_conditional') is None + #set $rg_lb = '' + #elif $rg_param('read_group_lb_conditional').do_auto_name + #set $rg_lb = $rg_auto_name + #else + #set $rg_lb = str($rg_param('read_group_lb_conditional').LB) + #end if + + #if $rg_param('CN') + #set $rg_cn = str($rg_param('CN')) + #else + #set $rg_cn = '' + #end if + + #if $rg_param("DS") + #set $rg_ds = str($rg_param("DS")) + #else + #set $rg_ds = '' + #end if + + #if $rg_param("DT") + #set $rg_dt = str($rg_param("DT")) + #else + #set $rg_dt = '' + #end if + + #if $rg_param("FO") + #set $rg_fo = str($rg_param("FO")) + #else + #set $rg_fo = '' + #end if + + #if $rg_param("KS") + #set $rg_ks = str($rg_param("KS")) + #else + #set $rg_ks = '' + #end if + + #if $rg_param("PG") + #set $rg_pg = str($rg_param("PG")) + #else + #set $rg_pg = '' + #end if + + #if str($rg_param("PI")) + #set $rg_pi = str($rg_param("PI")) + #else + #set $rg_pi = '' + #end if + + #if $rg_param("PU") + #set $rg_pu = str($rg_param("PU")) + #else + #set $rg_pu = '' + #end if +#end if + + +#set $use_rg = str($rg.rg_selector) != "do_not_set" + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \*|[ACMGRSVTWYHKDBN]+$ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff -r 379fdf4c41ac -r 3a3234d7a2e8 test-data/picard_ARRG_test1.bam Binary file test-data/picard_ARRG_test1.bam has changed diff -r 379fdf4c41ac -r 3a3234d7a2e8 test-data/picard_CollectRnaSeqMetrics.refFlat~ --- a/test-data/picard_CollectRnaSeqMetrics.refFlat~ Thu Jan 29 16:11:15 2015 -0500 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,21 +0,0 @@ -hg19.kgXref.kgID #hg19.knownGene.name hg19.knownGene.chrom hg19.knownGene.strand hg19.knownGene.txStart hg19.knownGene.txEnd hg19.knownGene.cdsStart hg19.knownGene.cdsEnd hg19.knownGene.exonCount hg19.knownGene.exonStarts hg19.knownGene.exonEnds -uc004coq.4 uc004coq.4 chrM - 235 368 235 235 1 235, 368, -uc022bqo.2 uc022bqo.2 chrM + 650 674 650 650 1 650, 674, -uc004cor.1 uc004cor.1 chrM + 1603 1634 1603 1603 1 1603, 1634, -uc004cos.5 uc004cos.5 chrM + 1843 4264 1843 1843 1 1843, 4264, -uc022bqp.1 uc022bqp.1 chrM - 5543 5566 5543 5543 1 5543, 5566, -uc022bqq.1 uc022bqq.1 chrM - 5585 5606 5585 5585 1 5585, 5606, -uc022bqr.1 uc022bqr.1 chrM - 5690 5714 5690 5690 1 5690, 5714, -uc031tga.1 uc031tga.1 chrM + 5904 7439 5904 5904 1 5904, 7439, -uc022bqs.1 uc022bqs.1 chrM - 7586 15888 7586 7586 2 7586,15503, 7982,15888, -uc011mfi.2 uc011mfi.2 chrM + 7586 9208 7586 7586 1 7586, 9208, -uc022bqt.1 uc022bqt.1 chrM - 8366 14149 8366 8366 2 8366,13449, 8472,14149, -uc022bqu.2 uc022bqu.2 chrM + 10059 10404 10059 10059 1 10059, 10404, -uc004cov.5 uc004cov.5 chrM + 10470 12138 10470 10470 1 10470, 12138, -uc031tgb.1 uc031tgb.1 chrM - 10760 14149 10760 10760 2 10760,13978, 11231,14149, -uc004cow.2 uc004cow.2 chrM + 12207 12264 12207 12207 1 12207, 12264, -uc004cox.4 uc004cox.4 chrM + 12907 14149 12907 12907 1 12907, 14149, -uc022bqv.1 uc022bqv.1 chrM - 14674 14698 14674 14674 1 14674, 14698, -uc022bqw.1 uc022bqw.1 chrM + 14856 15888 14856 14856 1 14856, 15888, -uc022bqx.1 uc022bqx.1 chrM - 15959 16024 15959 15959 1 15959, 16024, -uc004coz.1 uc004coz.1 chrM + 15998 16571 15998 15998 1 15998, 16571, diff -r 379fdf4c41ac -r 3a3234d7a2e8 tool_dependencies.xml --- a/tool_dependencies.xml Thu Jan 29 16:11:15 2015 -0500 +++ b/tool_dependencies.xml Thu Jul 16 15:53:10 2015 -0400 @@ -1,6 +1,9 @@ - - + + + + +