Nature has used nanoengineering to build a brain from a blueprint using methods and materials just as accessible to us, and there'll be a point in the future where we'll understand the "wiring" of the brain well enough to replicate it in a way that's biologically compatible (or even biological, but those materials are too slow and inefficient to be appealing).
So there will be a point when damaged portions of your brain will be replacable by circuitry (and improvable, but that's a whole other discussion). It's irrelevant that this isn't possible at the moment... the fact that it's even just theoretically sound means that the implications need to be explored.
So, if you were a resident of the future, and you decided to swap out 1% of your brain for electronics... would you still be you? Would you still have a soul? Would you even notice a difference? The brain would easily create new pathways to fix any broken connections, but I imagine the process would be gradual enough and in small enough pieces that there would be no significant interruption.
Later on you decide to do it again. You swap out another 49% of your brain. The circuitry would be installed in ways that preserved the structure and connections of the neurons that were there before, and again the process would be gradual enough that the brain wouldn't notice anything had changed (if it could be done a neuron at a time, it might be seamless, since a neuron isn't firing unceasingly). So now half of your thinking is done by machinery. Are you still you? Do you still have a soul? Might you have "half" of a soul somehow?
You finally decide to go all the way. Using the same gradual and exacting procedures, you lose your last bits of gray matter. Your identity is now living inside hardware. So who are you now? What are you? And how about the soul... still there?
So this is the point where people might be bringing up cell memory or parts of the nervous system throughout the body where memories/identity might be distributed. And the fact that there's still a natural, fleshy, "God-given" part of you. Since you're tired of reading this at this point I'll jump to the part where the rest of the body needs to be (gradually) replaced and you're finally entirely synthetic. Have you now somehow "lost" your soul? You'd feel basically the same (if you went with technology that mirrored the original nervous system anyway)... shouldn't you at least notice a difference if your soul isn't there anymore? You're basically a human creation at this point. All of the natural-born parts of you are in the trash. You would be a mere copy if the identity hadn't gone through that gradual transitioning process into this new state.
So it turns out your identity isn't, umm... meat-dependent. You have these human feelings (again, if the technology works that way) and human memories. You know who you are. But now you've discovered that all of that only exists as a pattern. Who you
are is a self-sustaining bit of electrical organization.
People who don't believe in a soul are saying, "Well, yeah, you were a machine before anyway. Just a carbon-based one." And people who do believe in a soul probably haven't revoked this poor individual's soul so far (if you have, I'd like to hear the reasoning, and exactly what the cut-off point was), so now there's this machine walking around with a soul... how did that happen?. He obviously has an identity at least... does identity come from the soul, or is it more like something you have than something you are? This machine in question has a more intact pattern than someone like Terri Schiavo, and people were quite adamant that she still had a soul. Does all this mean that machines that didn't used to be people can have souls too? Can a soul be attached to just an electrical pattern?
Is the soul the electrical pattern? What if that pattern gets duplicated (an easy process in this context)... did the soul get copied? Can a pattern be altered enough to become a different soul? Can it get put back into a biological body? Someone else's biological body?
It just goes on and on... (kinda like me).
When you dig and dig and dig, you start to get the feeling that there are only two possibilities. Either nothing has a soul/spiritual existence... or everything does.
(I'm in the "have a soul" camp by the way... which is why these questions are so interesting.)