comparison prinseq.xml @ 5:1ee282794de3 draft default tip

"planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/prinseq/ commit 34e8262534e22f0d391a81b06374744c4af8da24"
author iuc
date Sun, 20 Mar 2022 10:51:09 +0000
parents 654b3a274ed5
children
comparison
equal deleted inserted replaced
4:654b3a274ed5 5:1ee282794de3
1 <tool id="prinseq" name="PRINSEQ" version="@TOOL_VERSION+galaxy1"> 1 <tool id="prinseq" name="PRINSEQ" version="@TOOL_VERSION+galaxy2" profile="20.05">
2 <description>to process quality of sequences</description> 2 <description>to process quality of sequences</description>
3 <xrefs>
4 <xref type="bio.tools">prinseq</xref>
5 </xrefs>
3 <macros> 6 <macros>
4 <token name="@TOOL_VERSION">0.20.4</token> 7 <token name="@TOOL_VERSION">0.20.4</token>
5 </macros> 8 </macros>
6 <requirements> 9 <requirements>
7 <requirement type="package" version="@TOOL_VERSION">prinseq</requirement> 10 <requirement type="package" version="@TOOL_VERSION">prinseq</requirement>
8 </requirements> 11 </requirements>
9 12
10 <stdio> 13 <stdio>
11 <exit_code range="1:" level="fatal" description="" />
12 <regex match="ERROR" 14 <regex match="ERROR"
13 source="stderr" 15 source="stderr"
14 level="fatal" 16 level="fatal"
15 description="" /> 17 description="" />
16 <regex match="WARNING" 18 <regex match="WARNING"
23 <![CDATA[ 25 <![CDATA[
24 prinseq-lite.pl --version 26 prinseq-lite.pl --version
25 ]]> 27 ]]>
26 </version_command> 28 </version_command>
27 29
28 <command> 30 <command detect_errors="exit_code">
29 <![CDATA[ 31 <![CDATA[
30 mkdir tmp/ 32 mkdir tmp/ &&
31 33
32 && 34 #if $seq_type.seq_type_opt == "single"
35 #set fwd = $seq_type.input_singles
36 #set rev = None
37 #else if $seq_type.seq_type_opt == "paired"
38 #set fwd = $seq_type.input_mate1
39 #set rev = $seq_type.input_mate2
40 #else
41 #set fwd = $seq_type.input_collection.forward
42 #set rev = $seq_type.input_collection.reverse
43 #end if
44
45 #if $rev and $fwd.ext != $rev.ext:
46 >&2 echo 'Both pairs from your paired-end library need to be from the same filetype.' &&
47 exit 1;
48 #end if
49
50 #if $fwd.ext.endswith(".gz")
51 gunzip -c '$fwd' > fwd.fastq &&
52 #else
53 ln -s '$fwd' fwd.fastq &&
54 #end if
55
56 #if $rev
57 #if $rev.ext.endswith(".gz")
58 gunzip -c '$rev' > rev.fastq &&
59 #else
60 ln -s '$rev' rev.fastq &&
61 #end if
62 #end if
63
64 ## create empty output files
65 #if $seq_type.seq_type_opt == "single"
66 touch tmp/good_sequences.fastq tmp/rejected_sequences.fastq &&
67 #else
68 touch tmp/good_sequences_1.fastq tmp/good_sequences_1_singletons.fastq tmp/rejected_sequences_1.fastq &&
69 touch tmp/good_sequences_2.fastq tmp/good_sequences_2_singletons.fastq tmp/rejected_sequences_2.fastq &&
70 #end if
71
33 72
34 prinseq-lite.pl 73 prinseq-lite.pl
35 #if $seq_type.seq_type_opt == "single": 74 -fastq fwd.fastq
36 -fastq '$seq_type.input_singles' 75 #if $rev
37 #if $seq_type.input_singles.is_of_type('fastqillumina'): 76 -fastq2 rev.fastq
38 -phred64
39 #end if
40 #elif $seq_type.seq_type_opt == "paired":
41 -fastq '$seq_type.input_mate1'
42 -fastq2 '$seq_type.input_mate2'
43 #if $seq_type.input_mate1.ext != $seq_type.input_mate2.ext:
44 #import sys
45 #silent sys.stderr.write( 'Both pairs from your paired-end library need to be from the same filetype.' )
46 #end if
47 #if $seq_type.input_mate1.is_of_type('fastqillumina'):
48 -phred64
49 #end if
50 #else
51 -fastq '$seq_type.input_collection.forward'
52 -fastq2 '$seq_type.input_collection.reverse'
53 #if $seq_type.input_collection.forward.is_of_type('fastqillumina'):
54 -phred64
55 #end if
56 #end if 77 #end if
57 78 #if $fwd.ext.startswith('fastqillumina'):
79 -phred64
80 #end if
58 -out_good "tmp/good_sequences" 81 -out_good "tmp/good_sequences"
59 -out_bad "tmp/rejected_sequences" 82 -out_bad "tmp/rejected_sequences"
60 83
61 #if $filter_treatments.apply_filter_treatments == "true": 84 #if $filter_treatments.apply_filter_treatments == "true":
62 #set length_filter_treatments=$filter_treatments.length_filter_treatments 85 #set length_filter_treatments=$filter_treatments.length_filter_treatments
224 247
225 && 248 &&
226 249
227 prinseq-graphs-noPCA.pl -i "tmp/stats.gd" -html_all -o stats_html 250 prinseq-graphs-noPCA.pl -i "tmp/stats.gd" -html_all -o stats_html
228 *# 251 *#
252
253 #if $fwd.ext.endswith('.gz')
254 && for f in tmp/*.fastq;
255 do
256 gzip -c \$f > tmp_file &&
257 mv tmp_file \$f;
258 done
259 #end if
229 ]]> 260 ]]>
230 </command> 261 </command>
231
232 <inputs> 262 <inputs>
233 <conditional name="seq_type"> 263 <conditional name="seq_type">
234 <param name="seq_type_opt" type="select" label="Is this library paired- or single-end?"> 264 <param name="seq_type_opt" type="select" label="Is this library paired- or single-end?">
235 <option value="single" selected="true">Single-end</option> 265 <option value="single" selected="true">Single-end</option>
236 <option value="paired">Paired-end</option> 266 <option value="paired">Paired-end</option>
237 <option value="paired_collection">Paired Collection</option> 267 <option value="paired_collection">Paired Collection</option>
238 </param> 268 </param>
239 <when value="single"> 269 <when value="single">
240 <param name="input_singles" type="data" format="fastqsanger,fastqillumina,fastq" label="FASTQ file" help="FASTQ files." /> 270 <param name="input_singles" type="data" format="fastqsanger,fastqsanger.gz,fastqillumina,fastqillumina.gz" label="FASTQ file" help="FASTQ files." />
241 </when> 271 </when>
242 <when value="paired"> 272 <when value="paired">
243 <param name="input_mate1" type="data" format="fastqsanger,fastqillumina,fastq" label="FASTQ file" help="FASTQ files." /> 273 <param name="input_mate1" type="data" format="fastqsanger,fastqsanger.gz,fastqillumina,fastqillumina.gz" label="FASTQ file" help="FASTQ files." />
244 <param name="input_mate2" type="data" format="fastqsanger,fastqillumina,fastq" label="FASTQ file" help="FASTQ files." /> 274 <param name="input_mate2" type="data" format="fastqsanger,fastqsanger.gz,fastqillumina,fastqillumina.gz" label="FASTQ file" help="FASTQ files." />
245 </when> 275 </when>
246 <when value="paired_collection"> 276 <when value="paired_collection">
247 <param name="input_collection" type="data_collection" collection_type="paired" label="FASTQ collection" help="FASTQ data in a paired collection" /> 277 <param name="input_collection" type="data_collection" collection_type="paired" label="FASTQ collection" help="FASTQ data in a paired collection" />
248 </when> 278 </when>
249 </conditional> 279 </conditional>
628 <option value="dn" selected="True">Dinucleotide odds ratios, includes the PCA plots</option> 658 <option value="dn" selected="True">Dinucleotide odds ratios, includes the PCA plots</option>
629 </param>--> 659 </param>-->
630 </inputs> 660 </inputs>
631 661
632 <outputs> 662 <outputs>
633 <data format_source="input_singles" name="good_sequence_file" from_work_dir="tmp/good_sequences.fastq" 663 <data name="good_sequence_file" format_source="input_singles" from_work_dir="tmp/good_sequences.fastq"
634 label="${tool.name} on ${on_string}: Good sequences" > 664 label="${tool.name} on ${on_string}: Good sequences" >
635 <filter>seq_type['seq_type_opt'] == "single"</filter> 665 <filter>seq_type['seq_type_opt'] == "single"</filter>
636 </data> 666 </data>
637 <data format_source="input_singles" name="rejected_sequence_file" from_work_dir="tmp/rejected_sequences.fastq" 667 <data name="rejected_sequence_file" format_source="input_singles" from_work_dir="tmp/rejected_sequences.fastq"
638 label="${tool.name} on ${on_string}: Rejected sequences" > 668 label="${tool.name} on ${on_string}: Rejected sequences" >
639 <filter>seq_type['seq_type_opt'] == "single"</filter> 669 <filter>seq_type['seq_type_opt'] == "single"</filter>
640 </data> 670 </data>
641 671
642 <data format_source="input_mate1" name="good_sequences_1_file" from_work_dir="tmp/good_sequences_1.fastq" 672 <data name="good_sequences_1_file" format_source="input_mate1" from_work_dir="tmp/good_sequences_1.fastq"
643 label="${tool.name} on ${on_string}: Good sequences for R1" > 673 label="${tool.name} on ${on_string}: Good sequences for R1" >
644 <filter>seq_type['seq_type_opt'] == "paired"</filter> 674 <filter>seq_type['seq_type_opt'] == "paired"</filter>
645 </data> 675 </data>
646 <data format_source="input_mate1" name="good_sequences_1_singletons_file" from_work_dir="tmp/good_sequences_1_singletons.fastq" 676 <data name="good_sequences_1_singletons_file" format_source="input_mate1" from_work_dir="tmp/good_sequences_1_singletons.fastq"
647 label="${tool.name} on ${on_string}: Good singleton sequences for R1" > 677 label="${tool.name} on ${on_string}: Good singleton sequences for R1" >
648 <filter>seq_type['seq_type_opt'] == "paired"</filter> 678 <filter>seq_type['seq_type_opt'] == "paired"</filter>
649 </data> 679 </data>
650 <data format_source="input_mate1" name="rejected_sequence_1_file" from_work_dir="tmp/rejected_sequences_1.fastq" 680 <data name="rejected_sequence_1_file" format_source="input_mate1" from_work_dir="tmp/rejected_sequences_1.fastq"
651 label="${tool.name} on ${on_string}: Rejected sequences for R1" > 681 label="${tool.name} on ${on_string}: Rejected sequences for R1" >
652 <filter>seq_type['seq_type_opt'] == "paired"</filter> 682 <filter>seq_type['seq_type_opt'] == "paired"</filter>
653 </data> 683 </data>
654 <data format_source="input_mate2" name="good_sequences_2_file" from_work_dir="tmp/good_sequences_2.fastq" 684 <data name="good_sequences_2_file" format_source="input_mate2" from_work_dir="tmp/good_sequences_2.fastq"
655 label="${tool.name} on ${on_string}: Good sequences for R2" > 685 label="${tool.name} on ${on_string}: Good sequences for R2" >
656 <filter>seq_type['seq_type_opt'] == "paired"</filter> 686 <filter>seq_type['seq_type_opt'] == "paired"</filter>
657 </data> 687 </data>
658 <data format_source="input_mate2" name="good_sequences_2_singletons_file" from_work_dir="tmp/good_sequences_2_singletons.fastq" 688 <data name="good_sequences_2_singletons_file" format_source="input_mate2" from_work_dir="tmp/good_sequences_2_singletons.fastq"
659 label="${tool.name} on ${on_string}: Good singleton sequences for R2" > 689 label="${tool.name} on ${on_string}: Good singleton sequences for R2" >
660 <filter>seq_type['seq_type_opt'] == "paired"</filter> 690 <filter>seq_type['seq_type_opt'] == "paired"</filter>
661 </data> 691 </data>
662 <data format_source="input_mate2" name="rejected_sequence_2_file" from_work_dir="tmp/rejected_sequences_2.fastq" 692 <data name="rejected_sequence_2_file" format_source="input_mate2" from_work_dir="tmp/rejected_sequences_2.fastq"
663 label="${tool.name} on ${on_string}: Rejected sequences for R2" > 693 label="${tool.name} on ${on_string}: Rejected sequences for R2" >
664 <filter>seq_type['seq_type_opt'] == "paired"</filter> 694 <filter>seq_type['seq_type_opt'] == "paired"</filter>
665 </data> 695 </data>
666 696
667 <collection name="good_sequences_collection" type="paired"> 697 <collection name="good_sequences_collection" format_source="input_collection" type="paired">
698 <data name="forward" from_work_dir="tmp/good_sequences_1.fastq"/>
699 <data name="reverse" from_work_dir="tmp/good_sequences_2.fastq"/>
668 <filter>seq_type['seq_type_opt'] == "paired_collection"</filter> 700 <filter>seq_type['seq_type_opt'] == "paired_collection"</filter>
669 </collection> 701 </collection>
670 702
671 <collection name="singletons_collection" type="paired"> 703 <collection name="singletons_collection" format_source="input_collection" type="paired">
704 <data name="forward" from_work_dir="tmp/good_sequences_1_singletons.fastq"/>
705 <data name="reverse" from_work_dir="tmp/good_sequences_2_singletons.fastq"/>
672 <filter>seq_type['seq_type_opt'] == "paired_collection"</filter> 706 <filter>seq_type['seq_type_opt'] == "paired_collection"</filter>
673 </collection> 707 </collection>
674 708
675 <collection name="rejected_sequences_collection" type="paired"> 709 <collection name="rejected_sequences_collection" format_source="input_collection" type="paired">
710 <data name="forward" from_work_dir="tmp/rejected_sequences_1.fastq"/>
711 <data name="reverse" from_work_dir="tmp/rejected_sequences_2.fastq"/>
676 <filter>seq_type['seq_type_opt'] == "paired_collection"</filter> 712 <filter>seq_type['seq_type_opt'] == "paired_collection"</filter>
677 </collection> 713 </collection>
678 714
679 <!--<data format="html" name="html_file" from_work_dir="stats_html.html" 715 <!--<data format="html" name="html_file" from_work_dir="stats_html.html"
680 label="${tool.name} on ${on_string}: Summary" />--> 716 label="${tool.name} on ${on_string}: Summary" />-->
681 </outputs> 717 </outputs>
682 718
683 <tests> 719 <tests>
684 <test> 720 <test expect_num_outputs="2">
685 <param name='seq_type_opt' value="single"/> 721 <param name='seq_type_opt' value="single"/>
686 <param name="input_singles" value="prinseq_input_sequences.fastq" ftype="fastqsanger"/> 722 <param name="input_singles" value="prinseq_input_sequences.fastq.gz" ftype="fastqsanger.gz"/>
687 <param name='apply_filter_treatments' value="true"/> 723 <param name='apply_filter_treatments' value="true"/>
688 <param name='apply_length_filter_treatments' value="true"/> 724 <param name='apply_length_filter_treatments' value="true"/>
689 <param name='apply_min_length_filter_treatments' value="true"/> 725 <param name='apply_min_length_filter_treatments' value="true"/>
690 <param name="min_length_filter_treatment_value" value="60"/> 726 <param name="min_length_filter_treatment_value" value="60"/>
691 <param name='apply_max_length_filter_treatments' value="false" /> 727 <param name='apply_max_length_filter_treatments' value="false" />
713 <param name="right_quality_trimming_treatment_value" value="20"/> 749 <param name="right_quality_trimming_treatment_value" value="20"/>
714 <param name="type_quality_trimming_treatments" value="min"/> 750 <param name="type_quality_trimming_treatments" value="min"/>
715 <param name="rule_quality_trimming_treatments" value="lt" /> 751 <param name="rule_quality_trimming_treatments" value="lt" />
716 <param name="window_quality_trimming_treatments" value="1"/> 752 <param name="window_quality_trimming_treatments" value="1"/>
717 <param name="step_quality_trimming_treatments" value="1"/> 753 <param name="step_quality_trimming_treatments" value="1"/>
718 754 <output name="good_sequence_file" ftype="fastqsanger.gz">
719 <output name="good_sequence_file" file="prinseq_good_sequences.fastq" ftype="fastqsanger"/> 755 <assert_contents>
756 <has_size value="11219" delta="1000"/>
757 </assert_contents>
758 </output>
759 <output name="rejected_sequence_file" ftype="fastqsanger.gz">
760 <assert_contents>
761 <has_size value="14208" delta="1000"/>
762 </assert_contents>
763 </output>
764 </test>
765 <test expect_num_outputs="6">
766 <param name='seq_type_opt' value="paired"/>
767 <param name="input_mate1" value="pairend_strandspecific_51mer_hg19_chr1_1-100000.R1.fastq" ftype="fastqsanger"/>
768 <param name="input_mate2" value="pairend_strandspecific_51mer_hg19_chr1_1-100000.R2.fastq" ftype="fastqsanger"/>
769 <param name='apply_filter_treatments' value="true"/>
770 <param name='apply_length_filter_treatments' value="true"/>
771 <param name='apply_min_length_filter_treatments' value="true"/>
772 <param name="min_length_filter_treatment_value" value="50"/>
773 <param name='apply_max_length_filter_treatments' value="false" />
774 <param name='apply_quality_filter_treatments' value="true"/>
775 <param name='apply_min_quality_filter_treatments' value="false" />
776 <param name='apply_max_quality_filter_treatments' value="false"/>
777 <param name='apply_mean_quality_filter_treatments' value="true"/>
778 <param name='apply_min_mean_quality_filter_treatments' value="true"/>
779 <param name="min_mean_quality_filter_treatment_value" value="15"/>
780 <param name='apply_max_mean_quality_filter_treatments' value="false"/>
781 <param name='apply_base_content_filter_treatments' value="true"/>
782 <param name='apply_GC_perc_content_filter_treatments' value="false"/>
783 <param name='apply_N_number_content_filter_treatments' value="false"/>
784 <param name='apply_N_percentage_content_filter_treatments' value="true"/>
785 <param name="N_percentage_content_filter_treatment_value" value="2"/>
786 <param name='apply_other_base_content_filter_treatments' value="false"/>
787 <param name='apply_complexity_filter_treatments' value="false"/>
788 <param name='apply_trimming_treatments' value="true" />
789 <param name='apply_length_trimming_treatments' value="false"/>
790 <param name='apply_position_trimming_treatments' value="false"/>
791 <param name='apply_tail_trimming_treatments' value="false"/>
792 <param name='apply_quality_trimming_treatments' value="true"/>
793 <param name='apply_left_quality_trimming_treatments' value="false"/>
794 <param name='apply_right_quality_trimming_treatments' value="true" />
795 <param name="right_quality_trimming_treatment_value" value="20"/>
796 <param name="type_quality_trimming_treatments" value="min"/>
797 <param name="rule_quality_trimming_treatments" value="lt" />
798 <param name="window_quality_trimming_treatments" value="1"/>
799 <param name="step_quality_trimming_treatments" value="1"/>
800 <output name="good_sequences_1_file" ftype="fastqsanger">
801 <assert_contents>
802 <has_n_lines n="36"/>
803 </assert_contents>
804 </output>
805 <output name="good_sequences_1_singletons_file" ftype="fastqsanger">
806 <assert_contents>
807 <has_n_lines n="44"/>
808 </assert_contents>
809 </output>
810 <output name="rejected_sequence_1_file" ftype="fastqsanger">
811 <assert_contents>
812 <has_n_lines n="0"/>
813 </assert_contents>
814 </output>
815 <output name="good_sequences_2_file" ftype="fastqsanger">
816 <assert_contents>
817 <has_n_lines n="36"/>
818 </assert_contents>
819 </output>
820 <output name="good_sequences_2_singletons_file" ftype="fastqsanger">
821 <assert_contents>
822 <has_n_lines n="8"/>
823 </assert_contents>
824 </output>
825 <output name="rejected_sequence_2_file" ftype="fastqsanger">
826 <assert_contents>
827 <has_n_lines n="36"/>
828 </assert_contents>
829 </output>
830 </test>
831 <test expect_num_outputs="9">
832 <param name='seq_type_opt' value="paired_collection"/>
833 <param name="input_collection">
834 <collection type="paired">
835 <element name="forward" value="pairend_strandspecific_51mer_hg19_chr1_1-100000.R1.fastq.gz" ftype="fastqsanger.gz"/>
836 <element name="reverse" value="pairend_strandspecific_51mer_hg19_chr1_1-100000.R2.fastq.gz" ftype="fastqsanger.gz"/>
837 </collection>
838 </param>
839 <param name='apply_filter_treatments' value="true"/>
840 <param name='apply_length_filter_treatments' value="true"/>
841 <param name='apply_min_length_filter_treatments' value="true"/>
842 <param name="min_length_filter_treatment_value" value="50"/>
843 <param name='apply_max_length_filter_treatments' value="false" />
844 <param name='apply_quality_filter_treatments' value="true"/>
845 <param name='apply_min_quality_filter_treatments' value="false" />
846 <param name='apply_max_quality_filter_treatments' value="false"/>
847 <param name='apply_mean_quality_filter_treatments' value="true"/>
848 <param name='apply_min_mean_quality_filter_treatments' value="true"/>
849 <param name="min_mean_quality_filter_treatment_value" value="15"/>
850 <param name='apply_max_mean_quality_filter_treatments' value="false"/>
851 <param name='apply_base_content_filter_treatments' value="true"/>
852 <param name='apply_GC_perc_content_filter_treatments' value="false"/>
853 <param name='apply_N_number_content_filter_treatments' value="false"/>
854 <param name='apply_N_percentage_content_filter_treatments' value="true"/>
855 <param name="N_percentage_content_filter_treatment_value" value="2"/>
856 <param name='apply_other_base_content_filter_treatments' value="false"/>
857 <param name='apply_complexity_filter_treatments' value="false"/>
858 <param name='apply_trimming_treatments' value="true" />
859 <param name='apply_length_trimming_treatments' value="false"/>
860 <param name='apply_position_trimming_treatments' value="false"/>
861 <param name='apply_tail_trimming_treatments' value="false"/>
862 <param name='apply_quality_trimming_treatments' value="true"/>
863 <param name='apply_left_quality_trimming_treatments' value="false"/>
864 <param name='apply_right_quality_trimming_treatments' value="true" />
865 <param name="right_quality_trimming_treatment_value" value="20"/>
866 <param name="type_quality_trimming_treatments" value="min"/>
867 <param name="rule_quality_trimming_treatments" value="lt" />
868 <param name="window_quality_trimming_treatments" value="1"/>
869 <param name="step_quality_trimming_treatments" value="1"/>
870 <output_collection name="good_sequences_collection" type="paired">
871 <element name="forward" ftype="fastqsanger.gz">
872 <assert_contents>
873 <has_size value="605" delta="100"/>
874 </assert_contents>
875 </element>
876 <element name="reverse" ftype="fastqsanger.gz">
877 <assert_contents>
878 <has_size value="667" delta="100"/>
879 </assert_contents>
880 </element>
881 </output_collection>
882 <output_collection name="singletons_collection" type="paired">
883 <element name="forward" ftype="fastqsanger.gz">
884 <assert_contents>
885 <has_size value="720" delta="100"/>
886 </assert_contents>
887 </element>
888 <element name="reverse" ftype="fastqsanger.gz">
889 <assert_contents>
890 <has_size value="219" delta="100"/>
891 </assert_contents>
892 </element>
893 </output_collection>
894 <output_collection name="rejected_sequences_collection" type="paired">
895 <element name="forward" ftype="fastqsanger.gz">
896 <assert_contents>
897 <has_size value="0" delta="0"/>
898 </assert_contents>
899 </element>
900 <element name="reverse" ftype="fastqsanger.gz">
901 <assert_contents>
902 <has_size value="718" delta="100"/>
903 </assert_contents>
904 </element>
905 </output_collection>
720 </test> 906 </test>
721 </tests> 907 </tests>
722 908
723 <help><![CDATA[ 909 <help><![CDATA[
724 **What it does** 910 **What it does**