-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathrun-large.sh
31 lines (29 loc) · 1.18 KB
/
run-large.sh
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
input=NA12878-chr22 #without extension
threads=`grep -c processor /proc/cpuinfo`
if [ ! -f $input.bam ]
then
echo "Input file not present."
if command -v curl > /dev/null
then
echo "Downloading input file."
curl -O http://elprep.exascience.com/$input.bam
elif command -v wget > /dev/null
then
echo "Downloading input file."
wget http://elprep.exascience.com/$input.bam
else
echo "Please download the input file from http://elprep.exascience.com/$input.bam before running this script."
exit
fi
fi
if command -v elprep > /dev/null
then
if command -v samtools > /dev/null
then
elprep $input.bam $input.only_mapped.reordered-contigs.read-group.bam --filter-unmapped-reads --replace-reference-sequences ucsc.hg19.dict --replace-read-group "ID:group1 LB:lib1 PL:illumina PU:unit1 SM:sample1" --sorting-order unsorted --nr-of-threads $threads --gc-on 2
else
echo 'samtools not found. Please download it from http://samtools.sourceforge.net and make sure that its binary is present in your PATH.'
fi
else
echo 'elprep not found. Please download it from https://github.com/exascience/elprep and make sure that its binary is present in your PATH.'
fi