Entering edit mode
6.8 years ago
emma.a
▴
130
Server Linux, Bash 4.2.25
Hi,
I'm using this code to handle annotated-vcf files in trios:
join -t "`echo -e "\t"`" -e ND -a1 FILE1 FILE2 > OUTPUT
example:
FILE1 (space = tab)
chr1_11086439_11086439_C_T aaa,asf
chr1_11086717_11086717_A_G dad,ada
chr1_11087524_11087524_G_A asd,thh
FILE2 (space = tab)
chr1_11086439_11086439_C_T 1:1:1
chr1_11087524_11087524_G_A 2:2:2
OUTPUT (space = tab)
chr1_11086439_11086439_C_T aaa,asf 1:1:1
chr1_11086717_11086717_A_G dad,ada ND
chr1_11087524_11087524_G_A asd,thh 2:2:2
Considering that I have some times "sorting" problems, however my input files are already sorted !!! ...
I'm looking for an another code to do the same job! ... any suggestion?
All the best
what is
? how did you sort those files ?
you flagged this post with 'vcf', how about merging the VCF using a standard tool like "gatk combinevariants" ?
I sorted my files according to the first column (chr_start_end_ref_alt)... and some times the script works well and other time no... :-/
Ok, I will try with gatk and I will let you know, thank!
how did you sort those files ? show me the cmd line please.
just using the sort command
sort sample1 > FILE1
or use Ctrl-V + tab to insert a tab