comparison frameshift_deletions_checks.xml @ 1:029d90b0c4f6 draft

planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/smallgenomeutilities commit e702dcdbc7c3235ef3c4ee8998c7247d1af49465
author iuc
date Fri, 14 Jul 2023 22:07:22 +0000
parents f079716f598c
children e8971ca74398
comparison
equal deleted inserted replaced
0:f079716f598c 1:029d90b0c4f6
9 </requirements> 9 </requirements>
10 <!-- once we have version-from-git-tag in 0.4.0: <version_command>frameshift_deletion_checks &#x002D&#x002Dversion</version_command> --> 10 <!-- once we have version-from-git-tag in 0.4.0: <version_command>frameshift_deletion_checks &#x002D&#x002Dversion</version_command> -->
11 <command detect_errors="exit_code"> 11 <command detect_errors="exit_code">
12 <![CDATA[ 12 <![CDATA[
13 #if $input.is_of_type("cram"): 13 #if $input.is_of_type("cram"):
14 echo 'is CRAM' >&2 && 14 ln -s '$input' input.cram &&
15 ln -vs '$input' 'input.${input.ext}' >&2 && 15 ln -s '$input.metadata.cram_index' input.cram.crai &&
16 ln -vs '$input.metadata.cram_index' 'input.${input.ext}.crai' >&2 &&
17 #elif $input.is_of_type("bam"): 16 #elif $input.is_of_type("bam"):
18 echo 'is BAM' && 17 ln -s '$input' input.bam &&
19 ln -s '$input' 'input.${input.ext}' >&2 && 18 ln -s '$input.metadata.bam_index' input.bam.bai &&
20 ln -s '$input.metadata.bam_index' 'input.${input.ext}.bai' >&2 &&
21 #else: 19 #else:
22 # raise TypeError('Unknown input alignment type ${input.ext}') 20 # raise TypeError('Unknown input alignment type ${input.ext}')
23 #end if 21 #end if
24 ln -vs '$consensus' 'consensus.${consensus.ext}' >&2 && 22 ln -s '$consensus' consensus.fasta &&
25 ln -vs '$reference' 'reference.${reference.ext}' >&2 && 23 #if str($ref_data.choice) == 'custom':
24 ln -s '$reference' reference.fa &&
25 #else:
26 ln -s '$__tool_directory__/ref_NC_045512.2.fasta' reference.fa &&
27 #end if
26 28
27 frameshift_deletions_checks 29 frameshift_deletions_checks
28 --input='input.${input.ext}' 30 --input=input.${input.ext}
29 --consensus='consensus.${consensus.ext}' 31 --consensus=consensus.fasta
30 --reference='reference.${reference.ext}' 32 --reference=reference.fa
31 --genes='$genes' 33 #if str($ref_data.choice) == 'standard':
32 --output='$report' 34 --genes='$__tool_directory__'/annotations_NC_045512.2.gff3
33 #if $orf1ab != '': 35 --orf1ab='cds-YP_009724389.1'
34 --orf1ab='$orf1ab' 36 #else:
37 --genes='$ref_data.genes'
38 --orf1ab='$ref_data.orf1ab'
35 #end if 39 #end if
36 '$english' 40 $out_options.english
37 $zero_based 41 $out_options.zero_based
42 --output=report.tsv &&
43 python '$__tool_directory__/frameshift_deletions_report_fixer.py' report.tsv '$report'
38 ]]> 44 ]]>
39 <!-- ##cores \${GALAXY_SLOTS:-4} --> 45 <!-- ##cores \${GALAXY_SLOTS:-4} -->
40 </command> 46 </command>
41 <inputs> 47 <inputs>
42 <param argument="--consensus" type="data" format="fasta" label="Consensus" help="Fasta file containing the sample's consensus sequence (majority, with indels)" /> 48 <param argument="--consensus" type="data" format="fasta" label="Consensus" help="Fasta file containing the sample's consensus sequence (majority, with indels)" />
43 <param argument="--input" type="data" format="bam,cram" label="Input BAM" help="Input BAM file with sample's sequencing reads, aligned against the reference" /> 49 <param argument="--input" type="data" format="bam,cram" label="Input BAM" help="Input BAM file with sample's sequencing reads, aligned against the reference" />
44 <param argument="--reference" type="data" format="fasta" label="Reference" help="Fasta file containing the reference sequence (used during alignment) to compare against" /> 50 <conditional name="ref_data">
45 <param argument="--genes" type="data" format="gff" label="Genes GFF" help="GFF file listing genes positions on the reference sequence" /> 51 <param name="choice" type="select" label="Reference data selection" help="Select built-in genome files to base reported positions and annotations on the SARS-CoV-2 reference sequence NC_045512.2. If you have mapped to a different reference, select custom genome files and provide the reference sequence and genomic feature annotations for it in fasta and gff format, repsectively.">
46 52 <option value="standard">Use built-in genome files</option>
47 <param argument="--english" type="boolean" truevalue="--english" falsevalue="--no-english" checked="true" optional="true" label="Write Summary Diagnosis?" help="If checked writes english summary diagnosis." /> 53 <option value="custom">Provide custom genome files</option>
48 <param argument="--zero-based" type="boolean" truevalue="--zero-based" falsevalue="" checked="false" optional="true" label="Use 0-based Sequence Positions?" help="Use 0-based (python) instead of 1-based (standard) seq positions" /> 54 </param>
49 <param argument="--orf1ab" type="text" value="cds-YP_009724389.1" optional="true" label="ORF1AB" help="CDS ID for the full Orf1ab CDS, comprising the ribosomal shift. In the GFF this CDS should consist of 2 entries with the same CDS ID due to the partial overlap caused by the ribosomal shift at translation time."/> 55 <when value="standard" />
56 <when value="custom">
57 <param argument="--reference" type="data" format="fasta" label="Reference" help="Fasta input containing the reference sequence (used during alignment) to compare against" />
58 <param argument="--genes" type="data" format="gff" label="Genes GFF" help="GFF input listing genes positions on the reference sequence" />
59 <param argument="--orf1ab" type="text" value="cds-YP_009724389.1" optional="false" label="Coding sequence containing ribosomal slippage site" help="ID of the full CDS comprising the ribosomal slippage site as it appears in the GFF input. In the GFF this CDS should consist of 2 entries with the same CDS ID due to the partial overlap caused by the ribosomal shift at translation time. Hint: To use the tool with genomes that do not have a ribosomal slippage site, enter an ID that is not present in the GFF.">
60 <validator type="expression">value.strip()</validator>
61 </param>
62 </when>
63 </conditional>
64 <section name="out_options" title="Output format options" expanded="true">
65 <param argument="--english" type="boolean" truevalue="--english" falsevalue="--no-english" checked="true" label="Write Summary Diagnosis?" help="If checked writes english summary diagnosis." />
66 <param argument="--zero-based" type="boolean" truevalue="--zero-based" falsevalue="" checked="false" optional="true" label="Use 0-based Sequence Positions?" help="Use 0-based instead of 1-based genome positions" />
67 </section>
50 </inputs> 68 </inputs>
51 <outputs> 69 <outputs>
52 <data name="report" format="tabular" /> 70 <data name="report" format="tabular">
71 <actions>
72 <conditional name="out_options.english">
73 <!-- The "english" flag removes certain numerical columns and collapses them into new text columns -->
74 <when value="--english">
75 <action name="column_names" type="metadata" default="ref_id,start_position,length,VARIANT,gene_region,reads_all,reads_fwd,reads_rev,deletions,freq_del,freq_del_fwd,freq_del_rev,deletions_fwd,deletions_rev,insertions,freq_insert,freq_insert_fwd,freq_insert_rev,insertions_fwd,insertions_rev,stops,freq_stop,freq_stop_fwd,freq_stop_rev,stops_fwd,stops_rev,matches_ref,pos_critical_inserts,pos_critical_dels,homopolymeric,ref_base,cons_id,variant_position_english,variant_diagnosis" />
76 </when>
77 <when value="--no-english">
78 <action name="column_names" type="metadata" default="ref_id,start_position,length,VARIANT,gene_region,aa_position,stop_mismatches,stoploss_nt,reads_all,reads_fwd,reads_rev,deletions,freq_del,freq_del_fwd,freq_del_rev,deletions_fwd,deletions_rev,insertions,freq_insert,freq_insert_fwd,freq_insert_rev,insertions_fwd,insertions_rev,stops,freq_stop,freq_stop_fwd,freq_stop_rev,stops_fwd,stops_rev,matches_ref,pos_critical_inserts,pos_critical_dels,homopolymeric,ref_base,cons_id" />
79 </when>
80 </conditional>
81 </actions>
82 </data>
53 </outputs> 83 </outputs>
54 <tests> 84 <tests>
55 <test> 85 <test>
56 <param name="consensus" value="consensus.bcftools.fasta.gz" /> 86 <param name="consensus" value="consensus.bcftools.fasta.gz" />
57 <param name="input" value="REF_aln_trim.cram" /> 87 <param name="input" value="REF_aln_trim.cram" />
58 <param name="reference" value="NC_045512.2.fasta.gz" /> 88 <conditional name="ref_data">
59 <param name="genes" value="Genes_NC_045512.2.GFF3" /> 89 <param name="choice" value="standard" />
90 </conditional>
91 <output name="report" value="frameshift_deletions_check.tsv" />
92 </test>
93 <test>
94 <param name="consensus" value="consensus.bcftools.fasta.gz" />
95 <param name="input" value="REF_aln_trim.cram" />
96 <conditional name="ref_data">
97 <param name="choice" value="standard" />
98 </conditional>
99 <section name="out_options">
100 <param name="english" value="false" />
101 </section>
102 <output name="report" value="frameshift_deletions_check_no_english.tsv" />
103 </test>
104 <test>
105 <param name="consensus" value="consensus.bcftools.fasta.gz" />
106 <param name="input" value="REF_aln_trim.cram" />
107 <conditional name="ref_data">
108 <param name="choice" value="custom" />
109 <param name="reference" value="NC_045512.2.fasta" />
110 <param name="genes" value="Genes_NC_045512.2.GFF3" />
111 </conditional>
60 <output name="report" value="frameshift_deletions_check.tsv" /> 112 <output name="report" value="frameshift_deletions_check.tsv" />
61 </test> 113 </test>
62 </tests> 114 </tests>
63 <help> 115 <help>
64 <![CDATA[ 116 <![CDATA[
69 Columns signification: 121 Columns signification:
70 ---------------------- 122 ----------------------
71 123
72 * *gene_region*: Gene in which the deletion is found according to ``--genes`` argument; 124 * *gene_region*: Gene in which the deletion is found according to ``--genes`` argument;
73 * *reads_all*: Total number of reads covering the indel; 125 * *reads_all*: Total number of reads covering the indel;
74 * *reads_fwd*: Total nubmer of forward reads covering the indel; 126 * *reads_fwd*: Total number of forward reads covering the indel;
75 * *reads_rev*: Total nubmer of reverse reads covering the indel; 127 * *reads_rev*: Total number of reverse reads covering the indel;
76 * *deletions/insertions*: Number of reads supporting the deletion/insertion; 128 * *deletions/insertions*: Number of reads supporting the deletion/insertion;
77 * *freq_del/freq_insert*: Fraction of reads supporting the deletion/insertion; 129 * *freq_del/freq_insert*: Fraction of reads supporting the deletion/insertion;
78 * *matches_ref*: number of reads that matche with the reference base; 130 * *matches_ref*: number of reads that matche with the reference base;
79 * *pos_critical_inserts*: Start positions of insertions in the same gene_region that occur in > 40% of reads; 131 * *pos_critical_inserts*: Start positions of insertions in the same gene_region that occur in > 40% of reads;
80 * *pos_critical_dels*: Start positions of deletions in the same gene_region that occur in > 40% of reads; 132 * *pos_critical_dels*: Start positions of deletions in the same gene_region that occur in > 40% of reads;