cdanielmachado / smetana

SMETANA: a tool to analyse interactions in microbial communities
Other
56 stars 11 forks source link

Failing calculations for global.tsv #2

Closed rdmtinez closed 5 years ago

rdmtinez commented 5 years ago

Greetings Daniel,

Its been a while since I tinkered with SMETANA, but once again I am having a similar issues as the last issue I inquired about ("Empty detailed.tsv") and was hoping you'd help me out.

To reiterate: I have made several hundred models using CarveMe as follow: A. carve --dna assembly.fna --fbc2 -o output_dir #default output, no gapfill, no predefined media B. carve --dna assembly.fna --init M9 --fbc2 -o output_dir #no gapfill, predefined media C. carve --dna assembly.fna -g M9 -i M9 --fbc2 -o output_dir #gapfilled on predefined media

For types B & C I have used three different media compositions (M9, artificial root exudates(ARE) and M9+ARE)

The models of type A all grow because they have unlimited media.

ALL of the models of the type B do not grow as per cobrapy's FBA; perhaps we have bad assemblies? The output scores for these look like Example 2, below.

The C models grow as they have been extensively gapped-filled. So I am using these with SMETANA currently. (When I contacted you back in October, I was using the (A) type models and your answer above still holds true for those), but now I'm not sure what's going with the models C....

You explained that "Only when at least one species depends on the others to survive, the smetana score will be larger than zero, and the cross-feeding interactions that mediate the dependency will be listed in the "detailed.tsv" file."---I am getting such results in some detailed.tsv, because as you say, there is likely some dependecy (see Example 1 below).

But I am still not getting any of the other scores MIP, etc. in global.tsv:

Example1: This one follows what you said, if there is growth dependency, then detailed.tsv is populated... why then are the MIP, NIP, and MRO values failing to compute? This is the case for every community that shows dependency (i.e. has a populated detailed.tsv file)--only the global smetana score is populated.

LjNodule213_LjRoot139_global.tsv 
community | medium | size | mip | nip | mro | smetana
-- | -- | -- | -- | -- | -- | --
all | M9ARE | 2 | Failed | Failed | Failed | 3.0

LjNodule213_LjRoot139_detailed.tsv
community | medium | receiver | donor | compound | scs | mus | mps | smetana
-- | -- | -- | -- | -- | -- | -- | -- | --
all | M9ARE | LjNodule213 | LjRoot139 | M_dtmp_e | 1.0 | 0.09 | 1 | 0.09
all | M9ARE | LjNodule213 | LjRoot139 | M_fol_e | 1.0 | 0.06 | 1 | 0.06
all | M9ARE | LjNodule213 | LjRoot139 | M_fum_e | 1.0 | 0.01 | 1 | 0.01
all | M9ARE | LjNodule213 | LjRoot139 | M_gmp_e | 1.0 | 0.39 | 1 | 0.39
all | M9ARE | LjNodule213 | LjRoot139 | M_h2s_e | 1.0 | 0.04 | 1 | 0.04
.....

============================================================
Example 2: In the next two examples,  I'm assuming that there is no growth dependecy, and so detailed.tsv is not populated, nor can the global.tsv scores be computed...

LjNodule213_LjRoot100_global.tsv
  | community | medium | size | mip | nip | mro | smetana
-- | -- | -- | -- | -- | -- | -- | --
all | M9ARE | 2 | Failed | Failed | Failed | Failed

 LjNodule213_LjRoot100_detailed.tsv
community | medium | receiver | donor | compound | scs | mus | mps | smetana
-- | -- | -- | -- | -- | -- | -- | -- | --

===========================================================
Example 3: However, in this one, the is a global.tsv 'smetana' score, but in Example 2, it fails to compute. This very small difference makes me believe there is a bug somewhere, and it maybe that is also causing the other scores to fail as well.

LjNodule214_LjRoot33_global.tsv 
  | community | medium | size | mip | nip | mro | smetana
-- | -- | -- | -- | -- | -- | -- | --
all | M9ARE | 2 | Failed | Failed | Failed |  

LjNodule214_LjRoot33_detailed.tsv
| community | medium | receiver | donor | compound | scs | mus | mps | smetana
-- | -- | -- | -- | -- | -- | -- | -- | -- | --
cdanielmachado commented 5 years ago

Hi @rdmtinez,

Sorry that I did not reply earlier.

MIP and MRO are calculated by simulating the species with interactions and without interactions to compare the potential for cooperation and competition. This means that they must be able to grow individually.

SMETANA is based on species dependencies, so it is only calculated when a species cannot live without another.

In summary, this means that for a given community in a given environment, either MIP/MRO or SMETANA will fail. It is not possible to calculate both.

I am starting to realize that this might be confusing, and in the next release will change the interface so that either one or the other can be calculated, but not both.

rdmtinez commented 5 years ago

Thanks Daniel