forked from PeterUlz/ExpressionPrediction
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Workflow
42 lines (28 loc) · 908 Bytes
/
Workflow
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
#As Rmdup is obsolete, this can be used instead to sort bam files \
and remove duplicates from them
# First, the bam file has to be sorted
#!/bin/bash
#
#$ -cwd
java -jar $picard_dir/picard.jar SortSam \
I=/mnt/work1/users/pughlab/projects/MMRF/WGS_bam_links/MMRF-13-FU2_S7.bam \
O=MMRF-13-FU2_S7_sorted.bam \
SORT_ORDER=coordinate
# to run: sbatch -c 2 -t 1:00:00 --mem 16G <filename>
#Next, duplicates are removed
#!/bin/bash
#
#$ -cwd
module load picard/2.10.9
java -jar $picard_dir/picard.jar MarkDuplicates \
I=MMRF-13-FU2_S7_sorted.bam \
O=MMRF-13-FU2_S7_marked_duplicates.bam \
M=MMRF-13-FU2_S7_marked_dup_metrics.txt \
REMOVE_DUPLICATES=True
# the file that ends with 'FU2_S7_marked_duplicates' has its duplicates removed
#It can then be indexed:
#!/bin/bash
#
#$ -cwd
module load samtools/1.9
samtools index FU2_S7_DuplicatesRemoved.rmdup.bam