sergeitarasov / PARAMO

PARAMO pipeline
3 stars 1 forks source link

STEP 4 = four-state character Rev file creation #1

Open coyotree opened 5 years ago

coyotree commented 5 years ago

Hi Sergei,

Really looking forward to trying PARAMO but I am working through the pipeline and am stuck in a few places. I have made it to STEP 4.

1) In STEP 4 at # write Rev file for dependent four-state character C3-2 setwd("~/Documents/Recon-Anc_Anat/Supplementary_materials")

Is this simply the same for loop used to create the two-state character Rev file? These is no code showing how to do this in the pipeline.

2) It is unclear where the output from the SMMs go into the Rev file (Character Evolution Model, I assume). Also, should these SMMs be created prior to and inserted into the PARAMO_template that is then used for making each Rev file for each character?

3) Lastly, I am not familiar with RevBayes and I am unsure how one manipulates the NUM_STATES and the SMMs to match their own data. For example, I have 5 traits, two of which are dependent on one another. Would I then adjust NUM_STATES to 5? If so, how would someone input that into the SMM creation? Sorry if that is a completely newb question.

Thanks for this program.

Cheers, Cody Coyotee

sergeitarasov commented 5 years ago

Hi Cody, Thanks for your comment and sorry for the delay with answering it.

  1. The loop is similar as for the two-state file but you need to modify the the Rev file for C3-2 manually or, if you have many such file, right an R script that creates them. PARAMO includes functions to automatically create rate matrices for RevBayes; however better examples of using them (inc. a tutorial) can be found in the Suppl. Mat. for my other paper (https://datadryad.org/resource/doi:10.5061/dryad.j5r716b). These complications appear because in Rev. file you need to fully specify a rate matrix for each character, and depending on the number of states and parametrization (that is different for anatomically dependent vs. independent chars.), the matrices vary across characters. There is no easy way to specify rate matrices for PARAMO pipeline using one or two RevBayes commands but, as I said, batch scripts can be done for a particular case to process automatically.
  2. Yes, you can use the output from SMMs (copy it to Rev) to specify your matrix.
  3. NUM_STATES is the number of states per character. If you character has 5 states you may try to change it to five. If it does not work, you can send me you files and I will be more than happy to show you how to do it.