# HG changeset patch # User wolma # Date 1418509196 18000 # Node ID 41e5558a2bad37f6be14650142719aceffc8e7b3 Imported from capsule None diff -r 000000000000 -r 41e5558a2bad reheader.xml --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/reheader.xml Sat Dec 13 17:19:56 2014 -0500 @@ -0,0 +1,204 @@ + + From a BAM file generate a new file with the original header (if any) replaced or modified by that found in a second SAM file + + mimodd + + mimodd version -q + + #if ($str($rg.treat_rg) != "ignore" and $str($rg.rginfo.source) == "from_form") or $str($co.treat_co) != "ignore": + mimodd header + #if $str($rg.treat_rg) != "ignore" and $str($rg.rginfo.source) == "from_form": + #for $rginfo in $rg.rginfo.rg + #if $str($rginfo.source_id): + --rg-id "${rginfo.source_id}" + #end if + #if $str($rginfo.rg_sm): + --rg-sm "${rginfo.rg_sm}" + #end if + #if $str($rginfo.rg_cn): + --rg-cn "${rginfo.rg_cn}" + #else: + --rg-cn "" + #end if + #if $str($rginfo.rg_ds): + --rg-ds "${rginfo.rg_ds}" + #else: + --rg-ds "" + #end if + #if $str($rginfo.rg_date): + --rg-dt "${rginfo.rg_date}" + #else: + --rg-dt "" + #end if + #if $str($rginfo.rg_lb): + --rg-lb "${rginfo.rg_lb}" + #else: + --rg-lb "" + #end if + #if $str($rginfo.rg_pl): + --rg-pl "${rginfo.rg_pl}" + #else: + --rg-pl "" + #end if + #if $str($rginfo.rg_pi): + --rg-pi "${rginfo.rg_pi}" + #else: + --rg-pi "" + #end if + #if $str($rginfo.rg_pu): + --rg-pu "${rginfo.rg_pu}" + #else: + --rg-pu "" + #end if + #end for + #end if + #if $str($co.treat_co) != "ignore": + --co + #for $comment in $co.coinfo + #if $str($comment.line): + "${comment.line}" + #end if + #end for + #end if + | + #end if + mimodd reheader $inputfile --sq ignore + --rg ${rg.treat_rg} + #if $str($rg.treat_rg) != "ignore": + #if $str($rg.rginfo.source) == "from_file": + ${rg.rginfo.data} + #else: + - + #end if + #for $rgmapping in $rg.rginfo.rg + #if $str($rgmapping.source_id) and $str($rgmapping.rg_id): + "$str($rgmapping.source_id)" : "$str($rgmapping.rg_id)" + #end if + #end for + #end if + + --co ${co.treat_co} + #if $str($co.treat_co) != "ignore": + - + #end if + + #set $restr = "" + #for $rename in $rg_renaming + #set $restr = $restr + ($str($rename.from) and $str($rename.to) and '"' + $str($rename.from) + '" : "' + $str($rename.to) + '"') + #end for + #if $restr + --rgm $restr + #end if + + #set $restr = "" + #for $rename in $sq_renaming + #set $restr = $restr + ($str($rename.from) and $str($rename.to) and '"' + $str($rename.from) + '" : "' + $str($rename.to) + '"') + #end for + #if $restr + --sqm $restr + #end if + + -o $output + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +.. class:: infomark + + **What it does** + +The tool generates a copy of the BAM input file with a modified header (i.e., metadata). + +It can update or replace read-group information (i.e., information about the samples in the file), add or replace comment lines, and rename reference sequences declared in the header. + +The tool ensures that the resulting BAM file is valid and can be further processed by other MiModD tools and standard software like samtools. It aborts with an error message if a valid BAM file cannot be generated with the user-specified settings. + +The template information used to modify or replace the input file metadata is provided through forms or, in the case of read-group information, can be taken from an existing SAM file as can be generated, for example, with the *NGS Run Annotation* tool. + + + + diff -r 000000000000 -r 41e5558a2bad tool_dependencies.xml --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/tool_dependencies.xml Sat Dec 13 17:19:56 2014 -0500 @@ -0,0 +1,6 @@ + + + + + +