EddyRivasLab / hmmer

HMMER: biological sequence analysis using profile HMMs
http://hmmer.org
Other
317 stars 70 forks source link

read a Dirichlet prior to replace default mixture Dirichlet in Hmmer-3.2.1 #243

Closed qianfeng2 closed 3 years ago

qianfeng2 commented 3 years ago

Dear whom it may concern,

I hope you are well:)

I notice that default mixture Dirichlet prior parameters for protein models are built in when I am using hmmbuild command of Hmmer-3.2.1. Is it possible to change this built in prior when implementing hmmer3, since I am doing research about the impact of hidden states' transition priors? If so, how to do it?

Specifically, I only want to change the numbers among transition parameters, for instance, change the M-D alpha from 0.0135 to 0.0278, change M-I alpha from 0.0278 to 0.0135.

Admittedly, I know hmmer-2.3.2 can achieve this by reading a prior to replace the default Dirichlet prior. We believe continue to using hmmer3 is our best choice.

Any comment is much appreciated!

Best regards, Qian

cryptogenomicon commented 3 years ago

You're correct, HMMER3 hmmbuild doesn't have an option for reading in a customized prior.

To change the prior, you can edit the built-in prior in src/p7_prior.c, for example editing the function p7_prior_CreateAmino() to change the protein model prior.

qianfeng2 commented 3 years ago

Great! It works now!

Thank you very much @cryptogenomicon