Miscellaneous |
Version lineage of this tool (guids ordered most recent to oldest) |
toolshed.g2.bx.psu.edu/repos/iuc/sra_tools/sam_dump/3.0.3+galaxy0 |
toolshed.g2.bx.psu.edu/repos/iuc/sra_tools/sam_dump/3.0.0+galaxy0 (this tool) |
toolshed.g2.bx.psu.edu/repos/iuc/sra_tools/sam_dump/2.11.0+galaxy0 |
toolshed.g2.bx.psu.edu/repos/iuc/sra_tools/sam_dump/2.10.9+galaxy0 |
toolshed.g2.bx.psu.edu/repos/iuc/sra_tools/sam_dump/2.10.8+galaxy0 |
toolshed.g2.bx.psu.edu/repos/iuc/sra_tools/sam_dump/1.2.5 |
sam_dump |
Requirements (dependencies defined in the <requirements> tag set) |
name | version | type |
sra-tools | 3.0.0 | package |
pigz | 2.6 | package |
samtools | 1.16.1 | package |
Additional information about this tool |
mkdir -p ~/.ncbi && cp '$user_settings_mkfg' ~/.ncbi/user-settings.mkfg && vdb-config -s "/repository/user/main/public/root=\$PWD" && vdb-config -s "/repository/user/ad/public/root=\$PWD" && vdb-config -s "/repository/user/default-path=\$PWD" && vdb-config -s "/repository/user/main/public/root=\$PWD" && vdb-config -s /http/timeout/read=10000 && #if $input.input_select == "sra_file": acc='${input.sra_file.name}' && ln -s '${input.sra_file}' "\$acc" && #else #if $input.input_select == "file_list": #if $input.file_list.is_of_type('sra_manifest.tabular'): #set $column = $input.file_list.unsanitized.metadata.column_names.index('Run') + 1 cut -f $column '$input.file_list'| tail -n +2 > accessions && #else grep '^[[:space:]]*[E|S|D]RR[0-9]\{1,\}[[:space:]]*$' '$input.file_list' > accessions && #end if #elif $input.input_select == "accession_number": echo '${input.accession}' | sed -r 's/(\,|\;|__cn__)/\n/g' > accessions && #end if for acc in \$(cat ./accessions); do ( echo "Downloading accession: \$acc..." && #end if ## Do not use prefetch if region is specified, to avoid downloading ## the complete sra file. #if $input.input_select == "sra_file": sam-dump --log-level fatal --accession '\$acc' #else: #if ( str( $adv.region ) == "" ): prefetch -X 200000000 "\$acc" && #end if sam-dump --log-level fatal --disable-multithreading #end if #if str( $adv.region ) != "": --aligned-region '$adv.region' #end if #if str( $adv.matepairDist ) != "": --matepair-distance '$adv.matepairDist' #end if #if str( $adv.minMapq ) != "": --min-mapq '$adv.minMapq' #end if --header #if str( $adv.alignments ) == "both": --unaligned #end if #if str( $adv.alignments ) == "unaligned": --unaligned-spots-only #end if #if (str( $adv.primary ) == "yes") and (str ( $adv.alignments != "unaligned") ): --primary #end if "\$acc" #if str( $outputformat ) == "bam": | samtools view -Sb - 2> /dev/null > "\$acc.bam" #elif str( $outputformat ) == "sam": > "\$acc.sam" #end if #if $input.input_select != "sra_file": ); done; #end if echo "Done with all accessions."
Functional tests |
name | inputs | outputs | required files |
Test-1 |
input|accession: SRR925743 input|input_select: accession_number outputformat: sam adv|region: 17:41243452-41277500 |
||
Test-2 |
input|accession: SRR925743,SRR522874 input|input_select: accession_number outputformat: sam adv|region: 17:41243452-41277500 |