Merge branch 'master' into kat_hist

This commit is contained in:
Mahesh Binzer-Panchal 2022-05-11 16:56:29 +02:00 committed by GitHub
commit 0199d0efd2
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
5 changed files with 17 additions and 10 deletions

View file

@ -9,6 +9,7 @@ process SRATOOLS_FASTERQDUMP {
input: input:
tuple val(meta), path(sra) tuple val(meta), path(sra)
path ncbi_settings
output: output:
tuple val(meta), path(output), emit: reads tuple val(meta), path(output), emit: reads
@ -20,17 +21,12 @@ process SRATOOLS_FASTERQDUMP {
script: script:
def args = task.ext.args ?: '' def args = task.ext.args ?: ''
def args2 = task.ext.args2 ?: '' def args2 = task.ext.args2 ?: ''
def config = "/LIBS/GUID = \"${UUID.randomUUID().toString()}\"\\n/libs/cloud/report_instance_identity = \"true\"\\n"
// Paired-end data extracted by fasterq-dump (--split-3 the default) always creates // Paired-end data extracted by fasterq-dump (--split-3 the default) always creates
// *_1.fastq *_2.fastq files but sometimes also an additional *.fastq file // *_1.fastq *_2.fastq files but sometimes also an additional *.fastq file
// for unpaired reads which we ignore here. // for unpaired reads which we ignore here.
output = meta.single_end ? '*.fastq.gz' : '*_{1,2}.fastq.gz' output = meta.single_end ? '*.fastq.gz' : '*_{1,2}.fastq.gz'
""" """
eval "\$(vdb-config -o n NCBI_SETTINGS | sed 's/[" ]//g')" export NCBI_SETTINGS="\$PWD/${ncbi_settings}"
if [[ ! -f "\${NCBI_SETTINGS}" ]]; then
mkdir -p "\$(dirname "\${NCBI_SETTINGS}")"
printf '${config}' > "\${NCBI_SETTINGS}"
fi
fasterq-dump \\ fasterq-dump \\
$args \\ $args \\

View file

@ -10,7 +10,7 @@ tools:
homepage: https://github.com/ncbi/sra-tools homepage: https://github.com/ncbi/sra-tools
documentation: https://github.com/ncbi/sra-tools/wiki documentation: https://github.com/ncbi/sra-tools/wiki
tool_dev_url: https://github.com/ncbi/sra-tools tool_dev_url: https://github.com/ncbi/sra-tools
licence: ["US-Government-Work"] licence: ["Public Domain"]
input: input:
- meta: - meta:
@ -22,6 +22,11 @@ input:
type: directory type: directory
description: Directory containing ETL data for the given SRA. description: Directory containing ETL data for the given SRA.
pattern: "*/*.sra" pattern: "*/*.sra"
- ncbi_settings:
type: file
description: >
An NCBI user settings file.
pattern: "*.mkfg"
output: output:
- meta: - meta:

View file

@ -382,7 +382,7 @@ params {
test3_gff = "${test_data_dir}/genomics/prokaryotes/candidatus_portiera_aleyrodidarum/genome/gff/test3.gff" test3_gff = "${test_data_dir}/genomics/prokaryotes/candidatus_portiera_aleyrodidarum/genome/gff/test3.gff"
} }
'illumina' { 'illumina' {
test_1_fastq_gz = "${test_data_dir}/genomics/prokaryotes/candidatus_portiera_aleyrodidarum/illumina/fasta/test_1.fastq.gz" test_1_fastq_gz = "${test_data_dir}/genomics/prokaryotes/candidatus_portiera_aleyrodidarum/illumina/fastq/test_1.fastq.gz"
test_2_fastq_gz = "${test_data_dir}/genomics/prokaryotes/candidatus_portiera_aleyrodidarum/illumina/fastq/test_2.fastq.gz" test_2_fastq_gz = "${test_data_dir}/genomics/prokaryotes/candidatus_portiera_aleyrodidarum/illumina/fastq/test_2.fastq.gz"
test_se_fastq_gz = "${test_data_dir}/genomics/prokaryotes/candidatus_portiera_aleyrodidarum/illumina/fastq/test_se.fastq.gz" test_se_fastq_gz = "${test_data_dir}/genomics/prokaryotes/candidatus_portiera_aleyrodidarum/illumina/fastq/test_se.fastq.gz"
} }

View file

@ -13,7 +13,7 @@ workflow test_sratools_fasterqdump_single_end {
def input = Channel.of([ id:'test_single_end', single_end:true ]) def input = Channel.of([ id:'test_single_end', single_end:true ])
.combine(UNTAR.out.untar.map{ it[1] }) .combine(UNTAR.out.untar.map{ it[1] })
SRATOOLS_FASTERQDUMP ( input ) SRATOOLS_FASTERQDUMP(input, file(params.test_data['generic']['config']['ncbi_user_settings'], checkIfExists: true))
} }
workflow test_sratools_fasterqdump_paired_end { workflow test_sratools_fasterqdump_paired_end {
@ -24,5 +24,5 @@ workflow test_sratools_fasterqdump_paired_end {
def input = Channel.of([ id:'test_paired_end', single_end:false ]) def input = Channel.of([ id:'test_paired_end', single_end:false ])
.combine(UNTAR.out.untar.map{ it[1] }) .combine(UNTAR.out.untar.map{ it[1] })
SRATOOLS_FASTERQDUMP ( input ) SRATOOLS_FASTERQDUMP(input, file(params.test_data['generic']['config']['ncbi_user_settings'], checkIfExists: true))
} }

View file

@ -8,6 +8,9 @@
md5sum: 1054c7b71884acdb5eed8a378f18be82 md5sum: 1054c7b71884acdb5eed8a378f18be82
- path: output/untar/SRR13255544/SRR13255544.sra - path: output/untar/SRR13255544/SRR13255544.sra
md5sum: 466d05dafb2eec672150754168010b4d md5sum: 466d05dafb2eec672150754168010b4d
- path: output/sratools/versions.yml
contains:
- "sratools: 2.11.0"
- name: sratools fasterqdump test_sratools_fasterqdump_paired_end - name: sratools fasterqdump test_sratools_fasterqdump_paired_end
command: nextflow run ./tests/modules/sratools/fasterqdump -entry test_sratools_fasterqdump_paired_end -c ./tests/config/nextflow.config -c ./tests/modules/sratools/fasterqdump/nextflow.config command: nextflow run ./tests/modules/sratools/fasterqdump -entry test_sratools_fasterqdump_paired_end -c ./tests/config/nextflow.config -c ./tests/modules/sratools/fasterqdump/nextflow.config
@ -21,3 +24,6 @@
md5sum: 3e3b3af3413f50a1685fd7b3f1456d4e md5sum: 3e3b3af3413f50a1685fd7b3f1456d4e
- path: output/untar/SRR11140744/SRR11140744.sra - path: output/untar/SRR11140744/SRR11140744.sra
md5sum: 065666caf5b2d5dfb0cb25d5f3abe659 md5sum: 065666caf5b2d5dfb0cb25d5f3abe659
- path: output/sratools/versions.yml
contains:
- "sratools: 2.11.0"