SAN FRANCISCO — For inventor Thomas Bascom, the handwriting was on the wall. In big, screaming letters.

Between a difficult reexamination before the U.S. Patent and Trademark Office and a Supreme Court decision that raised the bar on software patents, Bascom’s suit against LinkedIn Inc. and Facebook Inc. had little chance of surviving a challenge under Section 101 of the Patent Act. U.S. District Judge Susan Illston ruled Monday that Bascom’s computerized method for organizing relationships among documents is invalid because it’s drawn to ineligible subject matter.