这是indexloc提供的服务,不要输入任何密码
Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -50,6 +50,8 @@ version 6.0.0-dev
+ Fixed bug whereby `samtools.Fastq` could produce out of sync R1/R2 when used with an unsorted bam input. `samtools collate` is now used by default to group reads by readname in order to avoid this issue.
+ New samtools task: split.
+ Update `bedtools.Intersect` to support `-wa`, `-wb`, and `-s` flags.
+ Add `biopet.ValidateFastq` to check your fastq files for pairing and other correctness.
+ **Breaking**: `samtools.Fastq` now requires defining your singleton read location. This only affects you if you were previously using this task with only a single output read file.
+ Deprecate `modkit.Pileup`'s bedGraph option, it is now output by default.
+ Add support for filterThreshold/filterPercent for `modkit.Pileup`.
+ Add `modkit.Summary` task.
Expand Down
60 changes: 60 additions & 0 deletions biopet.wdl
Original file line number Diff line number Diff line change
@@ -0,0 +1,60 @@
version 1.0

# Copyright (c) 2025 Leiden University Medical Center
#
# Permission is hereby granted, free of charge, to any person obtaining a copy
# of this software and associated documentation files (the "Software"), to deal
# in the Software without restriction, including without limitation the rights
# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
# copies of the Software, and to permit persons to whom the Software is
# furnished to do so, subject to the following conditions:
#
# The above copyright notice and this permission notice shall be included in
# all copies or substantial portions of the Software.
#
# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
# SOFTWARE.


task ValidateFastq {
input {
File inputRead1
File? inputRead2

String memory = "1GiB"
Int timeMinutes = 5 + ceil(size(inputRead1, "GiB"))
String dockerImage = "quay.io/biocontainers/biopet-validatefastq:0.1.1--hdfd78af_3"
}

command {
set -e
java -jar /usr/local/share/biopet-validatefastq-0.1.1-3/validatefastq-assembly-0.1.1.jar \
--fastq1 ~{inputRead1} \
~{"--fastq2 " + inputRead2}
}

output {
}

runtime {
cpu: 1
memory: memory
docker: dockerImage
time_minutes: timeMinutes
}

parameter_meta {
# inputs
inputRead1: {description: "The location of the first FASTQ file (first reads for pairs, in case of paired-end sequencing).", category: "required"}
inputRead2: {description: "The location of the paired end reads.", category: "common"}

memory: {description: "The amount of memory this job will use.", category: "advanced"}
timeMinutes: {description: "The maximum amount of time the job will run in minutes.", 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"}
}
}
7 changes: 6 additions & 1 deletion samtools.wdl
Original file line number Diff line number Diff line change
Expand Up @@ -167,6 +167,7 @@ task Fastq {
String outputRead1
String? outputRead2
String? outputRead0
String? outputReadS
Boolean appendReadNumber = false
Boolean outputQuality = false

Expand All @@ -186,9 +187,10 @@ task Fastq {
mkdir -p "$(dirname ~{outputRead1})"
samtools collate -u -O ~{inputBam} | \
samtools fastq \
~{true="-1" false="-s" defined(outputRead2)} ~{outputRead1} \
~{"-1 " + outputRead1} \
~{"-2 " + outputRead2} \
~{"-0 " + outputRead0} \
~{"-s " + outputReadS} \
~{"-f " + includeFilter} \
~{"-F " + excludeFilter} \
~{"-G " + excludeSpecificFilter} \
Expand All @@ -202,6 +204,7 @@ task Fastq {
File read1 = outputRead1
File? read2 = outputRead2
File? read0 = outputRead0
File? readS = outputReadS
}

runtime {
Expand All @@ -217,6 +220,7 @@ task Fastq {
outputRead1: {description: "The location the reads (first reads for pairs, in case of paired-end sequencing) should be written to.", category: "required"}
outputRead2: {description: "The location the second reads from pairs should be written to.", category: "common"}
outputRead0: {description: "The location the unpaired reads should be written to (in case of paired-end sequenicng).", category: "advanced"}
outputReadS: {description: "The location singleton reads should be written to.", category: "advanced"}
appendReadNumber: {description: "Append /1 and /2 to the read name, or don't. Corresponds to `-n/N`.", category: "advanced"}
outputQuality: {description: "Equivalent to samtools fastq's `-O` flag.", category: "advanced"}
includeFilter: {description: "Include reads with ALL of these flags. Corresponds to `-f`.", category: "advanced"}
Expand Down Expand Up @@ -608,6 +612,7 @@ task Split {
command {
set -e
mkdir -p "~{outputPath}/rg/"

samtools split \
--output-fmt bam \
--output-fmt-option level=~{compressionLevel} \
Expand Down
Loading