A girl who developed the nervous habit of biting her nails had to have her thumb removed after she developed a rare form of skin cancer.