Last updated: 2025-06-05

Checks: 7 0

Knit directory: locust-comparative-genomics/

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


Great! Since the R Markdown file has been committed to the Git repository, you know the exact version of the code that produced these results.

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(20221025) 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 15f7841. 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:    .DS_Store
    Ignored:    analysis/.DS_Store
    Ignored:    analysis/.Rhistory
    Ignored:    code/.DS_Store
    Ignored:    code/scripts/.DS_Store
    Ignored:    code/scripts/pal2nal.v14/.DS_Store
    Ignored:    data/.DS_Store
    Ignored:    data/DEG_results/.DS_Store
    Ignored:    data/DEG_results/Bulk_RNAseq/.DS_Store
    Ignored:    data/DEG_results/Bulk_RNAseq/americana/.DS_Store
    Ignored:    data/DEG_results/Bulk_RNAseq/cancellata/.DS_Store
    Ignored:    data/DEG_results/Bulk_RNAseq/cancellata/Thorax/.DS_Store
    Ignored:    data/DEG_results/Bulk_RNAseq/cubense/.DS_Store
    Ignored:    data/DEG_results/Bulk_RNAseq/davidO/.DS_Store
    Ignored:    data/DEG_results/Bulk_RNAseq/gregaria/.DS_Store
    Ignored:    data/DEG_results/Bulk_RNAseq/nitens/.DS_Store
    Ignored:    data/DEG_results/Bulk_RNAseq/piceifrons/.DS_Store
    Ignored:    data/DEG_results/RNAi/.DS_Store
    Ignored:    data/DEG_results/RNAi/All/.DS_Store
    Ignored:    data/DEG_results/RNAi/All_GFP/.DS_Store
    Ignored:    data/DEG_results/RNAi/All_control/.DS_Store
    Ignored:    data/DEG_results/RNAi/All_no_rRNA/.DS_Store
    Ignored:    data/DEG_results/RNAi/Head/.DS_Store
    Ignored:    data/DEG_results/RNAi/Head_control/.DS_Store
    Ignored:    data/DEG_results/RNAi/Head_no_rRNA/.DS_Store
    Ignored:    data/DEG_results/RNAi/Thorax/.DS_Store
    Ignored:    data/DEG_results/RNAi/Thorax_no_rRNA/.DS_Store
    Ignored:    data/DEG_results/gregaria/
    Ignored:    data/DEG_results/single_cell/.DS_Store
    Ignored:    data/WGCNA/.DS_Store
    Ignored:    data/WGCNA/input/.DS_Store
    Ignored:    data/WGCNA/input/Bulk_RNAseq/.DS_Store
    Ignored:    data/WGCNA/output/.DS_Store
    Ignored:    data/WGCNA/output/Bulk_RNAseq/.DS_Store
    Ignored:    data/behavioral_data/.DS_Store
    Ignored:    data/behavioral_data/Raw_data/.DS_Store
    Ignored:    data/list/.DS_Store
    Ignored:    data/list/Bulk_RNAseq/.DS_Store
    Ignored:    data/list/GO_Annotations/.DS_Store
    Ignored:    data/list/excluded_loci/.DS_Store
    Ignored:    data/orthofinder/.DS_Store
    Ignored:    data/orthofinder/Polyneoptera/.DS_Store
    Ignored:    data/orthofinder/Polyneoptera/Results_I2_iqtree/.DS_Store
    Ignored:    data/orthofinder/Polyneoptera/Results_I2_withDaust/.DS_Store
    Ignored:    data/orthofinder/Polyneoptera/Results_I2_withDaust/Orthogroups/.DS_Store
    Ignored:    data/orthofinder/Schistocerca/.DS_Store
    Ignored:    data/orthofinder/Schistocerca/Results_I2/.DS_Store
    Ignored:    data/orthofinder/Schistocerca/Results_I2/Orthogroups/.DS_Store
    Ignored:    data/overlap/.DS_Store
    Ignored:    data/overlap/Bulk_RNAseq/.DS_Store
    Ignored:    data/overlap/Bulk_RNAseq/cancellata/
    Ignored:    data/pathway_enrichment/.DS_Store
    Ignored:    data/pathway_enrichment/custom_sgregaria_orgdb/.DS_Store
    Ignored:    data/readcounts/.DS_Store
    Ignored:    data/readcounts/Bulk_RNAseq/.DS_Store
    Ignored:    data/readcounts/RNAi/.DS_Store

Untracked files:
    Untracked:  data/RefSeq/

Unstaged changes:
    Modified:   data/DEG_results/RNAi/Head/UNCH_vs_GFP/volcano_plot_UNCH_vs_GFP.tiff
    Modified:   data/DEG_results/RNAi/Head_no_rRNA/UNCH_vs_GFP/volcano_plot_UNCH_vs_GFP.tiff
    Modified:   data/overlap/Bulk_RNAseq/overlapping_genes_head_thorax_americana.csv
    Modified:   data/overlap/Bulk_RNAseq/overlapping_genes_head_thorax_cancellata.csv
    Modified:   data/overlap/Bulk_RNAseq/overlapping_genes_head_thorax_cubense.csv
    Modified:   data/overlap/Bulk_RNAseq/overlapping_genes_head_thorax_piceifrons.csv
    Modified:   data/overlap/Bulk_RNAseq/scatter_plot_overlapping_genes_americana.png
    Modified:   data/overlap/Bulk_RNAseq/scatter_plot_overlapping_genes_cancellata.png
    Modified:   data/overlap/Bulk_RNAseq/scatter_plot_overlapping_genes_cubense.png
    Modified:   data/overlap/Bulk_RNAseq/scatter_plot_overlapping_genes_piceifrons.png

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/2_hic-snps-phylogeny.Rmd) and HTML (docs/2_hic-snps-phylogeny.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
html 3e696d6 Maeva TECHER 2025-06-05 Adding ortho heatmap
html 285370e Maeva TECHER 2025-06-04 Build site.
Rmd cacc1db Maeva TECHER 2025-05-02 updates files

Ask Sheina to add her scripts

So we have merged the snps.

module purge ml GCC/12.3.0 vcflib/1.0.9-R-4.3.2 BCFtools/1.18

we will subsample the number of snps so we can run the stats on it

bcftools view all_samples.vcf.gz | vcfrandomsample -r 0.02 > all_samples_subset.vcf

module purge ml GCC/13.2.0 OpenMPI/4.1.6 R_tamu/4.4.1 export R_LIBS=$SCRATCH/R_LIBS_USER/

library(tidyverse) library(ggplot2)

Load and parse data

var_depth <- read_delim(“all_samples.ldepth.mean”, delim = “, col_names = c(”chr”, “pos”, “mean_depth”, “var_depth”), skip = 1)

Compute the mean

summary(var_depth\(mean_depth) mean_val <- mean(var_depth\)mean_depth, na.rm = TRUE)

Base plot with vertical mean line

a <- ggplot(var_depth, aes(mean_depth)) + geom_density(fill = “dodgerblue1”, colour = “black”, alpha = 0.3) + geom_vline(xintercept = mean_val, colour = “red”, linetype = “dashed”) + theme_light()

Open a multi-page PDF

pdf(“mean_depth_density.pdf”, width = 6, height = 4)

Page 1: full density plot

print(a)

Page 2: zoomed in

a_zoom <- a + xlim(0, 100) print(a_zoom)

Close device

dev.off()

Load missingness data

var_miss <- read_delim(“all_samples.lmiss”, delim = “, col_names = c(”chr”, “pos”, “nchr”, “nfiltered”, “nmiss”, “fmiss”), skip = 1)

Calculate mean missingness

summary(var_miss\(fmiss) mean_fmiss <- mean(var_miss\)fmiss, na.rm = TRUE)

Base plot with vertical mean line

a <- ggplot(var_miss, aes(fmiss)) + geom_density(fill = “dodgerblue1”, colour = “black”, alpha = 0.3) + geom_vline(xintercept = mean_fmiss, colour = “red”, linetype = “dashed”) + theme_light()

Open multi-page PDF

pdf(“variant_missingness.pdf”, width = 6, height = 4)

Page 1: full density plot

print(a)

Page 2: zoomed in

a_zoom <- a + xlim(0, 1) # fmiss is a fraction (0–1), not 0–100 print(a_zoom)

Close device

dev.off()

Load individual depth data

ind_depth <- read_delim(“all_samples.idepth”, delim = “, col_names = c(”ind”, “nsites”, “depth”), skip = 1)

Calculate mean depth per individual

mean_depth <- mean(ind_depth$depth, na.rm = TRUE)

Create histogram with vertical mean line

a <- ggplot(ind_depth, aes(depth)) + geom_histogram(fill = “dodgerblue1”, colour = “black”, alpha = 0.3, bins = 30) + geom_vline(xintercept = mean_depth, colour = “red”, linetype = “dashed”) + theme_light()

Open PDF for two pages

pdf(“individual_depth_distribution.pdf”, width = 6, height = 4)

Page 1: full view

print(a)

Page 2: zoomed in (e.g., 0 to 100)

a_zoom <- a + xlim(0, 100) print(a_zoom)

Close the PDF device

dev.off()

Load individual missingness data

ind_miss <- read_delim(“all_samples.imiss”, delim = “, col_names = c(”ind”, “ndata”, “nfiltered”, “nmiss”, “fmiss”), skip = 1)

Calculate mean missingness

mean_fmiss <- mean(ind_miss$fmiss, na.rm = TRUE)

Create histogram with vertical line

a <- ggplot(ind_miss, aes(fmiss)) + geom_histogram(fill = “dodgerblue1”, colour = “black”, alpha = 0.3, bins = 30) + geom_vline(xintercept = mean_fmiss, colour = “red”, linetype = “dashed”) + theme_light()

Save to multi-page PDF

pdf(“individual_missingness_distribution.pdf”, width = 6, height = 4)

Page 1: full histogram

print(a)

Page 2: zoomed-in view

a_zoom <- a + xlim(0, 1) print(a_zoom)

Close PDF device

dev.off()


sessionInfo()
R version 4.4.2 (2024-10-31)
Platform: aarch64-apple-darwin20
Running under: macOS Sequoia 15.5

Matrix products: default
BLAS:   /Library/Frameworks/R.framework/Versions/4.4-arm64/Resources/lib/libRblas.0.dylib 
LAPACK: /Library/Frameworks/R.framework/Versions/4.4-arm64/Resources/lib/libRlapack.dylib;  LAPACK version 3.12.0

locale:
[1] en_US.UTF-8/en_US.UTF-8/en_US.UTF-8/C/en_US.UTF-8/en_US.UTF-8

time zone: Asia/Tokyo
tzcode source: internal

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

other attached packages:
[1] workflowr_1.7.1

loaded via a namespace (and not attached):
 [1] vctrs_0.6.5       httr_1.4.7        cli_3.6.5         knitr_1.49       
 [5] rlang_1.1.6       xfun_0.51         stringi_1.8.4     processx_3.8.6   
 [9] promises_1.3.2    jsonlite_1.9.1    glue_1.8.0        rprojroot_2.0.4  
[13] git2r_0.35.0      htmltools_0.5.8.1 httpuv_1.6.15     ps_1.9.0         
[17] sass_0.4.9        rmarkdown_2.29    jquerylib_0.1.4   tibble_3.2.1     
[21] evaluate_1.0.3    fastmap_1.2.0     yaml_2.3.10       lifecycle_1.0.4  
[25] whisker_0.4.1     stringr_1.5.1     compiler_4.4.2    fs_1.6.5         
[29] pkgconfig_2.0.3   Rcpp_1.0.14       rstudioapi_0.17.1 later_1.4.1      
[33] digest_0.6.37     R6_2.6.1          pillar_1.10.2     callr_3.7.6      
[37] magrittr_2.0.3    bslib_0.9.0       tools_4.4.2       cachem_1.1.0     
[41] getPass_0.2-4