Entering edit mode
10.9 years ago
win
▴
990
Hi all, I have a set of rs#, about 1500 or so and what i want to do is query my annotated VCF files which already has the dbSNP ids and create another VCF file with only those variants if they are found to be there.
i tried to use grep but i think it can only do one search term at a time, so how would i find all my rs#, I could put all the rs# in a single text file.
any ideas?
Try grep -f file_with_set_of_rs# big_vcf_file > new_vcf.txt
Header will have to be added separately.
and try: grep -wFf
Cool. -F can be used to make it faster as no regex is involved.