I've generated vcf file using samtools. now how do i compare my SNPs with dbSNP ?
Assuming you have dbSNP in VCF format you can use vcf-compare
can we use samtools or GATK for this?
Samtools and GATK can't be used to add dbSNP rsID information to vcf file. Either you use vcf-compare as suggested above or your own script to add rsids to the vcf file. You will have to download dbSNP data from NCBI.
Check these links:
Snp Rsid By Location?
You can add dbSNP annotations with GATK using VariantAnnotator with the --dbsnp flag:
You can annotate with dbSNP ids using SnpSift, and then with the effects of the variants using SnpEff.
If your goal is to find out whether your SNPs are known or novel, you can also think of using the Ensembl Variant Effect Predictor (VEP).