Tumor Mutational Burden is the 'number of variants per megabase' but, how can I compute this? Are there tools, software or R packages that can obtain this information from the vcf files? I have no idea about this!
You can code this - there does not have to be a package. There was also a recent previous thread about this, if you can please do a quick search?
Essentially, there is no single way that people are calculating TMB. Some people only look at somatic missense mutations, while others look at missense + nonsense.
From my own perspective, even intergenic and intronic somatic mutations should be included as these are reflective of unstable genome maintenance processes. However, one can quite easily just look at missense and nonsense and then correlate these to, e.g., TILs, neoantigens, etc (as these will be more likely to be antigenic).