Skip to content
Snippets Groups Projects
Commit 9ea0a475 authored by MAILLARD NOEMIEN's avatar MAILLARD NOEMIEN
Browse files

save no_feature file (commented lines) and load from file

parent 4cfd749a
No related branches found
No related tags found
1 merge request!31Resolve "panel3"
......@@ -345,24 +345,35 @@ if(is.null(args$repeat_table) & is.null(args$gtf) & is.null(args$cpg)){
ranges=IRanges(start=cpg$start, end=cpg$end),
type='cpg'
)
gr.features <- unlist(GRangesList(gr.repeats, gr.gtf, gr.cpg))
rm(cpg)
# # create and save no feature bed file
# nofeat <- data.table::as.data.table(unlist(GRangesList(lapply(
# unique(seqnames(deepbind)),
# function(x){
# x <- as.character(x)
# print(x)
# dt <- data.table::as.data.table(breakInChunks(max(end(deepbind[seqnames(deepbind)==x])), chunksize=1))
# dt$seqnames <- as.character(x)
# dt <- GRanges(
# seqnames=dt$seqnames,
# ranges=IRanges(start=dt$start, end=dt$end)
# )
# setdiff(dt, gr.features[seqnames(gr.features)==x])
# }
# ))))
# write.table(nofeat, '/media/nomaillard/Storage/EAGLE/data/Sscrofa/genomic_features/no_features.bed')
nofeat <- data.table::fread('/media/nomaillard/Storage/EAGLE/data/Sscrofa/genomic_features/no_features.bed')
gr.nofeat <- GRanges(
seqnames=nofeat$seqnames,
ranges=IRanges(start=nofeat$start, end=nofeat$end),
type='no_feature'
)
rm(nofeat)
gc()
nofeat <- unlist(GRangesList(lapply(
unique(seqnames(deepbind)),
function(x){
x <- as.character(x)
print(x)
dt <- data.table::as.data.table(breakInChunks(max(end(deepbind[seqnames(deepbind)==x])), chunksize=1))
dt$seqnames <- as.character(x)
dt <- GRanges(
seqnames=dt$seqnames,
ranges=IRanges(start=dt$start, end=dt$end)
)
setdiff(dt, gr.features[seqnames(gr.features)==x])
}
)))
gr.features <- unlist(GRangesList(gr.repeats, gr.gtf, gr.cpg, gr.nofeat))
rm(cpg)
gc()
df.auc <- data.table::rbindlist(unlist(
lapply(
......
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