Don't buy the trance just because of the yamaha motor - bosch is just as reliable and I'm in a bad mood with giant electrics today ( hopefully just another water in connector issue, but possibly my 4 th dead evo screen in 3 years)
I'd base a decision between those two on the vibe at the lbs , or their reputation if you know it. Both are perfectly good bikes. A year ago I'd have said giant, but the trek geometry is improving and they really do build a more robust bike than giant. The 3 local guys who bought trek when I bought my giant 3 years ago have had relatively trouble free run .
You talk about value - all these manufacturers build to a similar price point. If giant is offering better spec at the same price point, then there will be cost cutting elsewhere - often in difficult to see places like suspension bushes / bearings , or dealer support. Or poor electrical connectors......
Please take this with a grain of salt, I'm taking my bike to the lbs today for her 3 rd birthday service - replacing all the suspension and wheel bearings again, servicing suspension, and checking wtf is going on with this gremlin. So it'll be there for a couple of weeks and there is an orbea / specialized dealer nearby....I still love my giant , but am starting to be distracted by lust for other bikes