Last updated: 2022-03-01

Checks: 7 0

Knit directory: chipseq-cross-species/

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.


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(20220209) 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 e69f551. 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:    .RData
    Ignored:    .Rhistory
    Ignored:    analysis/.RData
    Ignored:    analysis/.Rhistory
    Ignored:    data/genomic_data/
    Ignored:    output/annotations/
    Ignored:    output/filtered_peaks/
    Ignored:    output/plots/
    Ignored:    results/

Untracked files:
    Untracked:  .snakemake/
    Untracked:  code/basic_wrapper.slurm
    Untracked:  code/configs/metadata.tsv
    Untracked:  code/slurmjob.stderr
    Untracked:  code/slurmjob.stdout
    Untracked:  code/trimfastq.py
    Untracked:  data/raw_reads/
    Untracked:  output/bam_files/
    Untracked:  output/logs/
    Untracked:  output/qc/

Unstaged changes:
    Modified:   .gitignore
    Deleted:    code/dunnart_peak_calling/trimfastq.py

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/mouse_dunnart_data_processing_for_comparison.Rmd) and HTML (docs/mouse_dunnart_data_processing_for_comparison.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 784c4ec lecook 2022-03-01 update
Rmd bf8fac9 lecook 2022-03-01 updated
Rmd 5fb3661 lecook 2022-03-01 clean up
Rmd c2eeed7 lecook 2022-02-28 debugged

Pipeline for mouse and dunnart peak calling

Download mouse unfiltered alignments from ENCODE

See mouse_data_ENCODE for details on these samples.

xargs -L 1 curl -O -J -L < ENCODE_files.txt

Filter mouse alignments

Uses samtools and picards MarkDuplicates to remove low quality reads. This is based on and in accordance with the ENCODE Guidelines and pipeline (https://github.com/ENCODE-DCC/chip-seq-pipeline2)

Library Complexity ChIP-seq Standards:

PBC1 PBC2 Bottlenecking level NRF Complexity Flag colors
< 0.5 < 1 Severe < 0.5 Concerning Orange
0.5 ≤ PBC1 < 0.8 1 ≤ PBC2 < 3 Moderate 0.5 ≤ NRF < 0.8 Acceptable Yellow
0.8 ≤ PBC1 < 0.9 3 ≤ PBC2 < 10 Mild 0.8 ≤ NRF < 0.9 Compliant None
≥ 0.9 ≥ 10 None > 0.9 Ideal None

See full snakemake script for details: code/mouse_peak_calling/mouse_H3K4me3 and code/mouse_peak_calling/mouse_H3K27ac

Table. Read alignment quality metrics before and aftering filtering steps

read counts
replicate antibody stage accession ID bwa
alignment
filtered
readŝ
remove
duplicates
NRF* PBC1* PBC2*
1 H3K27ac E10.5 ENCFF213EBC 86919825 74296920 61061524 0.83 0.83 5.53
2 H3K27ac E10.5 ENCFF548BRR 49113729 43572898 38069875 0.88 0.88 8.03
1 H3K27ac E11.5 ENCFF512SFE 1714339 12827968 11879316 0.93 0.93 13.76
2 H3K27ac E11.5 ENCFF515PKL 18419756 13753883 11961286 0.88 0.88 7.7
2 H3K27ac E12.5 ENCFF011NFM 41510259 32754035 28442356 0.88 0.88 7.55
1 H3K27ac E13.5 ENCFF194ORC 47508791 39115139 23235076 0.64 0.62 2.49
2 H3K27ac E13.5 ENCFF290ZNF 46476048 37416425 26624266 0.74 0.73 3.52
1 H3K27ac E14.5 ENCFF327VAO 37480089 30104464 19228162 0.66 0.64 2.53
2 H3K27ac E14.5 ENCFF902HAR 27840473 22156787 15203030 0.69 0.67 2.68
1 H3K27ac E15.5 ENCFF584JFB 51675307 40125566 35551034 0.9 0.9 9.61
2 H3K27ac E15.5 ENCFF707WKL 38499223 30334974 27522173 0.92 0.92 11.76
1 H3K4me3 E10.5 ENCFF124UYX 74283697 65480729 47429840 0.73 0.76 4.51
2 H3K4me3 E10.5 ENCFF045IPK 39305102 34283317 27327155 0.8 0.82 5.7
1 H3K4me3 E11.5 ENCFF760QYZ 24048599 17547752 16515484 0.95 0.95 20.21
2 H3K4me3 E11.5 ENCFF717QDV 19425608 14136366 13504654 0.96 0.97 26.71
1 H3K4me3 E12.5 ENCFF182ZPF 37674883 30140587 26489691 0.89 0.89 9.29
2 H3K4me3 E12.5 ENCFF941QJZ 38463605 29985012 26459778 0.89 0.9 9.44
1 H3K4me3 E13.5 ENCFF485UDC 47478873 38287309 33094082 0.89 0.9 10.81
2 H3K4me3 E13.5 ENCFF124TAB 47598002 38139564 33020017 0.89 0.91 11.12
1 H3K4me3 E14.5 ENCFF724DMU 25402316 18964886 17278836 0.92 0.93 13.9
2 H3K4me3 E14.5 ENCFF665QBJ 28852674 22484958 19804325 0.9 0.9 10.56
1 H3K4me3 E15.5 ENCFF258KCR 55588923 44138244 38278946 0.89 0.91 12.05
2 H3K4me3 E15.5 ENCFF401BKM 42617927 34005723 29687861 0.9 0.91 12.13
1 input control E10.5 ENCFF157KEH 75962416 57382820 55915261 0.98 0.98 45.2
2 input control E10.5 ENCFF825AVI 70250734 53358758 51796823 0.98 0.98 38.64
1 input control E11.5 ENCFF184CUE 14581637 10190363 10031334 0.99 0.99 69.67
2 input control E11.5 ENCFF376FGM 16001082 11239845 11033934 0.99 0.99 59.63
1 input control E12.5 ENCFF203JQV 74367126 54966177 52895081 0.97 0.97 29.47
2 input control E12.5 ENCFF058AUT 68220307 50400902 48480815 0.97 0.97 29.1
1 input control E13.5 ENCFF117QRC 77084648 56275163 53582563 0.97 0.97 30.93
2 input control E13.5 ENCFF248PGK 66492732 48343406 46564874 0.98 0.98 38.51
1 input control E14.5 ENCFF784ORI 35480589 25431770 24573359 0.97 0.97 32.34
2 input control E14.5 ENCFF002HZV 33021720 23658223 23199516 0.99 0.99 57.52
1 input control E15.5 ENCFF727QTS 72318210 51828288 50444903 0.98 0.99 52.73
2 input control E15.5 ENCFF182XFG 86322714 63335464 60305840 0.97 0.97 28.35
  • calculated from a subsample of ~10-15M aligned reads prior to removing MarkDuplicates

̂ excluded low quality (MAPQ30) and orphaned reads

Normalise dunnart and mouse BAM files to 10M reads

This is so we can compare to mouse peaks.

Based on https://davemcg.github.io/post/easy-bam-downsampling/ script for doing this.

Run script in the directory with the files you want to subsample.

cd output/bam_files/
bash subsample.sh

Read QC with deepTools

Plot correlation between BAM files

plotCorrelation computes the overall similarity between two or more files based on read coverage (or other scores) within genomic regions.

This helps to determine whether the different sample types can be separated, i.e., samples of different conditions are expected to be more dissimilar to each other than replicates within the same condition.

include_graphics("output/qc/pearsoncor_multibamsum_dunnart_downSampled.png")
include_graphics("output/qc/pearsoncor_multibamsum_dunnart_downSampled.png")

Fingerprint plots

This tool samples indexed BAM files and plots a profile of cumulative read coverages for each. All reads overlapping a window (bin) of the specified length are counted; these counts are sorted and the cumulative sum is finally plotted.

It determines how well the signal in the ChIP-seq sample can be differentiated from the background distribution of reads in the control sample.

An ideal input with perfect uniform distribution of reads along the genome (i.e. without enrichments in open chromatin etc.) and infinite sequencing coverage should generate a straight diagonal line. A very specific and strong ChIP enrichment will be indicated by a prominent and steep rise of the cumulative sum towards the highest rank. This means that a big chunk of reads from the ChIP sample is located in few bins which corresponds to high, narrow enrichments typically seen for transcription factors.

include_graphics("output/qc/multiBAM_fingerprint.png")

BAM PE fragment size

This tool calculates the fragment sizes for read pairs given a BAM file from paired-end sequencing. Several regions are sampled depending on the size of the genome and number of processors to estimate thesummary statistics on the fragment lengths.

include_graphics("output/qc/bamPEFragmentSize_hist.png")

sessionInfo()
R version 4.1.0 (2021-05-18)
Platform: x86_64-pc-linux-gnu (64-bit)
Running under: Red Hat Enterprise Linux

Matrix products: default
BLAS/LAPACK: /usr/local/easybuild-2019/easybuild/software/compiler/gcc/10.2.0/openblas/0.3.12/lib/libopenblas_haswellp-r0.3.12.so

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

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

other attached packages:
[1] workflowr_1.7.0

loaded via a namespace (and not attached):
 [1] Rcpp_1.0.6        jquerylib_0.1.4   pillar_1.6.1      compiler_4.1.0   
 [5] bslib_0.2.5.1     later_1.2.0       git2r_0.28.0      tools_4.1.0      
 [9] getPass_0.2-2     digest_0.6.27     jsonlite_1.7.2    evaluate_0.14    
[13] lifecycle_1.0.1   tibble_3.1.2      pkgconfig_2.0.3   rlang_1.0.1      
[17] cli_2.5.0         rstudioapi_0.13   yaml_2.2.1        xfun_0.23        
[21] httr_1.4.2        stringr_1.4.0     knitr_1.33        sass_0.4.0       
[25] fs_1.5.0          vctrs_0.3.8       rprojroot_2.0.2   glue_1.4.2       
[29] R6_2.5.0          processx_3.5.2    fansi_0.5.0       rmarkdown_2.8    
[33] callr_3.7.0       magrittr_2.0.1    whisker_0.4       ps_1.6.0         
[37] promises_1.2.0.1  ellipsis_0.3.2    htmltools_0.5.1.1 httpuv_1.6.1     
[41] utf8_1.2.1        stringi_1.6.2     crayon_1.4.1