# HG changeset patch # User iuc # Date 1588176743 14400 # Node ID c441583adae564615a42dcb08ec41671f79fab8d # Parent aad3885b32164b98f47f5ce84f6aba306cf119d4 "planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/sra-tools commit e00e33a3405201e8decbbb641ad0a8c3e16c8bef" diff -r aad3885b3216 -r c441583adae5 fasterq_dump.xml --- a/fasterq_dump.xml Fri Mar 20 12:47:18 2020 -0400 +++ b/fasterq_dump.xml Wed Apr 29 12:12:23 2020 -0400 @@ -1,4 +1,4 @@ - + format from NCBI SRA sra_macros.xml @@ -12,41 +12,50 @@ ln -s '${input.file}' "\$acc" && #end if @CONFIGURE_TIMEOUT@ - fasterq-dump "\$acc" -e \${GALAXY_SLOTS:-1} - $adv.split - #if str( $adv.minlen ) != "": - --min-read-len "$adv.minlen" - #end if - $adv.skip_technical >> $log 2>&1 - && + @CONFIGURE_RETRY@ + while [ \$SRA_PREFETCH_ATTEMPT -le \$SRA_PREFETCH_RETRIES ] ; do + fasterq-dump "\$acc" -e \${GALAXY_SLOTS:-1} + $adv.split + #if str( $adv.minlen ) != "": + --min-read-len "$adv.minlen" + #end if + $adv.skip_technical >> $log 2>&1 ; + if [ \$? == 0 ] ; then + break ; + else + echo "Prefetch attempt \$SRA_PREFETCH_ATTEMPT of \$SRA_PREFETCH_RETRIES exited with code \$?" ; + SRA_PREFETCH_ATTEMPT=`expr \$SRA_PREFETCH_ATTEMPT + 1` ; + sleep 1 ; + fi ; + done && mkdir -p output && mkdir -p outputOther && count=`ls *.fastq | wc -l` && echo "There are \$count fastq" && data=(\$(ls *.fastq)) && if [ "\$count" -eq 1 ]; then - gzip -c "\${data[0]}" > output/"\${acc}"__single.fastqsanger.gz && + @COMPRESS@ "\${data[0]}" > output/"\${acc}"__single.fastqsanger.gz && rm "\${data[0]}"; elif [ "$adv.split" = "--split-3" ]; then if [ -e "\${acc}".fastq ]; then - gzip -c "\${acc}".fastq > outputOther/"\${acc}"__single.fastqsanger.gz; + @COMPRESS@ "\${acc}".fastq > outputOther/"\${acc}"__single.fastqsanger.gz; fi && - gzip -c "\${acc}"_1.fastq > output/"\${acc}"_forward.fastqsanger.gz && - gzip -c "\${acc}"_2.fastq > output/"\${acc}"_reverse.fastqsanger.gz && + @COMPRESS@ "\${acc}"_1.fastq > output/"\${acc}"_forward.fastqsanger.gz && + @COMPRESS@ "\${acc}"_2.fastq > output/"\${acc}"_reverse.fastqsanger.gz && rm "\${acc}"*.fastq; elif [ "\$count" -eq 2 ]; then #if $adv.skip_technical: - gzip -c "\${data[0]}" > output/"\${acc}"_forward.fastqsanger.gz && - gzip -c "\${data[1]}" > output/"\${acc}"_reverse.fastqsanger.gz && + @COMPRESS@ "\${data[0]}" > output/"\${acc}"_forward.fastqsanger.gz && + @COMPRESS@ "\${data[1]}" > output/"\${acc}"_reverse.fastqsanger.gz && #else - gzip -c "\${data[0]}" > outputOther/"\${data[0]}"sanger.gz && - gzip -c "\${data[1]}" > outputOther/"\${data[1]}"sanger.gz && + @COMPRESS@ "\${data[0]}" > outputOther/"\${data[0]}"sanger.gz && + @COMPRESS@ "\${data[1]}" > outputOther/"\${data[1]}"sanger.gz && #end if rm "\${data[0]}" && rm "\${data[1]}"; else for file in \${data[*]}; do - gzip -c "\$file" > outputOther/"\$file"sanger.gz && + @COMPRESS@ "\$file" > outputOther/"\$file"sanger.gz && rm "\$file"; done; fi; @@ -81,7 +90,7 @@ identifier in the nested collection and identifier_1 is either forward or reverse (for instance samp1_forward.fq). --> - + @@ -179,7 +188,7 @@ **Uploading data for a single accession** -When you type a single accession number (e.g., `SRR1582967`) into **Accession** box and click **Execute** the tool will fetch data for you. +When you type a single accession number (e.g., `SRR1582967`) into **Accession** box and click **Execute** the tool will fetch data for you. ----- @@ -205,7 +214,7 @@ **Output** -In every case, fastq datasets produced will be saved in Galaxy's history as a collection_ - a single history element containing multiple datasets. +In every case, fastq datasets produced will be saved in Galaxy's history as a collection_ - a single history element containing multiple datasets. In fact, three collections will be produced: one containing paired-end data, another containing single-end data, and a third one which contains reads which could not be classified. Some collections may be empty if the accessions provided in the list does not contain one of the type of data. diff -r aad3885b3216 -r c441583adae5 sra_macros.xml --- a/sra_macros.xml Fri Mar 20 12:47:18 2020 -0400 +++ b/sra_macros.xml Wed Apr 29 12:12:23 2020 -0400 @@ -3,9 +3,14 @@ grep '^[[:space:]]*[E|S|D]RR[0-9]\{1,\}[[:space:]]*$' + + sra-tools + pigz