Hi Guys,
I have a question regarding the annotation of SNPs. I have list of candidate SNPs with chr ids (file 1) and the their positions and another file (file 2) I have a gft file with chr id, gene positions (start and stop) and genes names. I am looking to fetch the positions of SNPs (file 1) in between the positions of genes (file 2). I tried bedtools however I could not file the command. Please advise any options to deal with this analysis.
File 1:
chr1 271353586 T
chr1 897272822 C
chr1 913363908 T
File 2:
chr1 271353222 371353586 Gene1
chr1 897272522 897272822 Gene2
chr1 583821554 583821710 Gene3
Hi, The SNPs file generated from a vcf file and I have the positions only. Is there any way to annotate these SNPs with the gft file?
Thank you,
Manoj
Your question is not clear enough. Do you just want to annotate your snps in file1 with the information in file2, and does the gtf file refer to the file2 in your example? If that'd the case, file1 and file2 should be the first and the second arguments respectively in the
bedtools
command:The
-loj
option performs a “left outer join”: for each feature in A it reports each overlap with B, and a NULL feature for B if no overlaps are found. It's similar to the-wao
option but without the uneeded overlap base count.Thank you very much for your help! It works for me.