Mercurial > repos > jasmine_amir > sra_tools
comparison sam_dump.xml @ 0:878e5d4becef
planemo upload
author | jasmine_amir |
---|---|
date | Thu, 02 Feb 2023 18:11:05 -0500 |
parents | |
children | c9fb9ecae076 |
comparison
equal
deleted
inserted
replaced
-1:000000000000 | 0:878e5d4becef |
---|---|
1 <tool id="sam_dump" name="Download and Extract Reads in BAM" version="@TOOL_VERSION@+galaxy@VERSION_SUFFIX@" profile="@PROFILE@"> | |
2 <description>format from NCBI SRA</description> | |
3 <macros> | |
4 <import>macros.xml</import> | |
5 </macros> | |
6 <expand macro="edam_ontology"/> | |
7 <expand macro="bio_tools"/> | |
8 <expand macro="requirements"/> | |
9 <version_command>sam-dump --version | tr -d $'\n'</version_command> | |
10 <command detect_errors="exit_code"><![CDATA[ | |
11 @COPY_CONFIGFILE@ | |
12 @SET_ACCESSIONS@ | |
13 | |
14 ## Do not use prefetch if region is specified, to avoid downloading | |
15 ## the complete sra file. | |
16 | |
17 #if $input.input_select == "sra_file": | |
18 sam-dump --log-level fatal --accession '\$acc' | |
19 #else: | |
20 #if ( str( $adv.region ) == "" ): | |
21 prefetch -X 200000000 "\$acc" && | |
22 #end if | |
23 sam-dump --log-level fatal --disable-multithreading | |
24 #end if | |
25 | |
26 #if str( $adv.region ) != "": | |
27 --aligned-region '$adv.region' | |
28 #end if | |
29 #if str( $adv.matepairDist ) != "": | |
30 --matepair-distance '$adv.matepairDist' | |
31 #end if | |
32 #if str( $adv.minMapq ) != "": | |
33 --min-mapq '$adv.minMapq' | |
34 #end if | |
35 --header | |
36 #if str( $adv.alignments ) == "both": | |
37 --unaligned | |
38 #end if | |
39 | |
40 #if str( $adv.alignments ) == "unaligned": | |
41 --unaligned-spots-only | |
42 #end if | |
43 #if (str( $adv.primary ) == "yes") and (str ( $adv.alignments != "unaligned") ): | |
44 --primary | |
45 #end if | |
46 "\$acc" | |
47 | |
48 #if str( $outputformat ) == "bam": | |
49 | samtools view -Sb - 2> /dev/null > "\$acc.bam" | |
50 #elif str( $outputformat ) == "sam": | |
51 > "\$acc.sam" | |
52 #end if | |
53 | |
54 #if $input.input_select != "sra_file": | |
55 ); done; | |
56 #end if | |
57 echo "Done with all accessions." | |
58 ]]> | |
59 </command> | |
60 <expand macro="configfile_hack"/> | |
61 <inputs> | |
62 <expand macro="input_conditional"/> | |
63 <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."> | |
64 <option value="bam">bam</option> | |
65 <option value="sam">sam</option> | |
66 </param> | |
67 <section name="adv" title="Advanced Options" expanded="False"> | |
68 <expand macro="alignments"/> | |
69 <expand macro="region"/> | |
70 <expand macro="matepairDist"/> | |
71 <param name="primary" type="select" value="no"> | |
72 <label>only primary aligments</label> | |
73 <option value="no">No</option> | |
74 <option value="yes">Yes</option> | |
75 </param> | |
76 <expand macro="minMapq"></expand> | |
77 </section> | |
78 </inputs> | |
79 <outputs> | |
80 <collection name="output_collection" type="list" label="sam-dump: Downloaded SAM/BAM data"> | |
81 <discover_datasets pattern="(?P<designation>.+)\.bam" directory="." ext='bam'/> | |
82 <discover_datasets pattern="(?P<designation>.+)\.sam" directory="." ext='sam'/> | |
83 </collection> | |
84 </outputs> | |
85 <tests> | |
86 <test> | |
87 <param name="input_select" value="accession_number"/> | |
88 <param name="accession" value="SRR925743"/> | |
89 <param name="outputformat" value="sam"/> | |
90 <param name="region" value="17:41243452-41277500"/> | |
91 <output_collection name="output_collection" type="list" count="1"> | |
92 <element name="SRR925743" file="SRR925743_sam_dump_result.sam" compare="contains" ftype="sam"/> | |
93 </output_collection> | |
94 </test> | |
95 <test> | |
96 <param name="input_select" value="accession_number"/> | |
97 <param name="accession" value="SRR925743,SRR522874"/> | |
98 <param name="outputformat" value="sam"/> | |
99 <param name="region" value="17:41243452-41277500"/> | |
100 <output_collection name="output_collection" type="list" count="2"> | |
101 <element name="SRR522874" file="SRR522874_sam_dump_result.sam" compare="contains" ftype="sam"/> | |
102 <element name="SRR925743" file="SRR925743_sam_dump_result.sam" compare="contains" ftype="sam"/> | |
103 </output_collection> | |
104 </test> | |
105 </tests> | |
106 <help><![CDATA[ | |
107 | |
108 **What it does?** | |
109 | |
110 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 and returns a collection of NGS data containing one file for each accession number provided. | |
111 | |
112 | |
113 @HOW_TO_USE_IT@ | |
114 | |
115 @ACCESSION_LIST_HOWTO@ | |
116 | |
117 ----- | |
118 | |
119 .. _sam-dump: https://github.com/ncbi/sra-tools | |
120 .. _BAM: https://samtools.github.io/hts-specs/SAMv1.pdf | |
121 .. _collection: https://galaxyproject.org/tutorials/collections/ | |
122 .. _link: https://trace.ncbi.nlm.nih.gov/Traces/index.html?view=run_browser&display=reads | |
123 | |
124 @SRATOOLS_ATTRRIBUTION@ | |
125 ]]></help> | |
126 <expand macro="citation"/> | |
127 </tool> |