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
0162556c
Commit
0162556c
authored
5 years ago
by
Ruben Vorderman
Browse files
Options
Downloads
Patches
Plain Diff
make complement simpler by using fasta index
parent
eae8f2df
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
bedtools.wdl
+7
-39
7 additions, 39 deletions
bedtools.wdl
with
7 additions
and
39 deletions
bedtools.wdl
+
7
−
39
View file @
0162556c
...
@@ -22,15 +22,19 @@ version 1.0
...
@@ -22,15 +22,19 @@ version 1.0
task Complement {
task Complement {
input {
input {
File
genome
File
faidx
File inputBed
File inputBed
String dockerImage = "quay.io/biocontainers/bedtools:2.23.0--hdbcaa40_3"
String dockerImage = "quay.io/biocontainers/bedtools:2.23.0--hdbcaa40_3"
String outputBed = basename(inputBed, "\.bed") + ".complement.bed"
String outputBed = basename(inputBed, "\.bed") + ".complement.bed"
}
}
# Use a fasta index file to get the genome sizes. And convert that to the
# bedtools specific "genome" format.
command {
command {
set -e
cut -f1,2 ~{faidx} > sizes.genome
bedtools complement \
bedtools complement \
-g
~{
genome
}
\
-g
sizes.
genome \
-i ~{inputBed} \
-i ~{inputBed} \
> ~{outputBed}
> ~{outputBed}
}
}
...
@@ -44,7 +48,7 @@ task Complement {
...
@@ -44,7 +48,7 @@ task Complement {
}
}
parameter_meta {
parameter_meta {
genome
: {description: "
Genome file with names and
sizes",
faidx
: {description: "
The fasta index (.fai) file from which to extract the genome
sizes",
category: "required"}
category: "required"}
inputBed: {description: "The inputBed to complement",
inputBed: {description: "The inputBed to complement",
category: "required"}
category: "required"}
...
@@ -57,42 +61,6 @@ task Complement {
...
@@ -57,42 +61,6 @@ task Complement {
}
}
}
}
# Technically not a bedtools task, but needed for bedtools complement.
task GetChromSizes {
input {
File faidx
# Debian for proper GNU Coreutils. Busybox sucks!
String dockerImage = "debian@sha256:f05c05a218b7a4a5fe979045b1c8e2a9ec3524e5611ebfdd0ef5b8040f9008fa"
String outputFile = basename(faidx, "\.fai") + ".genome"
}
# Get first two columns from the fasta index which note name and size.
command {
cut -f1,2 ~{faidx} \
> ~{outputFile}
}
output {
File chromSizes = outputFile
}
runtime {
docker: dockerImage
}
parameter_meta {
faidx: {description: "The fasta index (.fai) file from which to extract the genome sizes",
category: "required"}
outputFile: {description: "The path to write the output to",
category: "advanced"}
dockerImage: {
description: "The docker image used for this task. Changing this may result in errors which the developers may choose not to address.",
category: "advanced"
}
}
}
task Merge {
task Merge {
input {
input {
File inputBed
File inputBed
...
...
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