Hi, I have a list of 50 scaffold ids (file1.txt) and another merged file of 90 vcfs (1.4GB) (file2.vcf). I am looking to fetch the scaffolds from the file2.vcf based on the scaffolds id from the file1.txt. Please suggest a script, I am new in writing the python script. I tried the grep command "grep -A 1 -wFf file1.txt file2.vcf > output.vcf", however, I am uncertain that it is correct.
Example::: file 1: Scaffold_90832 Scaffold_192565 Scaffold_345678 file 2: a merged vcf file