Commit 7af97eab authored by Safia Saci's avatar Safia Saci
Browse files

Upload New File

parent 42c25acd
library(dplyr)
library(purrr)
library(stringr)
prefix <- "/work2/genphyse/genepi/data/porc/medpseq/ROSEpigs_processed2/results/bwa/mergedLibrary"
bam_data <- tibble(
path = list.files(prefix, pattern = ".bam$", full.names = TRUE),
id = map_chr(strsplit(map_chr(strsplit(path, "/", fixed = TRUE), 12), ".", fixed = TRUE), 1)
)
commands <- paste0(
"bedtools bamtobed -i ",
bam_data$path,
"> ",
bam_data$id,
".bed"
)
write.table(
commands,
file = "bam2bed.sh",
quote = F, row.names = F, col.names = F
)
# module load compiler/gcc-7.2.0
# module load module load system/R-4.0.2_gcc-7.2.0
# sarray -J abc -o %j.out -e %j.err --mem=32G --mail-type=FAIL bam2bed.sh
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment