File: vcfReduceGenotypes.pl

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

while( $l = <STDIN> ) { 
	if( $l =~ /^#/ ) { print $l; }
	else {
		chomp $l;
		@t = split /\t/, $l;

		$t[8] = "GT";

		for( $i=9 ; $i <= $#t ; $i++ ) {
			if( $t[$i] =~ /^(.*?):/ )	{ $t[$i] = $1; }
		}

		print join("\t", @t) . "\n";
	}
}