-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathfast_compress_files.sh
52 lines (47 loc) · 1.36 KB
/
fast_compress_files.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
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
#!/bin/bash
# ------------------------------------------------------------------
# fast_compress_files.sh
# Script to use pigz for parallel compression
# ------------------------------------------------------------------
USAGE="Usage: ./fast_compress_files.sh <path_to_dir>"
if [ $# == 0 ] ; then
echo $USAGE
exit 1;
fi
find "$1" -type f -not -path '*python*' \
'(' -iname '*.adj' \
-o -iname '*.bai' \
-o -iname '*.bed' \
-o -iname '*.bedGraph' \
-o -iname '*.broadPeak' \
-o -iname '*.bt2' \
-o -iname '*.bt2l' \
-o -iname '*.bw' \
-o -iname '*.cgbins' \
-o -iname '*.cgfreq' \
-o -iname '*.csv' \
-o -iname '*.fa' \
-o -iname '*.faa' \
-o -iname '*.fna' \
-o -iname '*.fasta' \
-o -iname '*.fastq' \
-o -iname '*.gappedPeak' \
-o -iname 'Genome' \
-o -iname '*.gff' \
-o -iname '*.gtf' \
-o -iname '*.hic' \
-o -iname '*.locs' \
-o -iname '*.matrix' \
-o -iname '*.narrowPeak' \
-o -iname '*.out' \
-o -iname '*.Rdata' \
-o -iname 'SA' \
-o -iname 'SAindex' \
-o -iname '*.sam' \
-o -iname '*.seq' \
-o -iname '*.tab' \
-o -iname '*.tsv' \
-o -iname '*.txt' \
-o -iname '*.xls' \
-o -iname '*.xlsx' ')' \
-exec pigz -p4 -f -v {} ';'