## Copied bedGraph files from: ~/ceph_snabel/multiome/CMdiff_10XMO_EB_d8_GRCh38/count_results/R_analysis/FinalAnalysesFiles/20230822_PeaksExploration/ ## These could not directly be used: because of overlap in the regions. ## Making bedGraphs without overlap: ## Starting with the .bed file coming from SplitFragments() in Signac. ## First sort the .bed file: sort -k 1,1 AM.bed > AM.sorted.bed ## Then run bedtools genomecov to generate bedGraph: this should now contain any overlaps anymore: bedtools genomecov -i AM.sorted.bed -g /ceph/rimlsfnwi/data/moldevbio/veenstra/snabel/genomes/GRCh38_manual/GRCh38/GRCh38.fa.sizes -bg > AM.bedGraph ## Now the rest: sort -k 1,1 VM.bed > VM.sorted.bed bedtools genomecov -i VM.sorted.bed -g /ceph/rimlsfnwi/data/moldevbio/veenstra/snabel/genomes/GRCh38_manual/GRCh38/GRCh38.fa.sizes -bg > VM.bedGraph sort -k 1,1 AM-prolif.bed > AM-prolif.sorted.bed bedtools genomecov -i AM-prolif.sorted.bed -g /ceph/rimlsfnwi/data/moldevbio/veenstra/snabel/genomes/GRCh38_manual/GRCh38/GRCh38.fa.sizes -bg > AM-prolif.bedGraph sort -k 1,1 VM-NRXN3.bed > VM-NRXN3.sorted.bed bedtools genomecov -i VM-NRXN3.sorted.bed -g /ceph/rimlsfnwi/data/moldevbio/veenstra/snabel/genomes/GRCh38_manual/GRCh38/GRCh38.fa.sizes -bg > VM-NRXN3.bedGraph sort -k 1,1 GRHL2-GULP1.bed > GRHL2-GULP1.sorted.bed bedtools genomecov -i GRHL2-GULP1.sorted.bed -g /ceph/rimlsfnwi/data/moldevbio/veenstra/snabel/genomes/GRCh38_manual/GRCh38/GRCh38.fa.sizes -bg > EPI.bedGraph sort -k 1,1 FIB-SCN7A-FGF13-APOgenes.bed > FIB-SCN7A-FGF13-APOgenes.sorted.bed bedtools genomecov -i FIB-SCN7A-FGF13-APOgenes.sorted.bed -g /ceph/rimlsfnwi/data/moldevbio/veenstra/snabel/genomes/GRCh38_manual/GRCh38/GRCh38.fa.sizes -bg > FIB.bedGraph sort -k 1,1 END-NRG3.bed > END-NRG3.sorted.bed bedtools genomecov -i END-NRG3.sorted.bed -g /ceph/rimlsfnwi/data/moldevbio/veenstra/snabel/genomes/GRCh38_manual/GRCh38/GRCh38.fa.sizes -bg > END.bedGraph https://mbdata.science.ru.nl/snabel/CMdiff_10XMO_EB_d8_GRCh38/cell_state/AM.bedGraph https://mbdata.science.ru.nl/snabel/CMdiff_10XMO_EB_d8_GRCh38/cell_state/AM.bedGraph https://mbdata.science.ru.nl/snabel/CMdiff_10XMO_EB_d8_GRCh38/cell_state/AM-prolif.bedGraph https://mbdata.science.ru.nl/snabel/CMdiff_10XMO_EB_d8_GRCh38/cell_state/EPI.bedGraph https://mbdata.science.ru.nl/snabel/CMdiff_10XMO_EB_d8_GRCh38/cell_state/FIB.bedGraph https://mbdata.science.ru.nl/snabel/CMdiff_10XMO_EB_d8_GRCh38/cell_state/END.bedGraph https://mbdata.science.ru.nl/snabel/CMdiff_10XMO_EB_d8_GRCh38/cell_state/VM.bedGraph https://mbdata.science.ru.nl/snabel/CMdiff_10XMO_EB_d8_GRCh38/cell_state/VM-NRXN3.bedGraph ## No overlaps are found anymore - YAY! Now see if it can be uploaded to genome browser, otherwise use bedGraphToBigWig from UCSC... sort -k1,1 -k2,2n AM.bedGraph > AM_sorted.bedGraph bedGraphToBigWig AM_sorted.bedGraph /ceph/rimlsfnwi/data/moldevbio/veenstra/snabel/genomes/GRCh38_manual/GRCh38/GRCh38.fa.sizes AM.bw sort -k1,1 -k2,2n AM-prolif.bedGraph > AM-prolif_sorted.bedGraph bedGraphToBigWig AM-prolif_sorted.bedGraph /ceph/rimlsfnwi/data/moldevbio/veenstra/snabel/genomes/GRCh38_manual/GRCh38/GRCh38.fa.sizes AM-prolif.bw sort -k1,1 -k2,2n VM.bedGraph > VM_sorted.bedGraph bedGraphToBigWig VM_sorted.bedGraph /ceph/rimlsfnwi/data/moldevbio/veenstra/snabel/genomes/GRCh38_manual/GRCh38/GRCh38.fa.sizes VM.bw sort -k1,1 -k2,2n VM-NRXN3.bedGraph > VM-NRXN3_sorted.bedGraph bedGraphToBigWig VM-NRXN3_sorted.bedGraph /ceph/rimlsfnwi/data/moldevbio/veenstra/snabel/genomes/GRCh38_manual/GRCh38/GRCh38.fa.sizes VM-NRXN3.bw sort -k1,1 -k2,2n FIB.bedGraph > FIB_sorted.bedGraph bedGraphToBigWig FIB_sorted.bedGraph /ceph/rimlsfnwi/data/moldevbio/veenstra/snabel/genomes/GRCh38_manual/GRCh38/GRCh38.fa.sizes FIB.bw sort -k1,1 -k2,2n END.bedGraph > END_sorted.bedGraph bedGraphToBigWig END_sorted.bedGraph /ceph/rimlsfnwi/data/moldevbio/veenstra/snabel/genomes/GRCh38_manual/GRCh38/GRCh38.fa.sizes END.bw sort -k1,1 -k2,2n EPI.bedGraph > EPI_sorted.bedGraph bedGraphToBigWig EPI_sorted.bedGraph /ceph/rimlsfnwi/data/moldevbio/veenstra/snabel/genomes/GRCh38_manual/GRCh38/GRCh38.fa.sizes EPI.bw ## Perform scaling on the amount of fragments per celltype: ## Check length of file: wc -l AM.sorted.bed 36602889 36 million fragments divide by 1/36=0.0278 bedtools genomecov -i AM.sorted.bed -g /ceph/rimlsfnwi/data/moldevbio/veenstra/snabel/genomes/GRCh38_manual/GRCh38/GRCh38.fa.sizes -scale 0.0273202478634951 -bg > scaled/AM.bedGraph bedtools genomecov -i VM.sorted.bed -g /ceph/rimlsfnwi/data/moldevbio/veenstra/snabel/genomes/GRCh38_manual/GRCh38/GRCh38.fa.sizes -scale 0.0478518514335912 -bg > scaled/VM.bedGraph bedtools genomecov -i AM-prolif.sorted.bed -g /ceph/rimlsfnwi/data/moldevbio/veenstra/snabel/genomes/GRCh38_manual/GRCh38/GRCh38.fa.sizes -scale 0.0478968998156832 -bg > scaled/AM-prolif.bedGraph bedtools genomecov -i VM-NRXN3.sorted.bed -g /ceph/rimlsfnwi/data/moldevbio/veenstra/snabel/genomes/GRCh38_manual/GRCh38/GRCh38.fa.sizes -scale 0.186894054432893 -bg > scaled/VM-NRXN3.bedGraph bedtools genomecov -i GRHL2-GULP1.sorted.bed -g /ceph/rimlsfnwi/data/moldevbio/veenstra/snabel/genomes/GRCh38_manual/GRCh38/GRCh38.fa.sizes -scale 0.230017092570149 -bg > scaled/EPI.bedGraph bedtools genomecov -i FIB-SCN7A-FGF13-APOgenes.sorted.bed -g /ceph/rimlsfnwi/data/moldevbio/veenstra/snabel/genomes/GRCh38_manual/GRCh38/GRCh38.fa.sizes -scale 0.0611939078282674 -bg > scaled/FIB.bedGraph bedtools genomecov -i END-NRG3.sorted.bed -g /ceph/rimlsfnwi/data/moldevbio/veenstra/snabel/genomes/GRCh38_manual/GRCh38/GRCh38.fa.sizes -scale 0.082683017619255 -bg > scaled/END.bedGraph cd scaled sort -k1,1 -k2,2n AM.bedGraph > AM_sorted.bedGraph bedGraphToBigWig AM_sorted.bedGraph /ceph/rimlsfnwi/data/moldevbio/veenstra/snabel/genomes/GRCh38_manual/GRCh38/GRCh38.fa.sizes AM.bw sort -k1,1 -k2,2n AM-prolif.bedGraph > AM-prolif_sorted.bedGraph bedGraphToBigWig AM-prolif_sorted.bedGraph /ceph/rimlsfnwi/data/moldevbio/veenstra/snabel/genomes/GRCh38_manual/GRCh38/GRCh38.fa.sizes AM-prolif.bw sort -k1,1 -k2,2n VM.bedGraph > VM_sorted.bedGraph bedGraphToBigWig VM_sorted.bedGraph /ceph/rimlsfnwi/data/moldevbio/veenstra/snabel/genomes/GRCh38_manual/GRCh38/GRCh38.fa.sizes VM.bw sort -k1,1 -k2,2n VM-NRXN3.bedGraph > VM-NRXN3_sorted.bedGraph bedGraphToBigWig VM-NRXN3_sorted.bedGraph /ceph/rimlsfnwi/data/moldevbio/veenstra/snabel/genomes/GRCh38_manual/GRCh38/GRCh38.fa.sizes VM-NRXN3.bw sort -k1,1 -k2,2n FIB.bedGraph > FIB_sorted.bedGraph bedGraphToBigWig FIB_sorted.bedGraph /ceph/rimlsfnwi/data/moldevbio/veenstra/snabel/genomes/GRCh38_manual/GRCh38/GRCh38.fa.sizes FIB.bw sort -k1,1 -k2,2n END.bedGraph > END_sorted.bedGraph bedGraphToBigWig END_sorted.bedGraph /ceph/rimlsfnwi/data/moldevbio/veenstra/snabel/genomes/GRCh38_manual/GRCh38/GRCh38.fa.sizes END.bw sort -k1,1 -k2,2n EPI.bedGraph > EPI_sorted.bedGraph bedGraphToBigWig EPI_sorted.bedGraph /ceph/rimlsfnwi/data/moldevbio/veenstra/snabel/genomes/GRCh38_manual/GRCh38/GRCh38.fa.sizes EPI.bw ## Genome browser settings: track setting color= ## Taken from fluff settings: "#EE766F,#C49B05,#59B031,#36B28F,#11B6EB,#9188C0,#CC6FA9" AM #EE766F 238,118,111 AM-prolif #C49B05 196,155,5 END #59B031 89,176,49 FIB #36B28F 54,178,143 EPI #11B6EB 17,182,235 VM #9188C0 145,136,192 VM-NRXN3 #CC6FA9 204,111,169 ## Used in Excel to set up: wc -l: file name: start of command: #NAAM? to run in commandline: 36602889 AM.sorted.bed bedtools genomecov -i AM.sorted.bed -g /ceph/rimlsfnwi/data/moldevbio/veenstra/snabel/genomes/GRCh38_manual/GRCh38/GRCh38.fa.sizes -scale 0.027320248 -bg > scaled/ AM.bedGraph bedtools genomecov -i AM.sorted.bed -g /ceph/rimlsfnwi/data/moldevbio/veenstra/snabel/genomes/GRCh38_manual/GRCh38/GRCh38.fa.sizes -scale 0.0273202478634951 -bg > scaled/AM.bedGraph 20897833 VM.sorted.bed bedtools genomecov -i VM.sorted.bed -g /ceph/rimlsfnwi/data/moldevbio/veenstra/snabel/genomes/GRCh38_manual/GRCh38/GRCh38.fa.sizes -scale 0.047851851 -bg > scaled/ VM.bedGraph bedtools genomecov -i VM.sorted.bed -g /ceph/rimlsfnwi/data/moldevbio/veenstra/snabel/genomes/GRCh38_manual/GRCh38/GRCh38.fa.sizes -scale 0.0478518514335912 -bg > scaled/VM.bedGraph 20878178 AM-prolif.sorted.bed bedtools genomecov -i AM-prolif.sorted.bed -g /ceph/rimlsfnwi/data/moldevbio/veenstra/snabel/genomes/GRCh38_manual/GRCh38/GRCh38.fa.sizes -scale 0.0478969 -bg > scaled/ AM-prolif.bedGraph bedtools genomecov -i AM-prolif.sorted.bed -g /ceph/rimlsfnwi/data/moldevbio/veenstra/snabel/genomes/GRCh38_manual/GRCh38/GRCh38.fa.sizes -scale 0.0478968998156832 -bg > scaled/AM-prolif.bedGraph 5350625 VM-NRXN3.sorted.bed bedtools genomecov -i VM-NRXN3.sorted.bed -g /ceph/rimlsfnwi/data/moldevbio/veenstra/snabel/genomes/GRCh38_manual/GRCh38/GRCh38.fa.sizes -scale 0.186894054 -bg > scaled/ VM-NRXN3.bedGraph bedtools genomecov -i VM-NRXN3.sorted.bed -g /ceph/rimlsfnwi/data/moldevbio/veenstra/snabel/genomes/GRCh38_manual/GRCh38/GRCh38.fa.sizes -scale 0.186894054432893 -bg > scaled/VM-NRXN3.bedGraph 4347503 GRHL2-GULP1.sorted.bed bedtools genomecov -i GRHL2-GULP1.sorted.bed -g /ceph/rimlsfnwi/data/moldevbio/veenstra/snabel/genomes/GRCh38_manual/GRCh38/GRCh38.fa.sizes -scale 0.230017093 -bg > scaled/ EPI.bedGraph bedtools genomecov -i GRHL2-GULP1.sorted.bed -g /ceph/rimlsfnwi/data/moldevbio/veenstra/snabel/genomes/GRCh38_manual/GRCh38/GRCh38.fa.sizes -scale 0.230017092570149 -bg > scaled/EPI.bedGraph 16341496 FIB-SCN7A-FGF13-APOgenes.sorted.bed bedtools genomecov -i FIB-SCN7A-FGF13-APOgenes.sorted.bed -g /ceph/rimlsfnwi/data/moldevbio/veenstra/snabel/genomes/GRCh38_manual/GRCh38/GRCh38.fa.sizes -scale 0.061193908 -bg > scaled/ FIB.bedGraph bedtools genomecov -i FIB-SCN7A-FGF13-APOgenes.sorted.bed -g /ceph/rimlsfnwi/data/moldevbio/veenstra/snabel/genomes/GRCh38_manual/GRCh38/GRCh38.fa.sizes -scale 0.0611939078282674 -bg > scaled/FIB.bedGraph 12094382 END-NRG3.sorted.bed bedtools genomecov -i END-NRG3.sorted.bed -g /ceph/rimlsfnwi/data/moldevbio/veenstra/snabel/genomes/GRCh38_manual/GRCh38/GRCh38.fa.sizes -scale 0.082683018 -bg > scaled/ END.bedGraph bedtools genomecov -i END-NRG3.sorted.bed -g /ceph/rimlsfnwi/data/moldevbio/veenstra/snabel/genomes/GRCh38_manual/GRCh38/GRCh38.fa.sizes -scale 0.082683017619255 -bg > scaled/END.bedGraph