Last updated: 2022-11-15

Checks: 6 1

Knit directory: dgrp-starve/

This reproducible R Markdown analysis was created with workflowr (version 1.7.0). The Checks tab describes the reproducibility checks that were applied when the results were created. The Past versions tab lists the development history.


The R Markdown file has unstaged changes. To know which version of the R Markdown file created these results, you’ll want to first commit it to the Git repo. If you’re still working on the analysis, you can ignore this warning. When you’re finished, you can run wflow_publish to commit the R Markdown file and build the HTML.

Great job! The global environment was empty. Objects defined in the global environment can affect the analysis in your R Markdown file in unknown ways. For reproduciblity it’s best to always run the code in an empty environment.

The command set.seed(20221101) was run prior to running the code in the R Markdown file. Setting a seed ensures that any results that rely on randomness, e.g. subsampling or permutations, are reproducible.

Great job! Recording the operating system, R version, and package versions is critical for reproducibility.

Nice! There were no cached chunks for this analysis, so you can be confident that you successfully produced the results during this run.

Great job! Using relative paths to the files within your workflowr project makes it easier to run your code on other machines.

Great! You are using Git for version control. Tracking code development and connecting the code version to the results is critical for reproducibility.

The results in this page were generated with repository version ca79c22. See the Past versions tab to see a history of the changes made to the R Markdown and HTML files.

Note that you need to be careful to ensure that all relevant files for the analysis have been committed to Git prior to generating the results (you can use wflow_publish or wflow_git_commit). workflowr only checks the R Markdown file, but you know if there are other scripts or data files that it depends on. Below is the status of the Git repository when the results were generated:


Ignored files:
    Ignored:    analysis/site_libs/

Untracked files:
    Untracked:  analysis/scripts.knit.md
    Untracked:  code/analysisSR.R
    Untracked:  code/geneGO.R
    Untracked:  code/multiPrep.R
    Untracked:  code/snpGene.77509.err
    Untracked:  code/snpGene.77509.out
    Untracked:  code/snpGene.77515.err
    Untracked:  code/snpGene.77515.out
    Untracked:  code/snpGene.sbatch
    Untracked:  data/eQTL_traits_females.csv
    Untracked:  data/eQTL_traits_males.csv
    Untracked:  data/goGroups.txt

Unstaged changes:
    Deleted:    analysis/database.Rmd
    Modified:   analysis/multiComp.Rmd
    Modified:   code/baseScript-lineComp.R
    Modified:   code/fourLinePrep.R

Note that any generated files, e.g. HTML, png, CSS, etc., are not included in this status report because it is ok for generated content to have uncommitted changes.


These are the previous versions of the repository in which changes were made to the R Markdown (analysis/multiComp.Rmd) and HTML (docs/multiComp.html) files. If you’ve configured a remote Git repository (see ?wflow_git_remote), click on the hyperlinks in the table below to view the files as they were in that past version.

File Version Author Date Message
Rmd ca79c22 nklimko 2022-11-15 wflow_publish("analysis/*")

# Read in tables
dtf <- fread("data/eQTL_traits_females.csv")
dtm <- fread("data/eQTL_traits_males.csv")

#Change column order to line, starvation, everything else
setcolorder(dtf, c(1,10,2:9,11:19))
#male has aggression moved to end to line up all other column indices
setcolorder(dtm, c(1,11,3:10,12:20,2))

# Bind tables on line
bound <- dtm[dtf, on=.(line)]

# create average starvation
x <- (bound[,2,with=FALSE] + bound[,21,with=FALSE]) / 2

par(mfrow=c(2,2))




  # AGGRESSION, male only
title <- paste("starvation resistance vs",colnames(bound[, 20, with=FALSE]))
x <- bound[,2] 
y <- bound[,20]
raw <- cbind(x,y)
clean <- setDT(raw)
plot(clean)



varList <- rep(1:20)
for(i in 1:length(varList)) {
  varList[i] <- paste0("g",varList[i])
}

storage <- rep(0,20)

# Determine average of each trait
for(i in 3:19)
{
  title <- paste("starvation resistance vs",colnames(bound[, i, with=FALSE]))
  j <- i + 19
  y <- (bound[,i,with=FALSE] + bound[,j,with=FALSE]) / 2
  raw <- cbind(x,y)
  clean <- setDT(raw)
  plot(clean)

  colnames(clean) <- c("starvation", "trait")
  
  tempPlot <- ggplot(clean, aes(x=clean$starvation, y=clean$trait)) +
    geom_point() + geom_smooth(method=lm)
  
  #tempPlot
  
  #storage[i-2] <- tempPlot 
  
  #plot(clean, main=title)

}

About


sessionInfo()
R version 4.0.3 (2020-10-10)
Platform: x86_64-pc-linux-gnu (64-bit)
Running under: CentOS Linux 7 (Core)

Matrix products: default
BLAS/LAPACK: /opt/ohpc/pub/Software/openblas_0.3.10/lib/libopenblas_haswellp-r0.3.10.dev.so

locale:
 [1] LC_CTYPE=en_US.UTF-8       LC_NUMERIC=C              
 [3] LC_TIME=en_US.UTF-8        LC_COLLATE=en_US.UTF-8    
 [5] LC_MONETARY=en_US.UTF-8    LC_MESSAGES=en_US.UTF-8   
 [7] LC_PAPER=en_US.UTF-8       LC_NAME=C                 
 [9] LC_ADDRESS=C               LC_TELEPHONE=C            
[11] LC_MEASUREMENT=en_US.UTF-8 LC_IDENTIFICATION=C       

attached base packages:
[1] stats     graphics  grDevices utils     datasets  methods   base     

other attached packages:
[1] ggplot2_3.3.5     data.table_1.14.2 dplyr_1.0.8      

loaded via a namespace (and not attached):
 [1] Rcpp_1.0.8.3     highr_0.9        pillar_1.7.0     compiler_4.0.3  
 [5] bslib_0.3.1      later_1.3.0      jquerylib_0.1.4  git2r_0.30.1    
 [9] workflowr_1.7.0  tools_4.0.3      digest_0.6.29    gtable_0.3.0    
[13] jsonlite_1.8.0   evaluate_0.15    lifecycle_1.0.1  tibble_3.1.6    
[17] pkgconfig_2.0.3  rlang_1.0.4      DBI_1.1.2        cli_3.3.0       
[21] rstudioapi_0.13  yaml_2.3.5       xfun_0.30        fastmap_1.1.0   
[25] withr_2.5.0      stringr_1.4.0    knitr_1.38       generics_0.1.2  
[29] fs_1.5.2         vctrs_0.4.1      sass_0.4.1       grid_4.0.3      
[33] tidyselect_1.1.2 rprojroot_2.0.3  glue_1.6.2       R6_2.5.1        
[37] fansi_1.0.3      rmarkdown_2.16   purrr_0.3.4      magrittr_2.0.3  
[41] whisker_0.4      scales_1.2.0     promises_1.2.0.1 ellipsis_0.3.2  
[45] htmltools_0.5.2  assertthat_0.2.1 colorspace_2.0-3 httpuv_1.6.5    
[49] utf8_1.2.2       stringi_1.7.6    munsell_0.5.0    crayon_1.5.1