EU-kalat: Difference between revisions

From Opasnet
Jump to navigation Jump to search
(→‎Calculations: preprocess works)
Line 62: Line 62:
* Model run 25.1.2017 [http://en.opasnet.org/en-opwiki/index.php?title=Special:RTools&id=wzisMQHAqcF30zcl]
* Model run 25.1.2017 [http://en.opasnet.org/en-opwiki/index.php?title=Special:RTools&id=wzisMQHAqcF30zcl]
* Model run 22.5.2017 with new ovariables euRaw, euAll, euMain, and euRatio [http://en.opasnet.org/en-opwiki/index.php?title=Special:RTools&id=7uTqQeaekwRFwA2J]
* Model run 22.5.2017 with new ovariables euRaw, euAll, euMain, and euRatio [http://en.opasnet.org/en-opwiki/index.php?title=Special:RTools&id=7uTqQeaekwRFwA2J]
* Model run 23.5.2017 with adjusted ovariables euRaw, eu, euRatio [http://en.opasnet.org/en-opwiki/index.php?title=Special:RTools&id=qkseWM9rmRysGwKM]


<rcode name="preprocess" label="Preprocess (for developers only)">
<rcode name="preprocess" label="Preprocess (for developers only)">
Line 75: Line 76:
#[3] "Mono-ortho–substituted PCBs"  "Non-ortho–substituted PCBs"   
#[3] "Mono-ortho–substituted PCBs"  "Non-ortho–substituted PCBs"   


euAll <- Ovariable(
eu <- Ovariable(
   "euAll",
   "eu",
   dependencies = data.frame(
   dependencies = data.frame(
     Name=c("euRaw", "TEF"),
     Name=c("euRaw", "TEF"),
Line 82: Line 83:
   ),
   ),
   formula = function(...) {
   formula = function(...) {
     euAll <- euRaw[,c(1:4, 18, 19)] # THL code, Matrix, Congener, Fish species
     eu <- euRaw[,c(1:4, 18, 19)] # THL code, Matrix, Congener, Fish species
     colnames(euAll@output)[1:4] <- c("THLcode", "Matrix", "Compound", "Fish")
     colnames(eu@output)[1:4] <- c("THLcode", "Matrix", "Compound", "Fish")
      
      
     temp <- oapply(euAll * TEF, cols = "Compound", FUN = "sum")
     temp <- oapply(eu * TEF, cols = "Compound", FUN = "sum")
     colnames(temp@output)[colnames(temp@output)=="Group"] <- "Compound"
     colnames(temp@output)[colnames(temp@output)=="Group"] <- "Compound"
     eu2 <- combine(euAll, temp)
     eu2 <- combine(eu, temp)
      
      
     return(eu2)
     return(eu2)
  }
)
# Leave only the main fish species and congeners and remove others
euMain <- Ovariable(
  "euMain",
  dependencies = data.frame(
    Name = c("euAll", "conl", "fisl")
  ),
  formula = function(...) {
    euMain <- euAll[euAll$Compound %in% conl & euAll$Fish %in% fisl , ]
    return(euMain)
   }
   }
)
)
Line 108: Line 96:
euRatio <- Ovariable(
euRatio <- Ovariable(
   "euRatio",
   "euRatio",
   dependencies = data.frame(Name="euMain"),
   dependencies = data.frame(Name=c("eu")),
   formula = function(...) {
   formula = function(...) {
     euRatio <- euMain[
     euRatio <- eu[
       euMain$Compound == "2378TCDD" & euMain$Matrix == "Muscle" & result(euMain) != 0 , ] # Zeros cannot be used in ratio estimates
       eu$Compound == "2378TCDD" & eu$Matrix == "Muscle" & result(eu) != 0 , ] # Zeros cannot be used in ratio estimates
     euRatio$Compound <- NULL
     euRatio$Compound <- NULL
     euRatio <- log10(euMain / euRatio)@output
     euRatio <- log10(eu / euRatio)@output
     euRatio <- euRatio[euRatio$Compound %in% setdiff(conl, "2378TCDD") , ]
     euRatio <- euRatio[!euRatio$Compound %in% c("2378TCDD", "2378-TCDD", "TCDD") , ]
     return(euRatio)
     return(euRatio)
   }
   }
Line 130: Line 118:
# Conclusion: this is ok. Total 2292 rows.
# Conclusion: this is ok. Total 2292 rows.


objects.store(euRaw, euAll, euMain, euRatio)
################## Data for the main congeners and species only
cat("Ovariables euRaw, euAll, euMain, and euRatio stored.\n")
 
#> unique(eu$Congener)
#[1] 2378TCDD    12378PeCDD  123478HCDD  123678HCDD  123789HCDD  1234678HpCDD
#[7] OCDD        2378TCDF    12378PeCDF  23478PeCDF  123478HCDF  123678HCDF 
#[13] 123789HCDF  234678HCDF  1234678HpCDF 1234789HpCDF OCDF        CoPCB77 ...   
 
# Remove the four PCDDFs with too little data (>70% BDL) and all non-PCDDF
# aggregate(eu@data$euResult, by = eu@data["POP"], FUN = function(x) mean(x == 0))
 
#[1] Baltic herring Sprat          Salmon        Sea trout      Vendace     
#[6] Roach          Perch          Pike          Pike-perch    Burbot       
#[11] Whitefish      Flounder      Bream          River lamprey  Cod         
#[16] Trout          Rainbow trout  Arctic char 
 
indices <- list(
  Compound.TEQ2 = c("TEQdx", "TEQpcb"),
  Compound.PCDDF14 = as.character(unique(euRaw@data$POP)[c(1:12, 14, 15)]), # 7 OCDD should be removed
  Fish.Fish14 = as.character(unique(euRaw@data$Fish_species)[c(1:4, 6:14, 17)])
)
 
# conl
#[1] "2378TCDD"    "12378PeCDD"  "123478HCDD"  "123678HCDD"  "123789HCDD" 
#[6] "1234678HpCDD" "OCDD"        "2378TCDF"    "12378PeCDF"  "23478PeCDF" 
#[11] "123478HCDF"  "123678HCDF"  "234678HCDF"  "1234678HpCDF"
#> fisl
#[1] "Baltic herring" "Sprat"          "Salmon"        "Sea trout"   
#[5] "Roach"          "Perch"          "Pike"          "Pike-perch"   
#[9] "Burbot"        "Whitefish"      "Flounder"      "Bream"       
#[13] "River lamprey"  "Rainbow trout"
 
objects.store(euRaw, eu, euRatio, indices)
cat("Ovariables euRaw, eu, and euRatio and list indices stored.\n")
</rcode>
</rcode>


Line 158: Line 177:
objects.latest("Op_en3104", code_name = "preprocess") # [[EU-kalat]]
objects.latest("Op_en3104", code_name = "preprocess") # [[EU-kalat]]


################## Data for the main congeners and species only
conl <- indices$Compound.TEQ2
 
fisl <- indices$Fish.Fish14
#> unique(euAll$Congener)
#[1] 2378TCDD    12378PeCDD  123478HCDD  123678HCDD  123789HCDD  1234678HpCDD
#[7] OCDD        2378TCDF    12378PeCDF  23478PeCDF  123478HCDF  123678HCDF 
#[13] 123789HCDF  234678HCDF  1234678HpCDF 1234789HpCDF OCDF        CoPCB77 ...   
 
# Remove the four with too little data (>70% BDL) and all non-PCDDF
# aggregate(eu@data$euResult, by = eu@data["POP"], FUN = function(x) mean(x == 0))
 
#[1] Baltic herring Sprat          Salmon        Sea trout      Vendace     
#[6] Roach          Perch          Pike          Pike-perch    Burbot       
#[11] Whitefish      Flounder      Bream          River lamprey  Cod         
#[16] Trout          Rainbow trout  Arctic char 
 
if(TRUE) {
  conl <- c("TEQdx", "TEQpcb")
} else {
  conl <- as.character(unique(euRaw@data$POP)[c(1:12, 14, 15)]) # 7 OCDD should be removed
}
 
fisl <- as.character(unique(euRaw@data$Fish_species)[c(1:4, 6:14, 17)])
 
# conl
#[1] "2378TCDD"    "12378PeCDD"  "123478HCDD"  "123678HCDD"  "123789HCDD" 
#[6] "1234678HpCDD" "OCDD"        "2378TCDF"    "12378PeCDF"  "23478PeCDF" 
#[11] "123478HCDF"  "123678HCDF"  "234678HCDF"  "1234678HpCDF"
#> fisl
#[1] "Baltic herring" "Sprat"          "Salmon"        "Sea trout"   
#[5] "Roach"          "Perch"          "Pike"          "Pike-perch"   
#[9] "Burbot"        "Whitefish"      "Flounder"      "Bream"       
#[13] "River lamprey"  "Rainbow trout"
 
C <- length(conl)
C <- length(conl)
Fi <- length(fisl)
Fi <- length(fisl)
Line 197: Line 185:
fisl
fisl


euAll <- EvalOutput(euAll)
eu <- EvalOutput(eu)


replaces <- list(
replaces <- list(
Line 207: Line 195:


for(i in 1:length(replaces)) {
for(i in 1:length(replaces)) {
   levels(euAll$Compound)[replaces[[i]][1]] <- replaces[[i]][2]
   levels(eu$Compound)[replaces[[i]][1]] <- replaces[[i]][2]
}
}


euRatio <- EvalOutput(euRatio)
eu <- oapply(eu, INDEX = "THLcode", FUN = "sum")


# Hierarchical Bayes model.
# Hierarchical Bayes model.
Line 283: Line 271:
} # if(FALSE)
} # if(FALSE)


fishsamples <- unkeep(euAll, prevresults = TRUE, sources = TRUE)@output
fishsamples <- unkeep(eu, prevresults = TRUE, sources = TRUE)@output
fishsamples <- fishsamples[fishsamples$Compound %in% conl & fishsamples$Matrix == "Muscle" , ]
fishsamples <- fishsamples[fishsamples$Compound %in% conl & fishsamples$Matrix == "Muscle" , ]
fishsamples <- reshape(
fishsamples <- reshape(
   fishsamples,  
   fishsamples,  
   v.names = "euAllResult",  
   v.names = "euResult",  
   idvar = "THLcode",  
   idvar = "THLcode",  
   timevar = "Compound",  
   timevar = "Compound",  
Line 294: Line 282:
)
)


# colnames(euAll@output)
# colnames(eu@output)
# "THLcode"      "Matrix"      "Compound"    "Fish"        "euRawSource"  
# "THLcode"      "Matrix"      "Compound"    "Fish"        "euRawSource"  
# [6] "TEFversion"  "TEFrawSource" "TEFSource"    "Source"      "euAllResult"  
# [6] "TEFversion"  "TEFrawSource" "TEFSource"    "Source"      "euResult"  
# [11] "euAllSource"
# [11] "euSource"


oprint(head(fishsamples))
oprint(head(fishsamples))
Line 382: Line 370:
euRatio <- EvalOutput(euRatio)
euRatio <- EvalOutput(euRatio)


ggplot(euAll@output, aes(x = euAllResult, colour = Fish))+geom_density()+
# Leave only the main fish species and congeners and remove others
eu[eu$Compound %in% conl & eu$Fish %in% fisl , ]
 
ggplot(eu@output, aes(x = euResult, colour = Fish))+geom_density()+
   facet_wrap(~ Compound) + scale_x_log10()
   facet_wrap(~ Compound) + scale_x_log10()


Line 413: Line 404:
plot(coda.j)
plot(coda.j)


#################
euAll <- euRaw[, c(1:4, 18, 19)]
colnames(euAll@output)[1:4] <- c("THLcode", "Matrix", "Compound",
                                "Fish")
if (exists("TEQgroups"))
  levels(TEF$Group) <- TEQgroups$Out
temp <- oapply(euAll * TEF, cols = "Compound", FUN = "sum")
colnames(temp@output)[colnames(temp@output) == "Group"] <- "Compound"
eu2 <- combine(euAll, temp)
return(eu2)
</rcode>
</rcode>



Revision as of 07:35, 23 May 2017


EU-kalat is a study, where concentrations of PCDD/Fs, PCBs, PBDEs and heavy metals have been measured from fish

Question

The scope of EU-kalat study was to measure concentrations of persistent organic pollutants (POPs) including dioxin (PCDD/F), PCB and BDE in fish from Baltic sea and Finnish inland lakes and rivers. [1] [2] [3].

Answer

The original sample results can be acquired from Opasnet base. The study showed that levels of PCDD/Fs and PCBs depends especially on the fish species. Highest levels were on salmon and large sized herring. Levels of PCDD/Fs exceeded maximum level of 4 pg TEQ/g fw multiple times. Levels of PCDD/Fs were correlated positively with age of the fish.

Mean congener concentrations as WHO2005-TEQ in Baltic herring can be printed out with the Run code below.

+ Show code

Rationale

Data

Data was collected between 2009-2010. The study contains years, tissue type, fish species, and fat content for each concentration measurement. Number of observations is 285.

There is a new study EU-kalat 3, which will produce results in 2016.

Calculations

+ Show code

Bayes model for dioxin concentrations

  • Model run 28.2.2017 [8]
  • Model run 28.2.2017 with corrected survey model [9]
  • Model run 28.2.2017 with Mu estimates [10]
  • Model run 1.3.2017 [11]
  • Model run 23.4.2017 [12] produces list conc.param and ovariable concentration
  • Model run 24.4.2017 [13]
  • Model run 19.5.2017 without ovariable concentration [14] ⇤--#: . The model does not mix well, so the results should not be used for final results. --Jouni (talk) 19:37, 19 May 2017 (UTC) (type: truth; paradigms: science: attack)
----#: . Maybe we should just estimate TEQs until the problem is fixed. --Jouni (talk) 19:37, 19 May 2017 (UTC) (type: truth; paradigms: science: comment)
  • Model run 22.5.2017 with TEQdx and TEQpcb as the only Compounds [15]

+ Show code

Initiate concentration

  • Model run 19.5.2017 [16]

+ Show code

See also

References

  1. A. Hallikainen, H. Kiviranta, P. Isosaari, T. Vartiainen, R. Parmanne, P.J. Vuorinen: Kotimaisen järvi- ja merikalan dioksiinien, furaanien, dioksiinien kaltaisten PCB-yhdisteiden ja polybromattujen difenyylieettereiden pitoisuudet. Elintarvikeviraston julkaisuja 1/2004. [1]
  2. E-R.Venäläinen, A. Hallikainen, R. Parmanne, P.J. Vuorinen: Kotimaisen järvi- ja merikalan raskasmetallipitoisuudet. Elintarvikeviraston julkaisuja 3/2004. [2]
  3. Anja Hallikainen, Riikka Airaksinen, Panu Rantakokko, Jani Koponen, Jaakko Mannio, Pekka J. Vuorinen, Timo Jääskeläinen, Hannu Kiviranta. Itämeren kalan ja muun kotimaisen kalan ympäristömyrkyt: PCDD/F-, PCB-, PBDE-, PFC- ja OT-yhdisteet. Eviran tutkimuksia 2/2011. ISSN 1797-2981 ISBN 978-952-225-083-4 [3]