Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

use wget instead of curl #229

Closed
wants to merge 2 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
22 changes: 22 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,30 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0

## [Unpublished Version / DEV]

### Credits

Special thanks to the following for their contributions to the release:

- [Sebastian Uhrig](https://github.com/suhrig)

Thank you to everyone else that has contributed by reporting bugs, enhancements or in any other way, shape or form.

### Enhancements & fixes

- [#169](https://github.com/nf-core/fetchngs/issues/173) - download of big files time out and don't resume

### Software dependencies

| Dependency | Old version | New version |
| ---------- | ----------- | ----------- |
| `wget` | | 1.20.1 |

> **NB:** Dependency has been **updated** if both old and new version information is present.
>
> **NB:** Dependency has been **added** if just the new version information is present.
>
> **NB:** Dependency has been **removed** if new version information isn't present.

## [[1.10.1](https://github.com/nf-core/fetchngs/releases/tag/1.10.1)] - 2023-10-08

### Credits
Expand Down
2 changes: 1 addition & 1 deletion conf/modules.config
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ if (params.input_type == 'sra') {
}

withName: SRA_FASTQ_FTP {
ext.args = '--retry 5 --continue-at - --max-time 1200'
ext.args = '-t 5 -nv -c -T 60'
publishDir = [
[
path: { "${params.outdir}/fastq" },
Expand Down
28 changes: 14 additions & 14 deletions modules/local/sra_fastq_ftp/main.nf
Original file line number Diff line number Diff line change
Expand Up @@ -4,10 +4,10 @@ process SRA_FASTQ_FTP {
label 'process_low'
label 'error_retry'

conda "bioconda::sra-tools=2.11.0"
conda "conda-forge::wget=1.20.1"
container "${ workflow.containerEngine == 'singularity' && !task.ext.singularity_pull_docker_container ?
'https://depot.galaxyproject.org/singularity/sra-tools:2.11.0--pl5321ha49a11a_3' :
'biocontainers/sra-tools:2.11.0--pl5321ha49a11a_3' }"
'https://depot.galaxyproject.org/singularity/wget:1.20.1' :
'biocontainers/wget:1.20.1' }"

input:
tuple val(meta), val(fastq)
Expand All @@ -21,40 +21,40 @@ process SRA_FASTQ_FTP {
def args = task.ext.args ?: ''
if (meta.single_end) {
"""
curl \\
wget \\
$args \\
-L ${fastq[0]} \\
-o ${meta.id}.fastq.gz
-O ${meta.id}.fastq.gz \\
${fastq[0]}

echo "${meta.md5_1} ${meta.id}.fastq.gz" > ${meta.id}.fastq.gz.md5
md5sum -c ${meta.id}.fastq.gz.md5

cat <<-END_VERSIONS > versions.yml
"${task.process}":
curl: \$(echo \$(curl --version | head -n 1 | sed 's/^curl //; s/ .*\$//'))
wget: \$(echo \$(wget --version | head -n 1 | sed 's/^GNU Wget //; s/ .*\$//'))
END_VERSIONS
"""
} else {
"""
curl \\
wget \\
$args \\
-L ${fastq[0]} \\
-o ${meta.id}_1.fastq.gz
-O ${meta.id}_1.fastq.gz \\
${fastq[0]}

echo "${meta.md5_1} ${meta.id}_1.fastq.gz" > ${meta.id}_1.fastq.gz.md5
md5sum -c ${meta.id}_1.fastq.gz.md5

curl \\
wget \\
$args \\
-L ${fastq[1]} \\
-o ${meta.id}_2.fastq.gz
-O ${meta.id}_2.fastq.gz \\
${fastq[1]}

echo "${meta.md5_2} ${meta.id}_2.fastq.gz" > ${meta.id}_2.fastq.gz.md5
md5sum -c ${meta.id}_2.fastq.gz.md5

cat <<-END_VERSIONS > versions.yml
"${task.process}":
curl: \$(echo \$(curl --version | head -n 1 | sed 's/^curl //; s/ .*\$//'))
wget: \$(echo \$(wget --version | head -n 1 | sed 's/^GNU Wget //; s/ .*\$//'))
END_VERSIONS
"""
}
Expand Down