-
Notifications
You must be signed in to change notification settings - Fork 25
a little cleanup #422
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
Open
tedsharpe
wants to merge
8
commits into
main
Choose a base branch
from
tws_a_little_cleanup
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
a little cleanup #422
Changes from all commits
Commits
Show all changes
8 commits
Select commit
Hold shift + click to select a range
934f1ca
a little cleanup
tedsharpe b622439
improved AlignedMetrics
tedsharpe d324901
get rid of weird gatk version in ReadMetrics task
tedsharpe 6ab28a2
fix missing Structs import in scrapbook
tedsharpe 3b8b9f5
delete test json for now
tedsharpe 9674dd2
dammit
tedsharpe ceaf133
bump mosdepth version
tedsharpe f9dc53a
remove MergeVCFs.wdl
tedsharpe File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -5,6 +5,7 @@ channels: | |
- bioconda | ||
- r | ||
dependencies: | ||
- conda-forge::ncurses | ||
- samtools | ||
- bedtools | ||
- java-jdk | ||
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
FROM us.gcr.io/broad-dsde-methods/gatk-sv/samtools-cloud:2023-07-28-v0.28.1-beta-e70dfbd7 | ||
|
||
#install some small, commonly used tools | ||
RUN apt-get -qqy update --fix-missing && \ | ||
apt-get -qqy dist-upgrade && \ | ||
apt-get -qqy install --no-install-recommends bsdmainutils datamash tree && \ | ||
apt-get -qqy clean && \ | ||
rm -rf /tmp/* \ | ||
/var/tmp/* \ | ||
/var/cache/apt/* \ | ||
/var/lib/apt/lists/* \ | ||
/usr/share/man/?? \ | ||
/usr/share/man/??_* | ||
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
IMAGE_NAME = lr-mini | ||
VERSION = 0.1.1 | ||
|
||
TAG1 = us.gcr.io/broad-dsp-lrma/$(IMAGE_NAME):$(VERSION) | ||
TAG2 = us.gcr.io/broad-dsp-lrma/$(IMAGE_NAME):latest | ||
|
||
all: | build push | ||
|
||
build: | ||
docker build -t $(TAG1) -t $(TAG2) . | ||
|
||
build_no_cache: | ||
docker build --no-cache -t $(TAG1) -t $(TAG2) . | ||
|
||
push: | ||
docker push $(TAG1) | ||
docker push $(TAG2) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,185 @@ | ||
version 1.0 | ||
|
||
import "../../structs/Structs.wdl" | ||
|
||
task CoverageTrack { | ||
input { | ||
File bam | ||
File bai | ||
String chr | ||
String start | ||
String end | ||
|
||
RuntimeAttr? runtime_attr_override | ||
} | ||
|
||
String basename = basename(bam, ".bam") | ||
Int disk_size = 2*ceil(size(bam, "GB") + size(bai, "GB")) | ||
|
||
command <<< | ||
set -euxo pipefail | ||
|
||
samtools depth -a ~{bam} -r ~{chr}:~{start}-~{end} | bgzip > ~{basename}.coverage.~{chr}_~{start}_~{end}.txt.gz | ||
tabix -p bed ~{basename}.coverage.~{chr}_~{start}_~{end}.txt.gz | ||
>>> | ||
|
||
output { | ||
File coverage = "~{basename}.coverage.~{chr}_~{start}_~{end}.txt.gz" | ||
File coverage_tbi = "~{basename}.coverage.~{chr}_~{start}_~{end}.txt.gz.tbi" | ||
} | ||
|
||
######################### | ||
RuntimeAttr default_attr = object { | ||
cpu_cores: 1, | ||
mem_gb: 4, | ||
disk_gb: disk_size, | ||
boot_disk_gb: 10, | ||
preemptible_tries: 2, | ||
max_retries: 1, | ||
docker: "us.gcr.io/broad-dsp-lrma/lr-metrics:0.1.11" | ||
} | ||
RuntimeAttr runtime_attr = select_first([runtime_attr_override, default_attr]) | ||
runtime { | ||
cpu: select_first([runtime_attr.cpu_cores, default_attr.cpu_cores]) | ||
memory: select_first([runtime_attr.mem_gb, default_attr.mem_gb]) + " GiB" | ||
disks: "local-disk " + select_first([runtime_attr.disk_gb, default_attr.disk_gb]) + " HDD" | ||
bootDiskSizeGb: select_first([runtime_attr.boot_disk_gb, default_attr.boot_disk_gb]) | ||
preemptible: select_first([runtime_attr.preemptible_tries, default_attr.preemptible_tries]) | ||
maxRetries: select_first([runtime_attr.max_retries, default_attr.max_retries]) | ||
docker: select_first([runtime_attr.docker, default_attr.docker]) | ||
} | ||
} | ||
|
||
task FilterMQ0Reads { | ||
input { | ||
File bam | ||
|
||
RuntimeAttr? runtime_attr_override | ||
} | ||
|
||
Int disk_size = 2*ceil(size(bam, "GB")) | ||
String prefix = basename(bam, ".bam") | ||
|
||
command <<< | ||
set -euxo pipefail | ||
|
||
samtools view -q 1 -b ~{bam} > ~{prefix}.no_mq0.bam | ||
samtools index ~{prefix}.no_mq0.bam | ||
>>> | ||
|
||
output { | ||
File no_mq0_bam = "~{prefix}.no_mq0.bam" | ||
File no_mq0_bai = "~{prefix}.no_mq0.bam.bai" | ||
} | ||
|
||
######################### | ||
RuntimeAttr default_attr = object { | ||
cpu_cores: 1, | ||
mem_gb: 2, | ||
disk_gb: disk_size, | ||
boot_disk_gb: 10, | ||
preemptible_tries: 2, | ||
max_retries: 1, | ||
docker: "us.gcr.io/broad-dsp-lrma/lr-metrics:0.1.11" | ||
} | ||
RuntimeAttr runtime_attr = select_first([runtime_attr_override, default_attr]) | ||
runtime { | ||
cpu: select_first([runtime_attr.cpu_cores, default_attr.cpu_cores]) | ||
memory: select_first([runtime_attr.mem_gb, default_attr.mem_gb]) + " GiB" | ||
disks: "local-disk " + select_first([runtime_attr.disk_gb, default_attr.disk_gb]) + " HDD" | ||
bootDiskSizeGb: select_first([runtime_attr.boot_disk_gb, default_attr.boot_disk_gb]) | ||
preemptible: select_first([runtime_attr.preemptible_tries, default_attr.preemptible_tries]) | ||
maxRetries: select_first([runtime_attr.max_retries, default_attr.max_retries]) | ||
docker: select_first([runtime_attr.docker, default_attr.docker]) | ||
} | ||
} | ||
|
||
task ComputeBedCoverage { | ||
input { | ||
File bam | ||
File bai | ||
File bed | ||
String prefix | ||
|
||
RuntimeAttr? runtime_attr_override | ||
} | ||
|
||
Int disk_size = 2*ceil(size(bam, "GB") + size(bai, "GB") + size(bed, "GB")) | ||
|
||
command <<< | ||
set -euxo pipefail | ||
|
||
bedtools coverage -b ~{bed} -a ~{bam} -nobuf | gzip > ~{prefix}.txt.gz | ||
zcat ~{prefix}.txt.gz | awk '{ sum += sprintf("%f", $15*$16) } END { printf("%f\n", sum) }' > ~{prefix}.count.txt | ||
>>> | ||
|
||
output { | ||
File coverage = "~{prefix}.txt.gz" | ||
Float counts = read_float("~{prefix}.count.txt") | ||
File counts_file = "~{prefix}.count.txt" | ||
} | ||
|
||
######################### | ||
RuntimeAttr default_attr = object { | ||
cpu_cores: 1, | ||
mem_gb: 2, | ||
disk_gb: disk_size, | ||
boot_disk_gb: 10, | ||
preemptible_tries: 2, | ||
max_retries: 1, | ||
docker: "us.gcr.io/broad-dsp-lrma/lr-metrics:0.1.11" | ||
} | ||
RuntimeAttr runtime_attr = select_first([runtime_attr_override, default_attr]) | ||
runtime { | ||
cpu: select_first([runtime_attr.cpu_cores, default_attr.cpu_cores]) | ||
memory: select_first([runtime_attr.mem_gb, default_attr.mem_gb]) + " GiB" | ||
disks: "local-disk " + select_first([runtime_attr.disk_gb, default_attr.disk_gb]) + " HDD" | ||
bootDiskSizeGb: select_first([runtime_attr.boot_disk_gb, default_attr.boot_disk_gb]) | ||
preemptible: select_first([runtime_attr.preemptible_tries, default_attr.preemptible_tries]) | ||
maxRetries: select_first([runtime_attr.max_retries, default_attr.max_retries]) | ||
docker: select_first([runtime_attr.docker, default_attr.docker]) | ||
} | ||
} | ||
|
||
task BamToBed { | ||
input { | ||
File bam | ||
File bai | ||
|
||
RuntimeAttr? runtime_attr_override | ||
} | ||
|
||
String bed = basename(bam, ".bam") + ".bed" | ||
Int disk_size = 4*ceil(size(bam, "GB") + size(bai, "GB")) | ||
|
||
command <<< | ||
set -euxo pipefail | ||
|
||
bedtools bamtobed -i ~{bam} > ~{bed} | ||
>>> | ||
|
||
output { | ||
File bedfile = bed | ||
} | ||
|
||
######################### | ||
RuntimeAttr default_attr = object { | ||
cpu_cores: 2, | ||
mem_gb: 8, | ||
disk_gb: disk_size, | ||
boot_disk_gb: 10, | ||
preemptible_tries: 2, | ||
max_retries: 1, | ||
docker: "us.gcr.io/broad-dsp-lrma/lr-metrics:0.1.11" | ||
} | ||
RuntimeAttr runtime_attr = select_first([runtime_attr_override, default_attr]) | ||
runtime { | ||
cpu: select_first([runtime_attr.cpu_cores, default_attr.cpu_cores]) | ||
memory: select_first([runtime_attr.mem_gb, default_attr.mem_gb]) + " GiB" | ||
disks: "local-disk " + select_first([runtime_attr.disk_gb, default_attr.disk_gb]) + " HDD" | ||
bootDiskSizeGb: select_first([runtime_attr.boot_disk_gb, default_attr.boot_disk_gb]) | ||
preemptible: select_first([runtime_attr.preemptible_tries, default_attr.preemptible_tries]) | ||
maxRetries: select_first([runtime_attr.max_retries, default_attr.max_retries]) | ||
docker: select_first([runtime_attr.docker, default_attr.docker]) | ||
} | ||
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
2 changes: 0 additions & 2 deletions
2
wdl/pipelines/TechAgnostic/Annotation/AnnotateTranscriptomeWithGuide.wdl
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I know we have
0.3.2
on GCR, but given that themain
branch is using0.3.1
, we can do one of two things here:0.3.2
changed from0.3.1
. I see you included several more packages inlr-mosdepth
, so if you built that, then let's also bump the version in the makefile in that docker foler.There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Makefile version bumped.