caravagnalab / rRACES

R wrapper for the RACES package
GNU General Public License v3.0
2 stars 1 forks source link

Problem with `m_engine$place_mutations` #119

Closed nicola-calonaci closed 2 months ago

nicola-calonaci commented 4 months ago

I am encountering a problem when using the m_engine$place_mutations function. In the following example, I am not providing the preneoplatic_SNV_signature_name agument, because it is optional (https://caravagnalab.github.io/rRACES/reference/MutationEngine-cash-place_mutations.html).

I get the following error:

> phylo_forest <- m_engine$place_mutations(
+   samples_forest = forest, 
+   num_of_preneoplatic_SNVs = 1000, 
+   # preneoplatic_SNV_signature_name = 'SBS5', 
+   num_of_preneoplatic_indels = 500)
 [█---------------------------------------] 0% [00m:00s] Placing mutations
Error: The default exposure for SBSs has not been set yet.

On the other hand, if I provide the argument as shown in the commented out line, my R session is systematically aborted.

The input is a SamplesForest

> forest
SamplesForest
  # of trees: 1
  # of nodes: 1220
  # of leaves: 200
  samples: {"T1_1"}

Any help is appreciated!

albertocasagrande commented 2 months ago

@nicola-calonaci, sorry for the late reply. The default exposure is the exposure for the first tumour cell up to the first exposure change and must be set by using the method MutationEngine$add_exposure(). See here for an example.