I have two files (csv and vcf) which look exactly like this
S1.csv
func,gene,start,info
"exonic","AL","2309","het"
"exonic","NEF","6912","hom"
S1.vcf
##fileinfo
#CHROM POS ID INFO
chr1 4567 rs323211 1/1:84,104,99
chr4 2309 rs346742 1/1:27,213,90
chr6 5834 rs234492 0/1:22,765,22
chr8 6912 rs239299 1/1:56,765,13
I want to add the fourth line in the second file to the end of the line in the first file if the number in column 2 (file2) matches the number in column 3 (file1)
Also the first file is seperate using , and " (except for first line) while the second is tab seperated
The final file should look like:
func,gene,start,info
"exonic","AL","2309","het","1/1:27,213,90"
"exonic","NEF","6912","hom","1/1:56,765,13"
I have to do this for 200 files, each pair has the same name with either .csv or .vcf