A computer-implemented method of detecting rearrangement signatures in a previously obtained DNA sample, the method including the steps of: cataloguing the somatic mutations in said sample to produce a rearrangement catalogue for the sample which classifies identified rearrangement mutations in the sample into a plurality of categories; and determining the contributions of known rearrangement signatures to said rearrangement catalogue by computing the cosine similarity ( C i) between the rearrangement mutations in said catalogue and the rearrangement mutational signatures, wherein the cosine similarity ( C i) between said rearrangement catalogue M and a rearrangement mutational signature S i is calculated as: C → i = S → i ⋅ M → S → i M →, wherein S i and M are equally-sized vectors with nonnegative components being, respectively, the known rearrangement signature and the rearrangement catalogue; wherein the classification of the rearrangement mutations includes identifying mutations as one of: tandem duplications, deletions, inversions or translocations and grouping mutations identified as tandem duplications, deletions or inversions by size, and wherein the classification of the rearrangement mutations includes identifying mutations as being clustered or non-clustered, wherein mutations in the rearrangement catalogue are associated with two breakpoint genomic coordinates and mutations are identified as being clustered if the average density of rearrangement breakpoints within a segment is at least a predetermined factor greater than the whole genome average density of rearrangements for said sample. cataloguing the somatic mutations in said sample to produce a rearrangement catalogue for the sample which classifies identified rearrangement mutations in the sample into a plurality of categories; and determining the contributions of known rearrangement signatures to said rearrangement catalogue by computing the cosine similarity ( C i) between the rearrangement mutations in said catalogue and the rearrangement mutational signatures, wherein the cosine similarity ( C i) between said rearrangement catalogue M and a rearrangement mutational signature S i is calculated as: C → i = S → i ⋅ M → S → i M →, wherein S i and M are equally-sized vectors with nonnegative components being, respectively, the known rearrangement signature and the rearrangement catalogue; wherein the classification of the rearrangement mutations includes identifying mutations as one of: tandem duplications, deletions, inversions or translocations and grouping mutations identified as tandem duplications, deletions or inversions by size, and wherein the classification of the rearrangement mutations includes identifying mutations as being clustered or non-clustered, wherein mutations in the rearrangement catalogue are associated with two breakpoint genomic coordinates and mutations are identified as being clustered if the average density of rearrangement breakpoints within a segment is at least a predetermined factor greater than the whole genome average density of rearrangements for said sample. C → i = S → i ⋅ M → S → i M →, wherein S i and M are equally-sized vectors with nonnegative components being, respectively, the known rearrangement signature and the rearrangement catalogue; wherein the classification of the rearrangement mutations includes identifying mutations as one of: tandem duplications, deletions, inversions or translocations and grouping mutations identified as tandem duplications, deletions or inversions by size, and wherein the classification of the rearrangement mutations includes identifying mutations as being clustered or non-clustered, wherein mutations in the rearrangement catalogue are associated with two breakpoint genomic coordinates and mutations are identified as being clustered if the average density of rearrangement breakpoints within a segment is at least a predetermined factor greater than the whole genome average density of rearrangements for said sample.