echo "rs12345" > ids.txt
echo -e "1\t916834" > pos.txt
java -jar dist/vcffilterjdk.jar --body -f biostar347173.code src/test/resources/test_vcf01.vcf
(...)
1 916834 . G A 589 PASS AA=A;AC=5;AF=0.625;AN=8;ANN=A|upstream_gene_variant|MODIFIER|C1orf170|ENSG00000187642|transcript|ENST00000479361|retained_intron||n.-4813C>T|||||4813|,A|intron_variant|MODIFIER|C1orf170|ENSG00000187642|transcript|ENST00000433179|protein_coding|1/4|c.54-281C>T||||||,A|intron_variant|MODIFIER|C1orf170|ENSG00000187642|transcript|ENST00000341290|protein_coding|1/4|c.-7-281C>T|||||| GT:AD:DP:DPF:GQ:GQX ./.:.:.:.:.:. ./.:.:.:.:.:. 0/1:18,17:35:1:99:42 0/1:19,14:33:0:99:35 1/1:0,41:41:1:99:36 0/1:22,18:40:4:99:40
1 935222 rs12345 C A 380 PASS AA=C;AC=7;AF=0.7;AN=10;ANN=A|missense_variant|MODERATE|HES4|ENSG00000188290|transcript|ENST00000428771|protein_coding|1/3|c.132G>T|p.Arg44Ser|331/1040|132/744|44/247||,A|upstream_gene_variant|MODIFIER|RP11-54O7.17|ENSG00000272512|transcript|ENST00000606034|lincRNA||n.-1791G>T|||||1791|,A|intron_variant|MODIFIER|HES4|ENSG00000188290|transcript|ENST00000304952|protein_coding|1/3|c.108+24G>T||||||,A|intron_variant|MODIFIER|HES4|ENSG00000188290|transcript|ENST00000484667|protein_coding|1/2|c.108+24G>T||||||,A|non_coding_transcript_exon_variant|MODIFIER|HES4|ENSG00000188290|transcript|ENST00000481869|retained_intron|1/2|n.255G>T||||||;CSQR=1|ENSR00000528874|regulatory_region_variant GT:AD:DP:DPF:GQ:GQX ./.:.:.:.:.:. 1/1:0,22:22:8:63:26 0/1:15,14:29:0:99:36 0/1:16,16:32:5:99:35 1/1:0,25:25:7:72:26 0/1:21,15:36:2:99:35
I'm having a problem obtaining a recoded vcf which contains variants with their IDs in a "snp file" OR their positions in a "position file." The following gives only variants with their IDs in the "snp file" AND their positions in the "position file."
vcftools --vcf <input vcf file> --snps <variant IDs file> --positions <variant positions file> --recode --out <output vcf file>
Is there any way that I can obtain that which I desire without having to do each separately, concatenating, and then getting rid of duplicates?
Thanks in advance.
Please use the format bar to indicate code. I did it for you this time.