FunGeST / Palimpsest

An R package for studying mutational signatures and structural variant signatures along clonal evolution in cancer.
69 stars 19 forks source link

Taking the origin of each signature #48

Closed MaryGoAround closed 4 years ago

MaryGoAround commented 4 years ago

Hello

I want to obtain the origin of each mutational signature but I get this error

> vcf <- signature_origins(input = vcf, Type = "SBS",
+                          input_signatures = SBS_liver_sigs,
+                          signature_contribution = SBS_signatures_exp1)
[1] Calculating the probability of each mutation being due to each signature..
  |===============================================================================| 100%
[1] Assigning the origin of each mutation..
Error in h(simpleError(msg, call)) : 
  error in evaluating the argument 'x' in selecting a method for function 'substr': undefined columns selected
In addition: Warning message:
In `[<-.data.frame`(`*tmp*`, , Sig.max.col, value = list(NULL, NULL,  :
  provided 588943 variables to replace 1 variables

This is the head of data

head(SBS_signatures_exp$sig_nums)
                  SBS1 SBS2 SBS3 SBS5 SBS17a SBS17b SBS18 SBS28 SBS30 SBS35 SBS41 SBS44
LP2000107-DNA_A01  993 1413 2375  517   3005   5141  4303  2314   235   698   704   469
LP2000325-DNA_A01 2317  706 2302 1518   3146   6748  2359  2380   793   818  1345  1233
LP2000329-DNA_A01 3447 2474 1122 1432   3940   5361  2057  1211  1382   310   483   653
LP2000330-DNA_A01 1144  690 3144  878   1817   1476  2206  1366   723   759   763  1093
LP2000332-DNA_A01 3939  677 1512 1212   5266   9115  3423  2470  1254   705   550  1195
LP2000333-DNA_A01 1271  608  732  567   1288   3500  1504   622   950   733   589   475
> 
head(SBS_liver_sigs)
         CA_A.A   CA_A.C   CA_A.G   CA_A.T   CA_C.A   CA_C.C   CA_C.G   CA_C.T   CA_G.A
SBS1   8.86e-04 0.002280 1.77e-04 1.28e-03 0.000312 1.79e-03 9.32e-05 2.23e-16 1.58e-03
SBS2   5.80e-07 0.000148 5.23e-05 9.78e-05 0.000208 9.53e-05 2.23e-16 4.21e-04 8.62e-05
SBS3   2.08e-02 0.016500 1.75e-03 1.22e-02 0.022500 2.53e-02 2.51e-03 1.54e-02 7.13e-03
SBS5   1.20e-02 0.009440 1.85e-03 6.61e-03 0.007430 6.14e-03 3.46e-03 6.49e-03 1.02e-02
SBS17a 2.07e-03 0.000918 4.76e-05 6.18e-05 0.000295 1.16e-03 2.22e-16 1.37e-04 1.78e-03
SBS17b 6.08e-04 0.000129 5.82e-05 4.56e-04 0.000271 4.11e-05 2.23e-16 1.82e-04 9.98e-04

I am not finding the reason by google, can you help?