Commit 272da265 authored by Aurelien Brionne's avatar Aurelien Brionne
Browse files

genome_features_overlaps

parent 96d68a6d
......@@ -219,9 +219,11 @@ setMethod("genome_features_overlaps",definition=function(peaks,features,figs_pat
# remove tag
annot[,tag:=NULL]
###################
# merge with overlapped features
annot<-merge(annot,features@gff,by.x="tx_name",by.y="Name",all.x=T,sort=F)
if(base::ncol(features@gff)>1){
###################
# merge with overlapped features
annot<-merge(annot,features@gff,by.x="tx_name",by.y="Name",all.x=T,sort=F)
}
###################
# locate feature tag
......@@ -241,7 +243,7 @@ setMethod("genome_features_overlaps",definition=function(peaks,features,figs_pat
###################
# cast featurescount
features_count=dcast.data.table(features_count,
features_count=data.table::dcast(features_count,
condition~feature_type,value.var="count")
###################
......@@ -264,7 +266,7 @@ setMethod("genome_features_overlaps",definition=function(peaks,features,figs_pat
###################
# format for plot
Data=melt.data.table(features_frequency,id.vars="condition",
Data=data.table::melt(features_frequency,id.vars="condition",
variable.name = "feature", value.name = "frequency")
###################
......@@ -338,7 +340,7 @@ setMethod("genome_features_overlaps",definition=function(peaks,features,figs_pat
###################
# cast Data
Data<-dcast.data.table(Data,tag~feature_type,value.var="count")
Data<-data.table::dcast(Data,tag~feature_type,value.var="count")
###################
# replace NA by 0
......
Markdown is supported
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