Skip to content

Commit

Permalink
begin diffbind templates
Browse files Browse the repository at this point in the history
  • Loading branch information
abartlett004 committed Sep 19, 2024
1 parent 04f41f4 commit f517d42
Show file tree
Hide file tree
Showing 13 changed files with 59 additions and 0 deletions.
Empty file modified DESCRIPTION
100644 → 100755
Empty file.
Empty file modified LICENSE
100644 → 100755
Empty file.
Empty file modified LICENSE.md
100644 → 100755
Empty file.
Empty file modified NAMESPACE
100644 → 100755
Empty file.
Empty file modified NEWS.md
100644 → 100755
Empty file.
Empty file modified README.md
100644 → 100755
Empty file.
Empty file modified _pkgdown.yml
100644 → 100755
Empty file.
25 changes: 25 additions & 0 deletions inst/templates/chipseq/diffbind/chipseq_peakanalysis_H3K27Ac.csv
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
sample,fastq_1,fastq_2,antibody,control,genotype
WT_H3K27ac_ChIPseq_REP1,s3://hcbc-seqera/results/sra_peakanalysis_GSE111661/fastq/SRX3780292_SRR6823782.fastq.gz,,H3K27ac,WT_H3K27ac_input_REP1,WT
WT_H3K27ac_ChIPseq_REP1,s3://hcbc-seqera/results/sra_peakanalysis_GSE111661/fastq/SRX3780292_SRR6823783.fastq.gz,,H3K27ac,WT_H3K27ac_input_REP1,WT
WT_H3K27ac_ChIPseq_REP1,s3://hcbc-seqera/results/sra_peakanalysis_GSE111661/fastq/SRX3780292_SRR6823784.fastq.gz,,H3K27ac,WT_H3K27ac_input_REP1,WT
WT_H3K27ac_input_REP1,s3://hcbc-seqera/results/sra_peakanalysis_GSE111661/fastq/SRX3780293_SRR6823785.fastq.gz,,,,WT
WT_H3K27ac_input_REP1,s3://hcbc-seqera/results/sra_peakanalysis_GSE111661/fastq/SRX3780293_SRR6823786.fastq.gz,,,,WT
WT_H3K27ac_ChIPseq_REP2,s3://hcbc-seqera/results/sra_peakanalysis_GSE111661/fastq/SRX3780294_SRR6823787.fastq.gz,,H3K27ac,WT_H3K27ac_input_REP2,WT
WT_H3K27ac_ChIPseq_REP2,s3://hcbc-seqera/results/sra_peakanalysis_GSE111661/fastq/SRX3780294_SRR6823788.fastq.gz,,H3K27ac,WT_H3K27ac_input_REP2,WT
WT_H3K27ac_ChIPseq_REP2,s3://hcbc-seqera/results/sra_peakanalysis_GSE111661/fastq/SRX3780294_SRR6823789.fastq.gz,,H3K27ac,WT_H3K27ac_input_REP2,WT
WT_H3K27ac_input_REP2,s3://hcbc-seqera/results/sra_peakanalysis_GSE111661/fastq/SRX3780295_SRR6823790.fastq.gz,,,,WT
WT_H3K27ac_input_REP2,s3://hcbc-seqera/results/sra_peakanalysis_GSE111661/fastq/SRX3780295_SRR6823791.fastq.gz,,,,WT
WT_H3K27ac_ChIPseq_REP3,s3://hcbc-seqera/results/sra_peakanalysis_GSE111661/fastq/SRX3780296_SRR6823792.fastq.gz,,H3K27ac,WT_H3K27ac_input_REP3,WT
WT_H3K27ac_input_REP3,s3://hcbc-seqera/results/sra_peakanalysis_GSE111661/fastq/SRX3780297_SRR6823793.fastq.gz,,,,WT
cKO_H3K27ac_ChIPseq_REP1,s3://hcbc-seqera/results/sra_peakanalysis_GSE111661/fastq/SRX3780298_SRR6823794.fastq.gz,,H3K27ac,cKO_H3K27ac_input_REP1,cKO
cKO_H3K27ac_ChIPseq_REP1,s3://hcbc-seqera/results/sra_peakanalysis_GSE111661/fastq/SRX3780298_SRR6823795.fastq.gz,,H3K27ac,cKO_H3K27ac_input_REP1,cKO
cKO_H3K27ac_ChIPseq_REP1,s3://hcbc-seqera/results/sra_peakanalysis_GSE111661/fastq/SRX3780298_SRR6823796.fastq.gz,,H3K27ac,cKO_H3K27ac_input_REP1,cKO
cKO_H3K27ac_input_REP1,s3://hcbc-seqera/results/sra_peakanalysis_GSE111661/fastq/SRX3780299_SRR6823797.fastq.gz,,,,cKO
cKO_H3K27ac_input_REP1,s3://hcbc-seqera/results/sra_peakanalysis_GSE111661/fastq/SRX3780299_SRR6823798.fastq.gz,,,,cKO
cKO_H3K27ac_ChIPseq_REP2,s3://hcbc-seqera/results/sra_peakanalysis_GSE111661/fastq/SRX3780300_SRR6823799.fastq.gz,,H3K27ac,cKO_H3K27ac_input_REP2,cKO
cKO_H3K27ac_ChIPseq_REP2,s3://hcbc-seqera/results/sra_peakanalysis_GSE111661/fastq/SRX3780300_SRR6823800.fastq.gz,,H3K27ac,cKO_H3K27ac_input_REP2,cKO
cKO_H3K27ac_ChIPseq_REP2,s3://hcbc-seqera/results/sra_peakanalysis_GSE111661/fastq/SRX3780300_SRR6823801.fastq.gz,,H3K27ac,cKO_H3K27ac_input_REP2,cKO
cKO_H3K27ac_input_REP2,s3://hcbc-seqera/results/sra_peakanalysis_GSE111661/fastq/SRX3780301_SRR6823802.fastq.gz,,,,cKO
cKO_H3K27ac_input_REP2,s3://hcbc-seqera/results/sra_peakanalysis_GSE111661/fastq/SRX3780301_SRR6823803.fastq.gz,,,,cKO
cKO_H3K27ac_ChIPseq_REP3,s3://hcbc-seqera/results/sra_peakanalysis_GSE111661/fastq/SRX3780302_SRR6823804.fastq.gz,,H3K27ac,cKO_H3K27ac_input_REP3,cKO
cKO_H3K27ac_input_REP3,s3://hcbc-seqera/results/sra_peakanalysis_GSE111661/fastq/SRX3780303_SRR6823805.fastq.gz,,,,cKO
8 changes: 8 additions & 0 deletions inst/templates/chipseq/diffbind/params_diffbind-example.R
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
# info params


# Example data
coldata_fn='chipseq_peakanalysis_H3K27Ac.csv'
peaks_dir = '~/s3_results/chipseq_peakanalysis_h3k27ac_narrow/bowtie2/mergedLibrary/macs2/narrowPeak/'
bam_dir = '~/s3_results/chipseq_peakanalysis_h3k27ac_narrow/bowtie2/mergedLibrary/'
peak_caller = 'macs'
Empty file modified inst/templates/chipseq/information.R
100644 → 100755
Empty file.
Empty file modified inst/templates/chipseq/libs/load_data.R
100644 → 100755
Empty file.
26 changes: 26 additions & 0 deletions inst/templates/chipseq/libs/make_diffbind_samplesheet.R
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
library(tidyverse)
library(tools)

source('../libs/load_data.R')
source('params_diffbind-example.R')

coldata <- load_coldata(coldata_fn)

bam_files <- data.frame(bam = list.files(bam_dir, pattern = '.bam$', full.names = T)) %>%
mutate(sample = sub("\\..*", "",basename(bam)))

peak_files <- data.frame(Peaks = list.files(peaks_dir, pattern = 'Peak$', full.names = T)) %>%
mutate(SampleID = sub("\\..*", "",basename(Peaks))) %>%
mutate(SampleID = gsub('_peaks', '', SampleID))

coldata_for_diffbind <- coldata %>%
filter(!is.na(control) & control != '') %>%
# select(-description) %>%
dplyr::rename(ControlID = control, SampleID = sample) %>%
separate(SampleID, into = c('sample', 'Replicate'), remove = F, sep = '_REP') %>%
mutate(peakCaller = peak_caller)

samplesheet <- coldata_for_diffbind %>%
left_join(bam_files %>% select(SampleID = sample, bamReads = bam), by = 'SampleID') %>%
left_join(bam_files %>% select(ControlID = sample, bamControl = bam), by = 'ControlID') %>%
left_join(peak_files, by = 'SampleID')
Empty file modified inst/templates/chipseq/readme.md
100644 → 100755
Empty file.

0 comments on commit f517d42

Please sign in to comment.