comparison isoformswitchanalyzer.xml @ 5:69fa05891f9d draft default tip

planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/isoformswitchanalyzer commit 7b7d9892618706dad95641831db8b9f83deb86e1
author iuc
date Fri, 02 Jun 2023 10:26:51 +0000
parents 8575def9219d
children
comparison
equal deleted inserted replaced
4:8575def9219d 5:69fa05891f9d
18 source="both" 18 source="both"
19 level="fatal" 19 level="fatal"
20 description="An undefined error occurred, please check your input carefully and contact your administrator." /> 20 description="An undefined error occurred, please check your input carefully and contact your administrator." />
21 </stdio> 21 </stdio>
22 <command><![CDATA[ 22 <command><![CDATA[
23 #set $conditions = list()
24 #set $sampleIDs = list()
25 #set $replicates = list()
23 #if $functionMode.selector == 'data_import' 26 #if $functionMode.selector == 'data_import'
24 #if $functionMode.transcriptome.is_of_type("fasta.gz"): 27 #if $functionMode.transcriptome.is_of_type("fasta.gz"):
25 ln -s '${functionMode.transcriptome}' './transcriptome.fasta.gz' && 28 ln -s '${functionMode.transcriptome}' './transcriptome.fasta.gz' &&
26 #set $transcriptome = './transcriptome.fasta.gz' 29 #set $transcriptome = './transcriptome.fasta.gz'
27 #else 30 #else
49 #else 52 #else
50 ln -s '${$functionMode.tool_source.novoisoforms.stringtieAnnotation}' './stringtie_annotation.gtf' && 53 ln -s '${$functionMode.tool_source.novoisoforms.stringtieAnnotation}' './stringtie_annotation.gtf' &&
51 #set $stringtie_annotation = './stringtie_annotation.gtf' 54 #set $stringtie_annotation = './stringtie_annotation.gtf'
52 #end if 55 #end if
53 #end if 56 #end if
57 #else if $functionMode.tool_source.selector == 'salmon'
58 #set $filename = 'quant.sf'
54 #else 59 #else
55 #set $filename = 'quant.sf' 60 #set $filename = 'abundance.tsv'
56 #end if 61 #end if
57 62
58 #for $index in range(len($functionMode.first_factor.trans_counts)): 63 #for $index in range(len($functionMode.tool_source.first_factor.trans_counts)):
59 mkdir './input_files/${functionMode.first_factor.factorLevel}${index}/' && 64 $conditions.append($functionMode.tool_source.first_factor.factorLevel)
60 ln -s $functionMode.first_factor.trans_counts[$index] './input_files/${functionMode.first_factor.factorLevel}${index}/${filename}' && 65 $sampleIDs.append(str($functionMode.tool_source.first_factor.factorLevel) + str($index))
66 $replicates.append($index)
67 mkdir './input_files/${functionMode.tool_source.first_factor.factorLevel}${index}/' &&
68 ln -s $functionMode.tool_source.first_factor.trans_counts[$index] './input_files/${functionMode.tool_source.first_factor.factorLevel}${index}/${filename}' &&
61 #end for 69 #end for
62 70
63 #for $index in range(len($functionMode.second_factor.trans_counts)): 71 #for $index in range(len($functionMode.tool_source.second_factor.trans_counts)):
64 mkdir './input_files/${functionMode.second_factor.factorLevel}${index}/' && 72 $conditions.append($functionMode.tool_source.second_factor.factorLevel)
65 ln -s $functionMode.second_factor.trans_counts[$index] './input_files/${functionMode.second_factor.factorLevel}${index}/${filename}' && 73 $sampleIDs.append(str($functionMode.tool_source.second_factor.factorLevel) + str($index))
74 $replicates.append($index)
75 mkdir './input_files/${functionMode.tool_source.second_factor.factorLevel}${index}/' &&
76 ln -s $functionMode.tool_source.second_factor.trans_counts[$index] './input_files/${functionMode.tool_source.second_factor.factorLevel}${index}/${filename}' &&
66 #end for 77 #end for
67 78
68 Rscript '${__tool_directory__}/IsoformSwitchAnalyzeR.R' 79 Rscript '${__tool_directory__}/IsoformSwitchAnalyzeR.R'
80 #for $i, $condition in enumerate($conditions)
81 --condition $condition
82 --sampleID $sampleIDs[$i]
83 --replicate $replicates[$i]
84 #end for
85 $functionMode.pairedSamples
69 --modeSelector $functionMode.selector 86 --modeSelector $functionMode.selector
70 --parentDir './input_files' 87 --parentDir './input_files'
71 --annotation $annotation 88 --annotation $annotation
72 --transcriptome $transcriptome 89 --transcriptome $transcriptome
73 $functionMode.removeNonConvensionalChr 90 $functionMode.removeNonConvensionalChr
205 <option value="data_import">Import data</option> 222 <option value="data_import">Import data</option>
206 <option value="first_step">Analysis part one: Extract isoform switches and their sequences</option> 223 <option value="first_step">Analysis part one: Extract isoform switches and their sequences</option>
207 <option value="second_step">Analysis part two: Plot all isoform switches and their annotation</option> 224 <option value="second_step">Analysis part two: Plot all isoform switches and their annotation</option>
208 </param> 225 </param>
209 <when value="data_import"> 226 <when value="data_import">
210 <section name="first_factor" title="1: Factor level" expanded="true">
211 <param name="factorLevel" type="text" value="FactorLevel" label="Specify a factor level, typical values could be 'tumor' or 'treated'"
212 help="Only letters, numbers and underscores will be retained in this field">
213 <sanitizer>
214 <valid initial="string.letters,string.digits"><add value="_" /></valid>
215 </sanitizer>
216 </param>
217 <param name="trans_counts" type="data" format="tabular" multiple="true" label="Transcript-level expression measurements"/>
218 </section>
219 <section name="second_factor" title="2: Factor level" expanded="true">
220 <param name="factorLevel" type="text" value="FactorLevel" label="Specify a factor level, typical values could be 'tumor' or 'treated'"
221 help="Only letters, numbers and underscores will be retained in this field">
222 <sanitizer>
223 <valid initial="string.letters,string.digits"><add value="_" /></valid>
224 </sanitizer>
225 </param>
226 <param name="trans_counts" type="data" format="tabular" multiple="true" label="Transcript-level expression measurements"/>
227 </section>
228 <conditional name="tool_source"> 227 <conditional name="tool_source">
229 <param name="selector" type="select" label="Quantification data source" help="IsoformSwitchAnalyzeR has different functions for importing data from different sources."> 228 <param name="selector" type="select" label="Quantification data source" help="IsoformSwitchAnalyzeR has different functions for importing data from different sources.">
230 <option value="stringtie">StringTie</option> 229 <option value="stringtie">StringTie</option>
231 <option value="salmon">Salmon/Kallisto</option> 230 <option value="salmon">Salmon</option>
231 <option value="kallisto">Kallisto</option>
232 </param> 232 </param>
233 <when value="salmon"/> 233 <when value="salmon">
234 <expand macro="macro_inputs"/>
235 </when>
236 <when value="kallisto">
237 <expand macro="macro_inputs"/>
238 </when>
234 <when value="stringtie"> 239 <when value="stringtie">
240 <expand macro="macro_inputs"/>
235 <param name="averageSize" type="integer" min="0" value="150" label="Average read length" help="Must be the number of base pairs sequenced. e.g. if the data 241 <param name="averageSize" type="integer" min="0" value="150" label="Average read length" help="Must be the number of base pairs sequenced. e.g. if the data
236 quantified is 75 bp paired ends the the user should supply readLength=75" /> 242 quantified is 75 bp paired ends the the user should supply readLength=75" />
237 <param argument="fixStringTieAnnotationProblem" type="boolean" truevalue="--fixStringTieAnnotationProblem" falsevalue="" checked="true" 243 <param argument="fixStringTieAnnotationProblem" type="boolean" truevalue="--fixStringTieAnnotationProblem" falsevalue="" checked="true"
238 label="Fix StringTie annotation problem" help="This option will automatically try and correct some of the annoation problems created when 244 label="Fix StringTie annotation problem" help="This option will automatically try and correct some of the annoation problems created when
239 doing transcript assembly (unassigned transcripts and merged genes)" /> 245 doing transcript assembly (unassigned transcripts and merged genes)" />
254 help="It is used to integrate the coding sequence (CDS) regions from in the GTF file as the ORF regions used by IsoformSwitchAnalyzeR." /> 260 help="It is used to integrate the coding sequence (CDS) regions from in the GTF file as the ORF regions used by IsoformSwitchAnalyzeR." />
255 <param name="transcriptome" type="data" format="fasta,fasta.gz" label="Transcriptome" 261 <param name="transcriptome" type="data" format="fasta,fasta.gz" label="Transcriptome"
256 help="Please note this different from a fasta file with the sequences of the entire genome." /> 262 help="Please note this different from a fasta file with the sequences of the entire genome." />
257 <param argument="removeNonConvensionalChr" type="boolean" truevalue="--removeNonConvensionalChr" falsevalue="" checked="false" 263 <param argument="removeNonConvensionalChr" type="boolean" truevalue="--removeNonConvensionalChr" falsevalue="" checked="false"
258 label="Remove non-conventional chromosomes" help="These regions are typically used to annotate regions that cannot be associated to a specific region." /> 264 label="Remove non-conventional chromosomes" help="These regions are typically used to annotate regions that cannot be associated to a specific region." />
265 <param argument="pairedSamples" type="boolean" truevalue="--pairedSamples" falsevalue="" checked="false" label="Paired samples between factors" help="Samples
266 from different factors belong to the same individual (e.g. samples from same patient from health and cancerous tissues or different parts from the same plant)" />
259 <param name="countFiles" type="select" label="Generate count matrix files" help="If IsoformSwitchAnalyzeR is used for fixing Stringtie annotation 267 <param name="countFiles" type="select" label="Generate count matrix files" help="If IsoformSwitchAnalyzeR is used for fixing Stringtie annotation
260 problem, it can generate count files for analyzing differential expression with DESeq2 (when selecting collection) or CEMiTool (when secting the expression matrix format)."> 268 problem, it can generate count files for analyzing differential expression with DESeq2 (when selecting collection) or CEMiTool (when secting the expression matrix format).">
261 <option value="disabled">Disabled</option> 269 <option value="disabled">Disabled</option>
262 <option value="collection">Collection of count files</option> 270 <option value="collection">Collection of count files</option>
263 <option value="matrix">Expression matrix</option> 271 <option value="matrix">Expression matrix</option>
264 </param> 272 </param>
265
266 </when> 273 </when>
267 274
268 <!--WRAPPER FIRST STEP SECTION--> 275 <!--WRAPPER FIRST STEP SECTION-->
269 276
270 <when value="first_step"> 277 <when value="first_step">
593 <filter>functionMode['selector'] == 'second_step'</filter> 600 <filter>functionMode['selector'] == 'second_step'</filter>
594 <filter>functionMode['analysis_mode']['selector'] == 'single'</filter> 601 <filter>functionMode['analysis_mode']['selector'] == 'single'</filter>
595 </data> 602 </data>
596 </outputs> 603 </outputs>
597 <tests> 604 <tests>
598 <!-- Test 01: Data import mode--> 605 <!-- Test 01: Data import mode-->
599 <test expect_num_outputs="1"> 606 <test expect_num_outputs="1">
600 <conditional name="functionMode"> 607 <conditional name="functionMode">
601 <param name="selector" value="data_import"/> 608 <param name="selector" value="data_import"/>
602 <param name="genomeAnnotation" value="annotation_salmon.gtf.gz"/> 609 <param name="genomeAnnotation" value="annotation_salmon.gtf.gz"/>
603 <param name="transcriptome" value="transcriptome.fasta.gz"/> 610 <param name="transcriptome" value="transcriptome.fasta.gz"/>
604 <param name="countFiles" value="disabled"/> 611 <param name="countFiles" value="disabled"/>
605 <section name="first_factor">
606 <param name="factorLevel" value="health"/>
607 <param name="trans_counts" value="salmon_cond1_rep1.sf,salmon_cond1_rep2.sf"/>
608 </section>
609 <section name="second_factor">
610 <param name="factorLevel" value="cancer"/>
611 <param name="trans_counts" value="salmon_cond2_rep1.sf,salmon_cond2_rep2.sf"/>
612 </section>
613 <conditional name="tool_source"> 612 <conditional name="tool_source">
614 <param name="selector" value="salmon"/> 613 <param name="selector" value="salmon"/>
614 <section name="first_factor">
615 <param name="factorLevel" value="health"/>
616 <param name="trans_counts" value="salmon_cond1_rep1.sf,salmon_cond1_rep2.sf"/>
617 </section>
618 <section name="second_factor">
619 <param name="factorLevel" value="cancer"/>
620 <param name="trans_counts" value="salmon_cond2_rep1.sf,salmon_cond2_rep2.sf"/>
621 </section>
615 </conditional> 622 </conditional>
616 </conditional> 623 </conditional>
617 <output name="switchList" file="test01.RData" ftype="rdata" compare="sim_size" delta="100"/> 624 <output name="switchList" file="test01.RData" ftype="rdata" compare="sim_size" delta="100"/>
618 </test> 625 </test>
619 <!-- Test 02: Data import mode generate expression matrix--> 626 <!-- Test 02: Data import mode generate expression matrix-->
621 <conditional name="functionMode"> 628 <conditional name="functionMode">
622 <param name="selector" value="data_import"/> 629 <param name="selector" value="data_import"/>
623 <param name="genomeAnnotation" value="annotation_salmon.gtf.gz"/> 630 <param name="genomeAnnotation" value="annotation_salmon.gtf.gz"/>
624 <param name="transcriptome" value="transcriptome.fasta.gz"/> 631 <param name="transcriptome" value="transcriptome.fasta.gz"/>
625 <param name="countFiles" value="matrix"/> 632 <param name="countFiles" value="matrix"/>
626 <section name="first_factor">
627 <param name="factorLevel" value="health"/>
628 <param name="trans_counts" value="salmon_cond1_rep1.sf,salmon_cond1_rep2.sf"/>
629 </section>
630 <section name="second_factor">
631 <param name="factorLevel" value="cancer"/>
632 <param name="trans_counts" value="salmon_cond2_rep1.sf,salmon_cond2_rep2.sf"/>
633 </section>
634 <conditional name="tool_source"> 633 <conditional name="tool_source">
635 <param name="selector" value="salmon"/> 634 <param name="selector" value="salmon"/>
635 <section name="first_factor">
636 <param name="factorLevel" value="health"/>
637 <param name="trans_counts" value="salmon_cond1_rep1.sf,salmon_cond1_rep2.sf"/>
638 </section>
639 <section name="second_factor">
640 <param name="factorLevel" value="cancer"/>
641 <param name="trans_counts" value="salmon_cond2_rep1.sf,salmon_cond2_rep2.sf"/>
642 </section>
636 </conditional> 643 </conditional>
637 </conditional> 644 </conditional>
638 <output name="switchList" ftype="rdata"> 645 <output name="switchList" ftype="rdata">
639 <assert_contents> 646 <assert_contents>
640 <has_size value="652170" delta="300"/> 647 <has_size value="652170" delta="300"/>
648 <conditional name="functionMode"> 655 <conditional name="functionMode">
649 <param name="selector" value="data_import"/> 656 <param name="selector" value="data_import"/>
650 <param name="genomeAnnotation" value="annotation_salmon.gtf.gz"/> 657 <param name="genomeAnnotation" value="annotation_salmon.gtf.gz"/>
651 <param name="transcriptome" value="transcriptome.fasta.gz"/> 658 <param name="transcriptome" value="transcriptome.fasta.gz"/>
652 <param name="countFiles" value="collection"/> 659 <param name="countFiles" value="collection"/>
653 <section name="first_factor">
654 <param name="factorLevel" value="health"/>
655 <param name="trans_counts" value="salmon_cond1_rep1.sf,salmon_cond1_rep2.sf"/>
656 </section>
657 <section name="second_factor">
658 <param name="factorLevel" value="cancer"/>
659 <param name="trans_counts" value="salmon_cond2_rep1.sf,salmon_cond2_rep2.sf"/>
660 </section>
661 <conditional name="tool_source"> 660 <conditional name="tool_source">
662 <param name="selector" value="salmon"/> 661 <param name="selector" value="salmon"/>
662 <section name="first_factor">
663 <param name="factorLevel" value="health"/>
664 <param name="trans_counts" value="salmon_cond1_rep1.sf,salmon_cond1_rep2.sf"/>
665 </section>
666 <section name="second_factor">
667 <param name="factorLevel" value="cancer"/>
668 <param name="trans_counts" value="salmon_cond2_rep1.sf,salmon_cond2_rep2.sf"/>
669 </section>
663 </conditional> 670 </conditional>
664 </conditional> 671 </conditional>
665 <output name="switchList" ftype="rdata"> 672 <output name="switchList" ftype="rdata">
666 <assert_contents> 673 <assert_contents>
667 <has_size value="652170" delta="300"/> 674 <has_size value="652170" delta="300"/>
668 </assert_contents> 675 </assert_contents>
669 </output> 676 </output>
670 <output_collection name="collection_counts_factor1" type="list" count="2"> 677 <output_collection name="collection_counts_factor1" type="list" count="2">
671 <element name="cancer0_dataset" file="test03_cancer_counts.tabular" ftype="tabular" lines_diff="6"/> 678 <element name="health0_dataset" file="test03_health_counts.tabular" ftype="tabular" lines_diff="6"/>
679
672 </output_collection> 680 </output_collection>
673 <output_collection name="collection_counts_factor2" type="list" count="2"> 681 <output_collection name="collection_counts_factor2" type="list" count="2">
674 <element name="health0_dataset" file="test03_health_counts.tabular" ftype="tabular" lines_diff="6"/> 682 <element name="cancer0_dataset" file="test03_cancer_counts.tabular" ftype="tabular" lines_diff="6"/>
675 </output_collection> 683 </output_collection>
676 </test> 684 </test>
677 <!-- Test 04: Extract isoform switches all outputs--> 685 <!-- Test 04: Extract isoform switches all outputs-->
678 <test expect_num_outputs="4"> 686 <test expect_num_outputs="4">
679 <conditional name="functionMode"> 687 <conditional name="functionMode">
865 <has_text text="ATTS_genomic_start"/> 873 <has_text text="ATTS_genomic_start"/>
866 </assert_contents> 874 </assert_contents>
867 </output> 875 </output>
868 <output name="isoformFeatures" ftype="tabular"> 876 <output name="isoformFeatures" ftype="tabular">
869 <assert_contents> 877 <assert_contents>
870 <has_size value="95185" delta="100"/> 878 <has_size value="94888" delta="100"/>
871 <has_text text="gene_overall_mean"/> 879 <has_text text="gene_overall_mean"/>
872 </assert_contents> 880 </assert_contents>
873 </output> 881 </output>
874 </test> 882 </test>
875 <!--Test 07: generate plots and summaries full analsys all inputs--> 883 <!--Test 07: generate plots and summaries full analsys all inputs-->
1037 <has_text text="ATTS_genomic_start"/> 1045 <has_text text="ATTS_genomic_start"/>
1038 </assert_contents> 1046 </assert_contents>
1039 </output> 1047 </output>
1040 <output name="isoformFeatures" ftype="tabular"> 1048 <output name="isoformFeatures" ftype="tabular">
1041 <assert_contents> 1049 <assert_contents>
1042 <has_size value="99607" delta="50"/> 1050 <has_size value="99310" delta="50"/>
1043 <has_text text="gene_overall_mean"/> 1051 <has_text text="gene_overall_mean"/>
1044 </assert_contents> 1052 </assert_contents>
1045 </output> 1053 </output>
1046 </test> 1054 </test>
1047 <!-- Test 08: analyze single gene--> 1055 <!-- Test 08: analyze single gene-->
1059 <assert_contents> 1067 <assert_contents>
1060 <has_size value="531580" delta="300"/> 1068 <has_size value="531580" delta="300"/>
1061 </assert_contents> 1069 </assert_contents>
1062 </output> 1070 </output>
1063 </test> 1071 </test>
1072 <!-- Test 09: Kallisto input-->
1073 <test expect_num_outputs="1">
1074 <conditional name="functionMode">
1075 <param name="selector" value="data_import"/>
1076 <param name="genomeAnnotation" value="annotation_kallisto.gtf.gz"/>
1077 <param name="transcriptome" value="transcriptome_kallisto.fasta.gz"/>
1078 <param name="countFiles" value="disabled"/>
1079 <conditional name="tool_source">
1080 <param name="selector" value="kallisto"/>
1081 <section name="first_factor">
1082 <param name="factorLevel" value="health"/>
1083 <param name="trans_counts" value="kallisto_cond1_rep1.tsv,kallisto_cond1_rep2.tsv"/>
1084 </section>
1085 <section name="second_factor">
1086 <param name="factorLevel" value="cancer"/>
1087 <param name="trans_counts" value="kallisto_cond2_rep1.tsv,kallisto_cond2_rep2.tsv"/>
1088 </section>
1089 </conditional>
1090 </conditional>
1091 <output name="switchList" file="test09.RData" ftype="rdata" compare="sim_size" delta="100"/>
1092 </test>
1093 <!-- Test 10: Test paired samples in the experimental design-->
1094 <test expect_num_outputs="3">
1095 <conditional name="functionMode">
1096 <param name="selector" value="data_import"/>
1097 <param name="genomeAnnotation" value="annotation_salmon.gtf.gz"/>
1098 <param name="transcriptome" value="transcriptome.fasta.gz"/>
1099 <param name="pairedSamples" value="true"/>
1100 <param name="countFiles" value="matrix"/>
1101 <conditional name="tool_source">
1102 <param name="selector" value="salmon"/>
1103 <section name="first_factor">
1104 <param name="factorLevel" value="health"/>
1105 <param name="trans_counts" value="salmon_cond1_rep1.sf,salmon_cond1_rep2.sf"/>
1106 </section>
1107 <section name="second_factor">
1108 <param name="factorLevel" value="cancer"/>
1109 <param name="trans_counts" value="salmon_cond2_rep1.sf,salmon_cond2_rep2.sf"/>
1110 </section>
1111 </conditional>
1112 </conditional>
1113 <output name="switchList" ftype="rdata">
1114 <assert_contents>
1115 <has_size value="652170" delta="300"/>
1116 </assert_contents>
1117 </output>
1118 <output name="sample_annotation" file="test10_samples_annotation.tabular" ftype="tabular"/>
1119 </test>
1064 </tests> 1120 </tests>
1065 <help><![CDATA[ 1121 <help><![CDATA[
1066 1122
1067 .. class:: infomark 1123 .. class:: infomark
1068 1124