Normally, a virus is not contained in a TXT file. But, it is possible to have a virtually visibly TXT extension with a hidden executable extension and the code. In such cases it is possible to have a virus hidden in such file.