cdanielmachado / carveme

CarveMe: genome-scale metabolic model reconstruction
Other
147 stars 50 forks source link

Ensemble modelling with own media composition? #64

Closed bilehtin closed 4 years ago

bilehtin commented 4 years ago

Hi Daniel,

New to GitHub so my apologies if this doesn't belong to issues as I'm not really having an issue.

Thanks for this great resource. I could get it up and running with the issues tab and documentation. It's great that it supports ensemble modelling as well - however, would it be possible to somehow do ensemble modelling with my own defined medium? From the error I get it seems like it's not currently supported, but maybe there's a way to do it anyway?

What I did was as follows (it does the perfect job without the ensemble) $ carve --refseq GCF_000000000.0 --cobra -n 50 -g MEDIUMNAME --mediadb MEDIUMFILE.tsv -o models/20200206_MODELID.xml -u gramneg

usage: carve [-h] [--dna | --egg | --refseq | --genbank] [--diamond-args DIAMOND_ARGS] [-r] [-o OUTPUT] [-u UNIVERSE | --universe-file UNIVERSE_FILE] [--cobra | --fbc2] [-n ENSEMBLE] [-g GAPFILL] [-i INIT] [--mediadb MEDIADB] [-v] [-d] [--soft SOFT] [--hard HARD] [--reference REFERENCE] INPUT [INPUT ...] carve: error: Gap fill and ensemble generation cannot currently be combined (not implemented yet).

Thanks again in advance! Best, Birgitta

cdanielmachado commented 4 years ago

Hi @bilehtin

Like the message says, I did not yet have time to implement ensemble building combined with gap-filling.

But there is one thing you can try that might work.

$ carve --refseq GCF_000000000.0 --cobra -n 50 -o models/20200206_MODELID.xml -u gramneg

$ gapfill models/20200206_MODELID.xml -m MEDIUMNAME --mediadb MEDIUMFILE.tsv 

Could you please try and let me know if it worked?

bilehtin commented 4 years ago

Thanks a lot for the quick response! That worked out and it seems like a good workaround. As far as I can tell it's different as the ensemble is generated via the randomization of weights on reactions instead of ensuring growth on certain media, but might still be useful for the application. Many thanks for this solution and on providing this program!

cdanielmachado commented 4 years ago

I am happy that it worked :)

And yes, it is different from the approach from the Papin lab that generates the ensembles based on multiple media. We just add some noise during the carving step to generate the ensemble. The medium-specific gap-filling always occurs in a second step anyway, so it would not affect the ensemble.