We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 6b64831 commit 3e31b1dCopy full SHA for 3e31b1d
1 file changed
wdl_tasks/peak_calling.wdl
@@ -13,13 +13,17 @@ task EstimateFragSize {
13
Int mem = 50
14
}
15
16
- command <<<
17
- bash <<'EOF'
18
- FRAGSIZE=$(homer findPeaks -style factor -size given -input ~{bam} 2>/dev/null \
19
- | grep 'fragment length' \
20
- | awk '{print $NF}')
+ command <<<
+ set -euo pipefail
+
+ # Make tag directory
+ makeTagDirectory tagdir ~{bam} -format sam
21
22
+ # Extract fragment size from HOMER tagInfo.txt
23
+ FRAGSIZE=$(grep "fragmentLengthEstimate=" tagdir/tagInfo.txt | awk -F'=' '{print $2}')
24
25
+ # Write to file for Cromwell output
26
echo "$FRAGSIZE" > fragsize.txt
- EOF
27
>>>
28
29
output {
0 commit comments