Skip to content

Commit

Permalink
fix: pathing in rmarkdown and syntax in prep_diffbind
Browse files Browse the repository at this point in the history
  • Loading branch information
rroutsong committed Aug 20, 2024
1 parent c16ac7b commit cacbd3a
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 6 deletions.
11 changes: 6 additions & 5 deletions bin/DiffBind_v2_ChIPseq_block.Rmd
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@ params:
# global variables
dateandtime <- format(Sys.time(), "%a %b %d %Y - %X")
csvfile <- params$csvfile
outbase <- dirname(csvfile)
contrasts <- params$contrasts
peakcaller <- params$peakcaller
Expand Down Expand Up @@ -238,9 +239,9 @@ tryDeseqExport <- function(DBReportDeseq2, outfile2) {
)
}
tryDeseqExport(DBReportDeseq2, outfile2)
tryDeseqExport(DBReportDeseq2, file.path(outbase, outfile2))
write.table(DBReportDeseq2, outfile, quote=F, sep="\t", row.names=F)
write.table(DBReportDeseq2, file.path(outbase, outfile), quote=F, sep="\t", row.names=F)
D2i <- length(DBReportDeseq2)
if (D2i == 0) {
i=1
Expand All @@ -255,7 +256,7 @@ report2 <- dba.report(DBAnalysisDeseq2,method = DBA_DESEQ2_BLOCK,
th=100,bNormalized=T,bFlip=FALSE,precision=0)
outfile3 <- paste0(contrasts, "-", peakcaller, deseq2_bed_fullist)
write.table(report2, outfile3, quote=F, sep="\t", row.names=F)
write.table(report2, file.path(outbase, outfile3), quote=F, sep="\t", row.names=F)
```

### EdgeR {-}
Expand All @@ -278,7 +279,7 @@ tryEdgeRExport <- function(edger_report, fout) {
tryEdgeRExport(DBReportEdgeR, file.path(outbase, outfile2))
write.table(DBReportEdgeR, outfile, quote=F, sep="\t", row.names=F)
write.table(DBReportEdgeR, file.path(outbase, outfile), quote=F, sep="\t", row.names=F)
Ei <- length(DBReportEdgeR)
if (Ei == 0) {
i=1
Expand All @@ -292,7 +293,7 @@ try(DT::datatable(data.frame(DBReportEdgeR)[1:i,], rownames=F), silent=TRUE)
report2 <- dba.report(DBAnalysisEdgeR,method = DBA_EDGER_BLOCK,
th=100,bNormalized=T,bFlip=FALSE,precision=0)
outfile3 <- paste0(contrasts, "-", peakcaller, edger_bed_fullist)
write.table(report2, outfile3, quote=F, sep="\t", row.names=F)
write.table(report2, file.path(outbase, outfile3), quote=F, sep="\t", row.names=F)
```

## R tool version information
Expand Down
2 changes: 1 addition & 1 deletion bin/prep_diffbind.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@


def main(group1, group2, peaktool, peakext, peakcaller, csvfile, wp, bam_dir):
config=json.load(open(join(wp, "config.json"))
config = json.load(open(join(wp, "config.json")))
chip2input = config['project']['peaks']['inputs']
groupdata = config['project']['groups']
blocks = config['project']['blocks']
Expand Down

0 comments on commit cacbd3a

Please sign in to comment.