Kenny Shiels has resigned as Morton manager, just four days after his side's 10-2 drubbing away to Hamilton.