-
Notifications
You must be signed in to change notification settings - Fork 0
/
SRA2Fastq0.0.3.wdl
51 lines (43 loc) · 1.14 KB
/
SRA2Fastq0.0.3.wdl
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
#########################################
# This is a WDL File #
# This file was formed for SRA to Fastq #
# Author: Sun Hao #
# Date: YYYY/MM/DD 2024/03/06 #
#########################################
version 1.0
task SRAtoFastq {
input {
String sra_file_paths
Int ncpu = 4
Int memory_gb = 8
}
command <<<
set -e
mkdir -p fastq_output
# 将单个路径转换为数组
filePathsArray=("${sra_file_paths}")
for sra_file in "${filePathsArray[@]}"; do
fasterq-dump --split-3 ${sra_file} -e ~{ncpu} -O ./fastq_output/
done
>>>
runtime {
cpu: ncpu
memory: "~{memory_gb} GB"
docker: "registry-vpc.miracle.ac.cn/biocontainers/sra-tools:2.10.1--pl526haddd2b5_0"
}
output {
Array[File] fastq_files = glob("fastq_output/*.fastq")
}
}
workflow ConvertSRAtoFastq {
input {
String sra_file_paths
}
call SRAtoFastq {
input:
sra_file_paths = sra_file_paths,
}
output {
Array[File] fastq_files = SRAtoFastq.fastq_files
}
}