aipl2uga.sh

Olivier Filangi, 16/05/2012 14:40

Télécharger (397 octets)

 
1
#!/bin/bash
2
# this script changes a SNP file (arg1 on entry) from AIPL to UGA format and generates the cross ID file
3
# new file will be $1_UGA
4
echo `wc -l $1 | awk '{print $1}'` "lines in" $1 
5

    
6
#
7
awk ' {nsnp=length($3);
8
	printf("%10s%1s%" nsnp "s\n",$1," ",$3)}' $1 >$1"_UGA"
9
echo `wc -l $1"_UGA" | awk '{print $1}'` "lines in" $1"_UGA" 
10
awk '{print $1,$1}' $1"_UGA" > $1"_UGA_XrefID"
11