Skip to content
Snippets Groups Projects
Verified Commit 7d2d4ef6 authored by Aurélien Ginolhac's avatar Aurélien Ginolhac 🚴
Browse files

grab all defined sample names instead of parsing regex on it

parent a3e1af21
Branches main
No related tags found
No related merge requests found
......@@ -5,12 +5,13 @@ sink(log, type = "message")
suppressPackageStartupMessages(library(DiffBind))
suppressPackageStartupMessages(library(dplyr))
library(stringr)
library(fs)
pfiles <- snakemake@input[["peaks"]]
group <- snakemake@params[["group"]]
tibble::tibble(
SampleID = str_extract(pfiles, "\\/([:alnum:]+)\\-\\d\\.narrowPeak", group = 1),
SampleID = path_file(pfiles) |> path_ext_remove(),
Tissue = group,
Factor = "ATAC",
Condition = Tissue,
......@@ -18,10 +19,11 @@ tibble::tibble(
bamReads = snakemake@input[["bams"]],
ControlID = NA,
bamControl = NA,
Peaks = pfiles,
Peaks = pfiles,
# so score column is 7
PeakCaller = "sicer") |>
mutate(Replicate = row_number(), .by = Tissue, .after = Treatment) -> sampleSheet
mutate(Replicate = row_number(),
.by = Tissue, .after = Treatment) -> sampleSheet
head(sampleSheet, 10)
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment