Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
T
tasks
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Container Registry
Model registry
Operate
Environments
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
biowdl
tasks
Commits
94719df0
Commit
94719df0
authored
6 years ago
by
Ruben Vorderman
Browse files
Options
Downloads
Patches
Plain Diff
ncbi to 1.0
parent
ab88bc1a
No related branches found
Branches containing commit
No related tags found
Tags containing commit
1 merge request
!34
Move all files to version 1.0
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
ncbi.wdl
+56
-49
56 additions, 49 deletions
ncbi.wdl
with
56 additions
and
49 deletions
ncbi.wdl
+
56
−
49
View file @
94719df0
task genomeDownload {
String outputPath
String? section = "refseq"
String? format = "all"
String? assemblyLevel = "all"
String? taxId
String? refseqCategory
Boolean? humanReadable
String? ncbiBaseUri
Int? parallel
Int? retries
Boolean? verbose=true
Boolean? debug
String? domain = "all"
version 1.0
String? executable = "ncbi-genome-download"
String? preCommand
task genomeDownload {
input {
String outputPath
String? section = "refseq"
String? format = "all"
String? assemblyLevel = "all"
String? taxId
String? refseqCategory
Boolean? humanReadable
String? ncbiBaseUri
Int? parallel
Int? retries
Boolean? verbose=true
Boolean? debug
String? domain = "all"
String? executable = "ncbi-genome-download"
String? preCommand
}
command {
set -e -o pipefail
$
{preCommand}
$
{executable} \
$
{"--section " + section} \
$
{"--format " + format} \
$
{"--assembly-level " + assemblyLevel } \
$
{"--taxid " + taxId } \
$
{"--refseq-category " + refseqCategory} \
$
{"--output-folder " + outputPath } \
$
{true="--human-readable" false="" humanReadable} \
$
{"--uri " + ncbiBaseUri } \
$
{"--parallel " + parallel } \
$
{"--retries " + retries } \
$
{true="--verbose" false="" verbose } \
$
{true="--debug" false ="" debug } \
$
{domain}
~
{preCommand}
~
{executable} \
~
{"--section " + section} \
~
{"--format " + format} \
~
{"--assembly-level " + assemblyLevel } \
~
{"--taxid " + taxId } \
~
{"--refseq-category " + refseqCategory} \
~
{"--output-folder " + outputPath } \
~
{true="--human-readable" false="" humanReadable} \
~
{"--uri " + ncbiBaseUri } \
~
{"--parallel " + parallel } \
~
{"--retries " + retries } \
~
{true="--verbose" false="" verbose } \
~
{true="--debug" false ="" debug } \
~
{domain}
# Check md5sums for all downloaded files
for folder in $(realpath
$
{outputPath})/*/*/*
for folder in $(realpath
~
{outputPath})/*/*/*
do
(
md5sums="$(
...
...
@@ -69,20 +72,22 @@ task genomeDownload {
task downloadNtFasta{
String libraryPath
String seqTaxMapPath
Boolean? unzip = true
String ntDir = libraryPath + "/nt"
String ntFilePath = ntDir + "/nt.fna"
input {
String libraryPath
String seqTaxMapPath
Boolean? unzip = true
String ntDir = libraryPath + "/nt"
String ntFilePath = ntDir + "/nt.fna"
}
command {
set -e -o pipefail
mkdir -p
$
{ntDir}
rsync -av --partial rsync://ftp.ncbi.nih.gov/blast/db/FASTA/nt.gz*
$
{ntDir}
(cd
$
{ntDir} && md5sum -c nt.gz.md5)
mkdir -p
~
{ntDir}
rsync -av --partial rsync://ftp.ncbi.nih.gov/blast/db/FASTA/nt.gz*
~
{ntDir}
(cd
~
{ntDir} && md5sum -c nt.gz.md5)
# Only unzip when necessary
if
$
{true='true' false='false' unzip}
if
~
{true='true' false='false' unzip}
then
zcat
$
{ntDir}/nt.gz >
$
{ntFilePath}
zcat
~
{ntDir}/nt.gz >
~
{ntFilePath}
fi
}
output {
...
...
@@ -96,16 +101,18 @@ task downloadNtFasta{
}
task downloadAccessionToTaxId {
String downloadDir
Boolean gzip = false
input {
String downloadDir
Boolean gzip = false
}
command {
set -e -o pipefail
mkdir -p
$
{downloadDir}
rsync -av --partial rsync://ftp.ncbi.nlm.nih.gov/pub/taxonomy/accession2taxid/nucl_*.accession2taxid.gz*
$
{downloadDir}
(cd
$
{downloadDir} && md5sum -c *.md5)
for file in
$
{downloadDir}/nucl_*.accession2taxid.gz
mkdir -p
~
{downloadDir}
rsync -av --partial rsync://ftp.ncbi.nlm.nih.gov/pub/taxonomy/accession2taxid/nucl_*.accession2taxid.gz*
~
{downloadDir}
(cd
~
{downloadDir} && md5sum -c *.md5)
for file in
~
{downloadDir}/nucl_*.accession2taxid.gz
do
zcat $file | tail -n +2 | cut -f 2,3
$
{true="| gzip " false='' gzip}> $file.seqtaxmap
$
{true='.gz' false='' gzip}
zcat $file | tail -n +2 | cut -f 2,3
~
{true="| gzip " false='' gzip}> $file.seqtaxmap
~
{true='.gz' false='' gzip}
done
}
output {
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment