The first issue is that when I try to format Data I get: Unable to wipe '/data' -- unknown file system 'auto' Unable to format to remove encryption. I found a suggestion to format the /data partition manually from adb shell which works.
The Lineage from wasn't the only Install I the error 7 with though as ResurrectionRemix-M-v5.7.4-20161220-kiwi also gave the same error 7.
Now the touch screen isn't working again in TWRP because I accidentally installed the wrong version of Lineage. with the assert lines removed. It would be nice to know how I can do a restore from the command line, but the TWRP command line guide isn't much help. It is just too much of a PITA that once I can get stock back on it I will just sell it while I'm ahead.