jlw-ecoevo / gRodon2

38 stars 3 forks source link

Hi, is there a way we can run gRodon on multiple genomes at once directly from R? I don't think that one is included in the documented example. #8

Closed jlw-ecoevo closed 6 months ago

jlw-ecoevo commented 1 year ago
          Hi, is there a way we can run gRodon on multiple genomes at once directly from R? I don't think that one is included in the documented example.

Thank you!

Originally posted by @oduwoleiyanu in https://github.com/jlw-ecoevo/gRodon2/issues/4#issuecomment-1668035742

jlw-ecoevo commented 1 year ago

Yes, though it depends on what you mean specifically. For running on a metagenome (a mixture of genomes) to get the average max rate of a community you should use metagenome mode v2 (see docs).

For just running it on many genomes iteratively you could use lapply or a for loop (or if you wish to run in parallel, mclapply)

oduwoleiyanu commented 1 year ago

Thank you! Please, In a case where I have many temperatures for this mode( predictGrowth(genes, highly_expressed, temperature = 33). For many genomes, within the for loop, can the mode work if the temperature is in a text file?

jlw-ecoevo commented 6 months ago

There's a bunch of ways to code this up. For example, you could load those temperatures into a list or vector and the genomes into a list and do something like:

for(i in 1:10){
  predictGrowth(genes[i], highly_expressed[i], temperature = temperature[i])
}