Commit 3771f3a 1 parent 0d9d7d7 commit 3771f3a Copy full SHA for 3771f3a
File tree 1 file changed +7
-1
lines changed
1 file changed +7
-1
lines changed Original file line number Diff line number Diff line change @@ -31,10 +31,14 @@ process PREPARE_BAM {
31
31
"""
32
32
mkdir tmp
33
33
34
+ samtools sort \
35
+ --threads ${ params.prepare_bam_cpus} \
36
+ -o ${ name} .sorted.bam ${ bam}
37
+
34
38
gatk AddOrReplaceReadGroups \
35
39
--java-options '-Xmx${ params.prepare_bam_memory} -Djava.io.tmpdir=./tmp' \
36
40
--VALIDATION_STRINGENCY SILENT \
37
- --INPUT ${ bam } \
41
+ --INPUT ${ name } .sorted.bam \
38
42
--OUTPUT /dev/stdout \
39
43
--REFERENCE_SEQUENCE ${ reference} \
40
44
--RGPU 1 \
@@ -52,6 +56,8 @@ process PREPARE_BAM {
52
56
--OUTPUT ${ name} .prepared.bam \
53
57
--SEQUENCE_DICTIONARY ${ reference}
54
58
59
+ rm -f ${ name} .sorted.bam
60
+
55
61
echo ${ params.manifest} >> software_versions.${ task.process} .txt
56
62
gatk --version >> software_versions.${ task.process} .txt
57
63
"""
You can’t perform that action at this time.
0 commit comments