Mercurial > repos > iuc > sra_tools
comparison sam_dump.xml @ 10:73f1fbdea468 draft
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/sra-tools commit 48c9d7f30655d48c9b46b9ca7a17c454eb54694d
| author | iuc |
|---|---|
| date | Fri, 17 Nov 2017 13:21:53 -0500 |
| parents | 4190f26dd5e6 |
| children | 74dd3d0a33d1 |
comparison
equal
deleted
inserted
replaced
| 9:4190f26dd5e6 | 10:73f1fbdea468 |
|---|---|
| 1 <tool id="sam_dump" name="Download and Extract Reads in BAM" version="@VERSION@.2"> | 1 <tool id="sam_dump" name="Download and Extract Reads in BAM" version="@VERSION@.3"> |
| 2 <description>format from NCBI SRA</description> | 2 <description>format from NCBI SRA</description> |
| 3 <macros> | 3 <macros> |
| 4 <import>sra_macros.xml</import> | 4 <import>sra_macros.xml</import> |
| 5 </macros> | 5 </macros> |
| 6 <expand macro="requirements"/> | 6 <expand macro="requirements"/> |
| 7 <version_command>sam-dump --version</version_command> | 7 <version_command>sam-dump --version</version_command> |
| 8 <command detect_errors="exit_code"> | 8 <command detect_errors="exit_code"> |
| 9 <![CDATA[ | 9 <![CDATA[ |
| 10 #if $input.input_select=="file_list": | 10 #if $input.input_select=="file_list": |
| 11 for acc in `cat $input.file_list` ; | 11 for acc in `cat $input.file_list` ; |
| 12 do | 12 do |
| 13 #elif $input.input_select=="accession_number": | 13 #elif $input.input_select=="accession_number": |
| 14 acc="${input.accession}" && | 14 acc="${input.accession}" && |
| 15 #end if | 15 #end if |
| 16 | 16 |
| 17 #if $input.input_select=="file_list" or $input.input_select=="accession_number": | 17 #if $input.input_select=="file_list" or $input.input_select=="accession_number": |
| 18 [ ""\$acc" =~ ^[E|S|D]RR[0-9]{1,}$" ] && ( | 18 [ ""\$acc" =~ ^[E|S|D]RR[0-9]{1,}$" ] && ( |
| 19 #end if | 19 #end if |
| 20 | |
| 21 | |
| 22 | 20 |
| 23 ## Need to set the home directory to the current working directory, | 21 ## Need to set the home directory to the current working directory, |
| 24 ## else the tool tries to write to home/.ncbi and fails when used | 22 ## else the tool tries to write to home/.ncbi and fails when used |
| 25 ## with a cluster manager. | 23 ## with a cluster manager. |
| 26 export HOME=\$PWD && | 24 export HOME=\$PWD && |
| 36 ## dump command. | 34 ## dump command. |
| 37 vdb-config -s "/repository/user/main/public/root=\$PWD" && | 35 vdb-config -s "/repository/user/main/public/root=\$PWD" && |
| 38 #end if | 36 #end if |
| 39 sam-dump --log-level fatal --disable-multithreading | 37 sam-dump --log-level fatal --disable-multithreading |
| 40 #if str( $adv.region ) != "": | 38 #if str( $adv.region ) != "": |
| 41 --aligned-region "$adv.region" | 39 --aligned-region '$adv.region' |
| 42 #end if | 40 #end if |
| 43 #if str( $adv.matepairDist ) != "": | 41 #if str( $adv.matepairDist ) != "": |
| 44 --matepair-distance "$adv.matepairDist" | 42 --matepair-distance '$adv.matepairDist' |
| 45 #end if | 43 #end if |
| 46 #if str( $adv.minMapq ) != "": | 44 #if str( $adv.minMapq ) != "": |
| 47 --min-mapq "$adv.minMapq" | 45 --min-mapq '$adv.minMapq' |
| 48 #end if | 46 #end if |
| 49 #if str( $adv.header ) == "yes": | 47 --header |
| 50 --header | |
| 51 #else: | |
| 52 --no-header | |
| 53 #end if | |
| 54 #if str( $adv.alignments ) == "both": | 48 #if str( $adv.alignments ) == "both": |
| 55 --unaligned | 49 --unaligned |
| 56 #end if | 50 #end if |
| 57 #if str( $adv.alignments ) == "unaligned": | 51 #if str( $adv.alignments ) == "unaligned": |
| 58 --unaligned-spots-only | 52 --unaligned-spots-only |
| 59 #end if | 53 #end if |
| 60 #if (str( $adv.primary ) == "yes") and (str ( $adv.alignments != "unaligned") ): | 54 #if (str( $adv.primary ) == "yes") and (str ( $adv.alignments != "unaligned") ): |
| 61 --primary | 55 --primary |
| 62 #end if | 56 #end if |
| 63 #if $input.input_select == "file": | 57 #if $input.input_select == "file": |
| 64 "$input.file" | 58 '$input.file' |
| 65 #elif $input.input_select == "accession_number": | 59 #elif $input.input_select == "accession_number": |
| 66 "\$acc" | 60 "\$acc" |
| 67 #elif $input.input_select=="file_list": | 61 #elif $input.input_select=="file_list": |
| 68 "\$acc" | 62 "\$acc" |
| 69 #end if | 63 #end if |
| 70 | 64 |
| 71 #if str( $outputformat ) == "bam": | 65 #if str( $outputformat ) == "bam": |
| 72 | samtools view -Sb - 2> /dev/null | 66 | samtools view -Sb - 2> /dev/null |
| 73 #end if | 67 #end if |
| 74 #if $input.input_select == "file": | 68 #if $input.input_select == "file": |
| 75 > "$output_file" | 69 > '$output_file' |
| 76 #elif $input.input_select == "accession_number": | 70 #elif $input.input_select == "accession_number": |
| 77 > "$output_accession" ) | 71 > '$output_accession' ) |
| 78 #end if | 72 #end if |
| 79 | 73 |
| 80 #if $input.input_select=="file_list": | 74 #if $input.input_select=="file_list": |
| 81 #if str( $outputformat ) == "bam": | 75 #if str( $outputformat ) == "bam": |
| 82 > "\$acc.bam" | 76 > "\$acc.bam" |
| 84 > "\$acc.sam" | 78 > "\$acc.sam" |
| 85 #end if | 79 #end if |
| 86 ) ; done | 80 ) ; done |
| 87 #end if | 81 #end if |
| 88 | 82 |
| 89 | |
| 90 ]]> | 83 ]]> |
| 91 </command> | 84 </command> |
| 92 <inputs> | 85 <inputs> |
| 93 <expand macro="input_conditional"/> | 86 <expand macro="input_conditional"/> |
| 94 <param name="outputformat" type="select" display="radio" label="select output format" help="In vast majority of cases you want to download data in bam format. It is more compact and is accepted by all downstream tools."> | 87 <param name="outputformat" type="select" display="radio" label="select output format" help="In vast majority of cases you want to download data in bam format. It is more compact and is accepted by all downstream tools."> |
| 95 <option value="bam">bam</option> | 88 <option value="bam">bam</option> |
| 96 <option value="sam">sam</option> | 89 <option value="sam">sam</option> |
| 97 </param> | 90 </param> |
| 98 <section name="adv" title="Advanced Options" expanded="False"> | 91 <section name="adv" title="Advanced Options" expanded="False"> |
| 99 <param name="header" type="select" value="yes"> | |
| 100 <label>output header</label> | |
| 101 <option value="yes">Yes</option> | |
| 102 <option value="no">No</option> | |
| 103 </param> | |
| 104 <expand macro="alignments"/> | 92 <expand macro="alignments"/> |
| 105 <expand macro="region"/> | 93 <expand macro="region"/> |
| 106 <expand macro="matepairDist"/> | 94 <expand macro="matepairDist"/> |
| 107 <param name="primary" type="select" value="no"> | 95 <param name="primary" type="select" value="no"> |
| 108 <label>only primary aligments</label> | 96 <label>only primary aligments</label> |
| 139 <param name="region" value="17:41243452-41277500"/> | 127 <param name="region" value="17:41243452-41277500"/> |
| 140 <output name="output_accession" file="sam_dump_result.sam" compare="contains" ftype="sam"/> | 128 <output name="output_accession" file="sam_dump_result.sam" compare="contains" ftype="sam"/> |
| 141 </test> | 129 </test> |
| 142 </tests> | 130 </tests> |
| 143 <help><![CDATA[ | 131 <help><![CDATA[ |
| 132 | |
| 144 **What it does?** | 133 **What it does?** |
| 145 | 134 |
| 146 This tool extracts data (in BAM_ format) from the Short Read Archive (SRA) at the National Center for Biotechnology Information (NCBI). It is based on the sam-dump_ utility of the SRA Toolkit. | 135 This tool extracts data (in BAM_ format) from the Short Read Archive (SRA) at the National Center for Biotechnology Information (NCBI). It is based on the sam-dump_ utility of the SRA Toolkit. |
| 147 | 136 |
| 148 **How to use it?** | 137 **How to use it?** |
| 189 .. _BAM: https://samtools.github.io/hts-specs/SAMv1.pdf | 178 .. _BAM: https://samtools.github.io/hts-specs/SAMv1.pdf |
| 190 .. _sam-dump: http://ncbi.github.io/sra-tools/sam-dump.html | 179 .. _sam-dump: http://ncbi.github.io/sra-tools/sam-dump.html |
| 191 .. _collection: https://galaxyproject.org/tutorials/collections/ | 180 .. _collection: https://galaxyproject.org/tutorials/collections/ |
| 192 .. _link: http://www.ncbi.nlm.nih.gov/Traces/sra/sra.cgi?view=studies | 181 .. _link: http://www.ncbi.nlm.nih.gov/Traces/sra/sra.cgi?view=studies |
| 193 | 182 |
| 194 | |
| 195 @SRATOOLS_ATTRRIBUTION@ | 183 @SRATOOLS_ATTRRIBUTION@ |
| 196 ]]></help> | 184 ]]></help> |
| 197 <expand macro="citation"/> | 185 <expand macro="citation"/> |
| 198 </tool> | 186 </tool> |
