rfishbase icon indicating copy to clipboard operation
rfishbase copied to clipboard

estimating trophic levels

Open melissaszy opened this issue 3 years ago • 8 comments

Hello,

I have a list of fish that I want to find out the trophic levels for. In this list, there are both fish that are species unclassified (only classified to genus) and fish that are classified to species level.

For fish that are classified to species level, I will be using the estimate function to get the trophic level. In my previous post, I was informed that estimate() will first attempt to give me the DietTroph value if it is available. If the DietTroph value is not available, it will provide the FoodTroph value, and if that is not available, estimate() will give me a value estimated from species that have similar feeding habits. I cannot find the place in the fishbase manual or in https://rdrr.io/cran/rfishbase/man/estimate.html that indicates that. Can I confirm that this is how estimate() works? Could you kindly point me to where I can refer to?

For fish classified to only the genus level, is it fair for me to estimate the trophic level by averaging the trophic levels of the other members of the genera? An example is as such: https://www.r-bloggers.com/2017/03/mean-trophic-levels-of-a-genera-from-fishbase/ What are you thoughts?

Thank you for your time! 🐟

melissaszy avatar Mar 16 '21 10:03 melissaszy

I had a similar problem a while back. The folks at fishbase said "trophs stored in this (estimate) table are a mix of diettroph, foodtroph (diet over foodtroph if both are available) and estimates for species which do not have troph. Estimates are based on size and troph of closest relative". However there is no indication which was used in this table, just a value.

The order of preference: DietTroph, FoodTroph, then as a last resort an estimate, EstTroph.

I think the approach you take really depends on what you are doing. For classifications at the genus, family and order i filtered out similar species that were present in the same geographic area using the country table rather than relying on the estimate table, since the methods aren't clear.

andybeet avatar Mar 16 '21 14:03 andybeet

Thanks @andybeet !

Yup, you should be able to get DietTroph and FoodTroph when available, e.g. see https://github.com/ropensci/rfishbase/issues/167#issuecomment-507853043

As for which is better, there's no easy answer I think, but you might want to check how many samples have gone into a diet study before relying on it. Rainer Froese from the FishBase team gave this advice:

As for content, FoodTroph gives a MonteCarlo estimate of trophic level based on known food items. DietTroph uses the mean or median of trophic levels derived from actual diet composition studies. While in theory troph from diet should be more reliable, many diet studies are incomplete or biased and I often find FoodTroph more reasonable. Remember that FishBase only reflects what it has captured from the published record, and there is a lot of garbage out there If you do a serious study about a single species, use the FB refs as a start, search for additional refs and do your own careful analysis only using "good" studies. Don't forget to send copies of new refs to FishBase, as well as indications of "bad" refs that FishBase should mark as such.

cboettig avatar Mar 17 '21 02:03 cboettig

Thank you @andybeet and @cboettig for your replies!

@andybeet ,

The order of preference: DietTroph, FoodTroph, then as a last resort an estimate, EstTroph.

Thank you for helping me clarify!

For classifications at the genus, family and order i filtered out similar species that were present in the same geographic area using the country table rather than relying on the estimate table, since the methods aren't clear.

When you say "filtered out", do you mean that you only take into account similar species that are present in the same 'country' or do you mean you remove the species that are in the same 'country' (ie only take into account similar species from a different 'country')? I suspect it is the former and am looking to confirm my interpretation. Also, may I take a look at your code for this subsetting and calculating of a "better" EstTroph?

@cboettig, based on the advice that you quoted, I am currently leaning towards: FoodTroph > DietTroph > @andybeet's method of calculating EstTroph for more context, I am studying fish microbiome and would like to include trophic level to see if there is a relationship. I will go figure out a code to create a new column in my dataset that fills up the cells in the order I just mentioned. I am wondering why rfishbase does not already have a function for choosing FoodTroph > DietTroph (ie the reverse order of the estimate function) since that is what Rainer Froese deems more reasonable?

Thanks again!

melissaszy avatar Mar 17 '21 03:03 melissaszy

I don't mean to speak for Rainer, but I believe his advice was more nuanced and sometimes one value would be better and sometimes another would. I don't think this is a choice that rfishbase can make for you. You might be better off using rfishbase data to evaluate if your analysis is robust to the choice rather choosing one value over the other. Also note that FishBase usually gives you standard error estimates on both values, so you may want to include that information in your robustness analysis as well, or perhaps it could at least be a guide to which estimate may be more reliable?

HTH

cboettig avatar Mar 17 '21 04:03 cboettig

@cboettig Thank you for helping me understand!

melissaszy avatar Mar 17 '21 06:03 melissaszy

I just noticed that for Stolephorus indicus (SpecCode 569), estimate() for field=Troph does not give ecology() values of DietTroph nor FoodTroph even when both are available:

ecology("Stolephorus indicus", fields=c("DietTroph","FoodTroph")) A tibble: 1 x 2 DietTroph FoodTroph 1 3.59 3.84

estimate("Stolephorus indicus", fields="Troph") A tibble: 1 x 1 Troph 1 3.33

Could @cboettig or @andybeet help me with this?

in addition, @andybeet mentioned EstTroph. Are you refering to the Troph value when using estimate() eg estimate("Stolephorus indicus", fields="Troph")? I cannot find EstTroph otherwise. The closest I got to finding EstTroph is here: https://rdrr.io/github/NOAA-EDAB/eofindices/man/select_troph.html it seems to me that this function is the same as the estimate(...fields="Troph") function based on your previous description: "The order of preference: DietTroph, FoodTroph, then as a last resort an estimate, EstTroph." Am i correct?

Sorry for the many questions. I am trying to figure how best to use rfishbase to interpret my data.

melissaszy avatar Mar 17 '21 09:03 melissaszy

@melissaszy Apologies for not being clear.

  1. When i say "filtered out", as you suspected, i meant that i use similar species in the same geographic area. (I am interested in USA and Canada)
  2. And yes, EstTroph was my labeling (apologies). It is the Troph field from rfishbase::estimate().

You should see this in the code (it's ugly) but here it is.

andybeet avatar Mar 17 '21 14:03 andybeet

@andybeet Thank you for sharing your code.

I am trying to calculate the mean trophic level for samples that are identified only to genus level. I wrote some code to calculate them one by one. For Gerres genus, this is what I did: Gerres <- fishbase %>% filter(Genus == "Gerres") %>% mutate(gensp = paste(Genus, Species)) Gerrestroph<-estimate(Gerres$gensp,fields=c("SpecCode","Species","Troph")) mnGerrestroph=mean(Gerrestroph$Troph) From there, i got the mean Gerres genus trophic level.

Let's say I have 4 samples identified to only the genus level: "Gerres", "Sillago", "Monacanthus", "Sardinella". I call the dataframe containing the four genus names "uniGenus".

str(uniGenus) -> chr [1:4]

How do I write a function such that

  1. I can loop the code I wrote for Gerres to the other 3 genus? (i tried following online loop function tutorials and tutorials on creating a new function, and tried to refer to the code you shared but I did not manage to figure it out)
  2. input the new data obtained from the loop function into uniGenus as a new column named "meanTroph" (ie to make as.data.frame(uniGenus) and input the mean trophic level in column 2 which I plan to name "meanTroph")

Thank you once again.

melissaszy avatar Mar 18 '21 09:03 melissaszy