05 October 2011

Verticalize: printing the input stream vertically.

A useful tool: verticalize is a small C++ tool printing the input stream vertically. The source is available on github : https://github.com/lindenb/ccsandbox/blob/master/src/verticalize.cpp.
An Example with 1000genomes.org :
$ curl -s "ftp://ftp.1000genomes.ebi.ac.uk/vol1/ftp/release/20100804/ALL.2of4intersection.20100804.sites.vcf.gz"|\
gunzip  -c | grep -v "##" |\
verticalize  | head -n 30

>>>	2
$1	#CHROM	1
$2	POS   	10327
$3	ID    	rs112750067
$4	REF   	T
$5	ALT   	C
$6	QUAL  	.
$7	FILTER	PASS
$8	INFO  	DP=65;AF=0.208;CB=BC,NCBI
<<<	2

>>>	3
$1	#CHROM	1
$2	POS   	10469
$3	ID    	rs117577454
$4	REF   	C
$5	ALT   	G
$6	QUAL  	.
$7	FILTER	PASS
$8	INFO  	DP=2055;AF=0.020;CB=UM,BC,NCBI
<<<	3

(...)
That's it, Pierre

No comments:

Post a Comment