Electron transport of nanotube-based gas sensors: An ab initio study