Spin–orbit coupling and anomalous Josephson effect in nanowires