Mercurial > repos > iuc > arriba_draw_fusions
diff macros.xml @ 0:2d4e3aff9dc7 draft
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/arriba commit b12158e6cc9b1b2bd6e7522dfc183e9055575823
author | iuc |
---|---|
date | Wed, 27 Jul 2022 11:25:43 +0000 |
parents | |
children | cf18a5993aa2 |
line wrap: on
line diff
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/macros.xml Wed Jul 27 11:25:43 2022 +0000 @@ -0,0 +1,311 @@ +<macros> + <token name="@TOOL_VERSION@">2.3.0</token> + <token name="@VERSION_SUFFIX@">0</token> + <xml name="requirements"> + <requirements> + <requirement type="package" version="@TOOL_VERSION@">arriba</requirement> + <yield/> + </requirements> + </xml> + <xml name="citations"> + <citations> + <citation type="doi">10.1101/gr.257246.119</citation> + <yield /> + </citations> + </xml> + <xml name="version_command"> + <version_command>arriba -h | grep Version | sed 's/^.* //'</version_command> + </xml> + <xml name="genome_source" token_assembly_optional="false" > + <conditional name="genome"> + <param name="genome_source" type="select" label="Genome assembly fasta (that was used for STAR alignment)"> + <option value="history">From your history</option> + <option value="cached">Use built-in Genome reference</option> + </param> + <when value="history"> + <param name="assembly" argument="-a" type="data" format="fasta" optional="@ASSEMBLY_OPTIONAL@" label="Genome assembly fasta"/> + </when> + <when value="cached"> + <param name="ref_file" type="select" label="Using reference genome" help="Select genome from the list"> + <options from_data_table="all_fasta"> + <validator type="no_options" message="No reference genomes are available" /> + </options> + </param> + </when> + </conditional> + </xml> + <xml name="gtf_source" token_assembly_optional="false" > + <conditional name="genome_gtf"> + <param name="gtf_source" type="select" label="Genome GTF annotation source"> + <option value="history">From your history</option> + <!-- <option value="cached">Use built-in Gtf annotation</option> --> + </param> + <when value="history"> + <param name="annotation" argument="-g" type="data" format="gtf" label="Gene annotation in GTF format"/> + </when> + </conditional> + </xml> + + <token name="@GENOME_SOURCE@"><![CDATA[ +#if str($genome.genome_source) == "history" + #if $genome.assembly + #set $genome_assembly = 'genome.fa' + ln -sf '$genome.assembly' $genome_assembly && + #end if +#elif str($genome.genome_source) == "cached" + #set $genome_assembly = $genome.ref_file.fields.fasta +#end if + ]]></token> + <token name="@GTF_SOURCE@"><![CDATA[ +#if str($genome_gtf.gtf_source) == "history" + #if $genome_gtf.annotation.is_of_type('gtf.gz') + #set $genome_annotation = 'genome.gtf.gz' + #else + #set $genome_annotation = 'genome.gtf' + #end if + ln -sf '$genome_gtf.annotation' $genome_annotation && +#end if + ]]></token> + + <xml name="visualization_options"> + <param name="cytobands" argument="--cytobands" type="data" format="tabular" optional="true" label="Cytobands"/> + <section name="options" expanded="false" title="Draw Fusion Options"> + <param argument="--sampleName" type="text" value="" optional="true" label="Sample Name printed as the title on every page"/> + <param argument="--transcriptSelection" type="select" optional="true" label="Transcript selection"> + <help>By default the transcript isoform with the highest coverage is drawn. + Alternatively, the transcript isoform that is provided in the columns + transcript_id1 and transcript_id2 in the given fusions file can be drawn. + Selecting the isoform with the highest coverage usually produces nicer plots, + in the sense that the coverage track is smooth and shows a visible increase in coverage after the fusion breakpoint. + However, the isoform with the highest coverage may not be the one that is involved in the fusion. + Often, genomic rearrangements lead to non-canonical isoforms being transcribed. + For this reason, it can make sense to rely on the transcript selection provided by the columns transcript_id1/2, + which reflect the actual isoforms involved in a fusion. +\ As a third option, the transcripts that are annotated as canonical can be drawn. + Transcript isoforms tagged with appris_principal, appris_candidate, or CCDS are considered canonical. + </help> + <option value="coverage">coverage</option> + <option value="provided">provided</option> + <option value="canonical">canonical</option> + </param> + <param argument="--minConfidenceForCircosPlot" type="select" optional="true" label="Transcript selection"> + <help>The fusion of interest is drawn as a solid line in the circos plot. + To give an impression of the overall degree of rearrangement, + all other fusions are drawn as semi-transparent lines in the background. + This option determines which other fusions should be included in the circos plot. + Values specify the minimum confidence a fusion must have to be included. + It usually makes no sense to include low-confidence fusions in circos plots, + because they are abundant and unreliable, and would clutter up the circos plot. + Default: medium + </help> + <option value="none">none - only the fusion of interest is drawn</option> + <option value="low">low</option> + <option value="medium">medium</option> + <option value="high">high</option> + </param> + <param argument="--squishIntrons" type="select" optional="true" label="Squish introns"> + <help>Exons usually make up only a small fraction of a gene. + They may be hard to see in the plot. i + Since introns are in most situations of no interest in the context of gene fusions, + this switch can be used to shrink the size of introns to a fixed, negligible size. + It makes sense to disable this feature, if breakpoints in introns are of importance. + Default: TRUE + </help> + <option value="TRUE">True</option> + <option value="FALSE">False</option> + </param> + <param argument="--showIntergenicVicinity" type="text" value="" optional="true" label="Intergenic Vicinity"> + <help>This option only applies to intergenic breakpoints. + If it is set to a value greater than 0, then the script draws the genes + which are no more than the given distance away from an intergenic breakpoint. + The keywords closestGene and closestProteinCodingGene instruct the script + to dynamically determine the distance to the next (protein-coding) gene for each breakpoint. + Alternatively, instead of specifying a single distance + that is applied upstream and downstream of both breakpoints alike, + more fine-grained control over the region to be shown is possible by specifying four comma-separated values. + The first two values determine the region to the left and to the right of breakpoint 1; + the third and fourth values determine the region to the left and to the right of breakpoint 2. + Note that this option is incompatible with squishIntrons. + Default: 0 + </help> + <option value="closestGene">closestGene</option> + <option value="closestProteinCodingGene">closestProteinCodingGene</option> + <validator type="regex" message="">^(closestGene|closestProteinCodingGene|\d+|\d+,\d+,\d+,\d+)$</validator> + </param> + <param argument="--mergeDomainsOverlappingBy" type="float" value="" min="0." max="1.0" optional="true" label="Merge Domains Overlapping By"> + <help>Occasionally, domains are annotated redundantly. + For example, tyrosine kinase domains are frequently annotated as + Protein tyrosine kinase and Protein kinase domain. + In order to simplify the visualization, such domains can be merged into one, + given that they overlap by the given fraction. + The description of the larger domain is used. + Default: 0.9 + </help> + </param> + <param argument="--printExonLabels" type="select" optional="true" label="Print Exon Labels"> + <help>By default the number of an exon is printed inside each exon, + which is taken from the attribute exon_number of the GTF annotation. + When a gene has many exons, the boxes may be too narrow to contain the labels, + resulting in unreadable exon labels. In these situations, i + it may be better to turn off exon labels. + Default: TRUE + </help> + <option value="TRUE">True</option> + <option value="FALSE">False</option> + </param> + <param argument="--render3dEffect" type="select" optional="true" label="Render 3D effect"> + <help>Whether light and shadow should be rendered to give objects a 3D effect. + Default: TRUE + </help> + <option value="TRUE">True</option> + <option value="FALSE">False</option> + </param> + <param argument="--optimizeDomainColors" type="select" optional="true" label="Optimize Domain Colors"> + <help>By default, the script colorizes domains according to the colors + specified in the file given in --annotation. + This way, coloring of domains is consistent across all proteins. + But since there are more distinct domains than colors, + this can lead to different domains having the same color. + If this option is set to TRUE, the colors are recomputed for each fusion separately. + This ensures that the colors have the maximum distance for each individual fusion, + but they are no longer consistent across different fusions. + Default: FALSE + </help> + <option value="TRUE">True</option> + <option value="FALSE">False</option> + </param> + <param argument="--color1" type="color" value="" optional="true" label="Color of the 5' end of the fusion."/> + <param argument="--color2" type="color" value="" optional="true" label="Color of the 3' end of the fusion."/> + <param argument="--pdfWidth" type="float" value="" min="1." optional="true" label="Width of PDF output file in inches" + help="Default: 11.692"/> + <param argument="--pdfHeight" type="float" value="" min="1." optional="true" label="Height of PDF output file in inches" + help="Default: 8.267"/> + <param argument="--fontSize" type="float" value="" min="0." optional="true" label="Scale the size of text" + help="Default: 1.0"/> + <param argument="--fontFamily" type="text" value="" optional="true" label="Font to use for all labels in the plots."> + <help>Default: Helvetica + </help> + <option value="serif">serif</option> + <option value="sans">sans</option> + <option value="mono">mono</option> + <option value="AvantGarde">AvantGarde</option> + <option value="Bookman">Bookman</option> + <option value="Courier">Courier</option> + <option value="Helvetica">Helvetica</option> + <option value="Helvetica-Narrow">Helvetica-Narrow</option> + <option value="NewCenturySchoolbook">NewCenturySchoolbook</option> + <option value="Palatino">Palatino</option> + <option value="Times">Times</option> + <option value="URWGothic">URWGothic</option> + <option value="URWBookman">URWBookman</option> + <option value="NimbusMon">NimbusMon</option> + <option value="NimbusSan">NimbusSan</option> + <option value="URWHelvetica">URWHelvetica</option> + <option value="NimbusSanCond">NimbusSanCond</option> + <option value="CenturySch">CenturySch</option> + <option value="URWPalladio">URWPalladio</option> + <option value="NimbusRom">NimbusRom</option> + <option value="URWTimes">URWTimes</option> + <option value="ArialMT">ArialMT</option> + <option value="Japan1">Japan1</option> + <option value="Japan1HeiMin">Japan1HeiMin</option> + <option value="Japan1GothicBBB">Japan1GothicBBB</option> + <option value="Japan1Ryumin">Japan1Ryumin</option> + <option value="Korea1">Korea1</option> + <option value="Korea1deb">Korea1deb</option> + <option value="CNS1">CNS1</option> + <option value="GB1">GB1</option> + </param> + <param argument="--fixedScale" type="integer" value="" min="0" optional="true" label="Apply a fixed scale to all fusions"> + <help>By default, transcripts are scaled automatically to fill the entire page. + This parameter enforces a fixed scale to be applied to all fusions, + which is useful when a collection of fusions should be visualized and the sizes of all transcripts should be comparable. + A common use case is the visualization of a gene that is found to be fused to multiple partners. + By forcing all fusion plots to use the same scale, the fusions can be summarized as a collage + in a single plot one above the other with matching scales. + Note: The scale must be bigger than the sum of the biggest pair of transcripts to be drawn, + or else dynamic scaling is applied, because display errors would occur otherwise. + The default value is 0, which means that no fixed scale should be used + and that the scale should be adapted dynamically for each fusion. Default: 0 + </help> + </param> + <param argument="--coverageRange" type="text" value="" optional="true" label="Maximum coverage for plot"> + <help>When the parameter --alignments is used, coverage plots are drawn above the transcripts of the fused genes. + The plots can be cropped at a fixed level by passing a non-zero value to this parameter. + When only a single value is given, both coverage plots (for gene1 and gene2) are cropped at the same level. + When two comma-separated values are given, the cutoffs can be specified independently for the two plots. + A value of 0 indicates that no cropping should be applied (i.e., the cutoff is set to the peak coverage) + and that the coverage plots of both genes should be on the same scale. This is the default behavior. + A value of 0,0 also indicates that no cropping should be applied, + but the coverage plots of the two genes have different scales: + each one is scaled individually to the peak coverage of the respective gene. + Default: 0 + </help> + <validator type="regex" message="">^\d+(,\d+)?$</validator> + </param> + </section> + </xml> + <token name="@DRAW_FUSIONS@"> +draw_fusions.R + --fusions='$fusions' + --alignments='Aligned.sortedByCoord.out.bam' + --annotation='$genome_gtf.annotation' + --output=fusions.pdf + #if $visualization.cytobands + --cytobands='$visualization.cytobands' + #end if + #if $protein_domains + --proteinDomains='$protein_domains' + #end if + ## Visualization Options + #if $visualization.options.transcriptSelection + --transcriptSelection=$visualization.options.transcriptSelection + #end if + #if $visualization.options.minConfidenceForCircosPlot + --minConfidenceForCircosPlot=$visualization.options.minConfidenceForCircosPlot + #end if + #if $visualization.options.squishIntrons + --squishIntrons=$visualization.options.squishIntrons + #if $visualization.options.squishIntrons == 'FALSE' and $visualization.options.showIntergenicVicinity + --showIntergenicVicinity='$visualization.options.showIntergenicVicinity' + #end if + #end if + #if $visualization.options.mergeDomainsOverlappingBy + --mergeDomainsOverlappingBy=$visualization.options.mergeDomainsOverlappingBy + #end if + #if $visualization.options.sampleName + --sampleName='$visualization.options.sampleName' + #end if + #if $visualization.options.printExonLabels + --printExonLabels=$visualization.options.printExonLabels + #end if + #if $visualization.options.coverageRange + --coverageRange='$visualization.options.coverageRange' + #end if + #if $visualization.options.render3dEffect + --render3dEffect=$visualization.options.render3dEffect + #end if + #if $visualization.options.optimizeDomainColors + --optimizeDomainColors=$visualization.options.optimizeDomainColors + #end if + #if $visualization.options.color1 + --color1='$visualization.options.color1' + #end if + #if $visualization.options.color2 + --color2='$visualization.options.color2' + #end if + #if str($visualization.options.pdfWidth) + --pdfWidth=$visualization.options.pdfWidth + #end if + #if str($visualization.options.pdfHeight) + --pdfHeight=$visualization.options.pdfHeight + #end if + # fontFamily + #if $visualization.options.fontFamily + --fontFamily=$visualization.options.fontFamily + #end if + #if str($visualization.options.fontSize) + --fontSize=$visualization.options.fontSize + #end if +</token> +</macros>