File: filterAllZero.sh

package info (click to toggle)
snpeff 5.4.b%2Bdfsg-1
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 757,496 kB
  • sloc: java: 62,572; perl: 2,279; sh: 1,185; python: 744; xml: 507; makefile: 50
file content (21 lines) | stat: -rwxr-xr-x 744 bytes parent folder | download | duplicates (3)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
#!/bin/sh -e

#file=zzz.1660.txt.gz
file=$1

cat $file | ./filterAllZero.pl > circuits.non_zero.raw.txt
cut -f 1,2 circuits.non_zero.raw.txt | tr -d "-" | tr -s "_" > ids.txt
cut -f 3- circuits.non_zero.raw.txt > nums.txt

wc -l nums.txt ids.txt circuits.non_zero.raw.txt

# Create file
cat $file | head -n 1 |  tr -d "-" | tr -s "_" > circuits.non_zero.txt
paste ids.txt nums.txt >> circuits.non_zero.txt

head -n 1 circuits.non_zero.txt | tr "\t" "\n" > expNames.long.txt
head -n 1 circuits.non_zero.txt | tr "\t" "\n" | cut -f 1 -d "_" > expNames.short.txt
( echo -e "nameLong\tnameShort" ; paste expNames.long.txt expNames.short.txt ) > expNames.txt

rm -vf circuits.non_zero.raw.txt expNames.long.txt expNames.short.txt  ids.txt nums.txt