Mercurial > repos > iuc > samtools_view
comparison samtools_view.xml @ 14:5826298f6a73 draft
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tool_collections/samtools/samtools_view commit 5cb103832529f17e5c72e7f122758c13519fbe5e
author | iuc |
---|---|
date | Mon, 15 Aug 2022 09:19:43 +0000 |
parents | 0dbf49c414ae |
children | 6be888be75f9 |
comparison
equal
deleted
inserted
replaced
13:0dbf49c414ae | 14:5826298f6a73 |
---|---|
1 <tool id="samtools_view" name="Samtools view" version="@TOOL_VERSION@+galaxy2" profile="@PROFILE@"> | 1 <tool id="samtools_view" name="Samtools view" version="@TOOL_VERSION@+galaxy0" profile="@PROFILE@"> |
2 <description>- reformat, filter, or subsample SAM, BAM or CRAM</description> | 2 <description>- reformat, filter, or subsample SAM, BAM or CRAM</description> |
3 <macros> | 3 <macros> |
4 <import>macros.xml</import> | 4 <import>macros.xml</import> |
5 <token name="@REF_DATA@"> | 5 <token name="@REF_DATA@"> |
6 ## additional reference data | 6 ## additional reference data |
152 #if $input.is_of_type('sam') or $std_filters or $reg_filters: | 152 #if $input.is_of_type('sam') or $std_filters or $reg_filters: |
153 ## There is no index or we cannot use it because we are | 153 ## There is no index or we cannot use it because we are |
154 ## not dealing with all of the reads in the indexed | 154 ## not dealing with all of the reads in the indexed |
155 ## file. We have to do an extra pass over the input to | 155 ## file. We have to do an extra pass over the input to |
156 ## count the reads to subsample. | 156 ## count the reads to subsample. |
157 sample_fragment=`samtools view -c $std_filters infile $reg_filters | awk '{s=\$1} END {frac=s/${mode.subsample_config.subsampling_mode.target}; print(frac > 1 ? $seed+1/frac : ".0")}'` && | 157 sample_fragment=`samtools view -c $std_filters infile $reg_filters | awk '{s=\$1} END {frac=s/${mode.subsample_config.subsampling_mode.target}; printf("%.8f\n", frac > 1 ? $seed+1/frac : ".0")}'` && |
158 #else: | 158 #else: |
159 ## We can get the count of reads to subsample using | 159 ## We can get the count of reads to subsample using |
160 ## an inexpensive call to idxstats. | 160 ## an inexpensive call to idxstats. |
161 sample_fragment=`samtools idxstats infile | awk '{s+=\$4+\$3} END {frac=s/${mode.subsample_config.subsampling_mode.target}; print(frac > 1 ? $seed+1/frac : ".0")}'` && | 161 sample_fragment=`samtools idxstats infile | awk '{s+=\$4+\$3} END {frac=s/${mode.subsample_config.subsampling_mode.target}; printf("%.8f\n", frac > 1 ? $seed+1/frac : ".0")}'` && |
162 #end if | 162 #end if |
163 #end if | 163 #end if |
164 #end if | 164 #end if |
165 | 165 |
166 ## call samtools view | 166 ## call samtools view |
688 <param name="addref_select" value="history" /> | 688 <param name="addref_select" value="history" /> |
689 <param name="ref" value="test.fa" /> | 689 <param name="ref" value="test.fa" /> |
690 </conditional> | 690 </conditional> |
691 <output name="outputsam" file="test_20.bam" ftype="bam" lines_diff="4" /> | 691 <output name="outputsam" file="test_20.bam" ftype="bam" lines_diff="4" /> |
692 </test> | 692 </test> |
693 <!-- 21) sampling options--> | 693 <!-- 21) sampling options target < total reads --> |
694 <test> | 694 <test> |
695 <param name="input" value="in_test_15.sam" ftype="sam" /> | 695 <param name="input" value="in_test_15.sam" ftype="sam" /> |
696 <conditional name="mode"> | 696 <conditional name="mode"> |
697 <param name="outtype" value="selected_reads" /> | 697 <param name="outtype" value="selected_reads" /> |
698 <section name="subsample_config"> | 698 <section name="subsample_config"> |
705 <conditional name="output_format"> | 705 <conditional name="output_format"> |
706 <param name="oformat" value="input" /> | 706 <param name="oformat" value="input" /> |
707 </conditional> | 707 </conditional> |
708 </conditional> | 708 </conditional> |
709 </conditional> | 709 </conditional> |
710 <output name="outputsam" file="test_21.sam" ftype="sam" compare="diff" lines_diff="6" /> | 710 <output name="outputsam" file="test_21.sam" ftype="sam" compare="diff" lines_diff="10" /> |
711 </test> | 711 </test> |
712 <!-- 22) --> | 712 <!-- 22) target > total reads --> |
713 <test> | 713 <test> |
714 <param name="input" value="in_test_15.sam" ftype="sam" /> | 714 <param name="input" value="in_test_15.sam" ftype="sam" /> |
715 <conditional name="mode"> | 715 <conditional name="mode"> |
716 <param name="outtype" value="selected_reads" /> | 716 <param name="outtype" value="selected_reads" /> |
717 <section name="subsample_config"> | 717 <section name="subsample_config"> |
784 <conditional name="output_format"> | 784 <conditional name="output_format"> |
785 <param name="oformat" value="input" /> | 785 <param name="oformat" value="input" /> |
786 </conditional> | 786 </conditional> |
787 </conditional> | 787 </conditional> |
788 </conditional> | 788 </conditional> |
789 <output name="outputsam" file="test_25.sam" ftype="sam" compare="diff" lines_diff="6" /> | 789 <output name="outputsam" file="test_25.sam" ftype="sam" compare="diff" lines_diff="2" /> |
790 </test> | 790 </test> |
791 <!-- 26) --> | 791 <!-- 26) --> |
792 <test> | 792 <test> |
793 <param name="input" value="in_test_14.bam" ftype="bam" /> | 793 <param name="input" value="in_test_14.bam" ftype="bam" /> |
794 <conditional name="mode"> | 794 <conditional name="mode"> |