Commit fa45aad4 authored by Aurelien Brionne's avatar Aurelien Brionne
Browse files

update

parent 272da265
......@@ -220,9 +220,15 @@ setMethod("genome_features_overlaps",definition=function(peaks,features,figs_pat
annot[,tag:=NULL]
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)
}else{
###################
# merge with overlapped features
annot[,GeneID:=base::gsub(":.+$","",feature)]
}
###################
......
......@@ -29,16 +29,21 @@ setMethod("show", "overlapped_genome_features",function(object) {
# extract annotations
Data<-methods::slot(object,"annotation")
###################
# available columns
colnum=base::c("condition","feature_type","type","geneID")
colnum= colnum[colnum%in%base::names(Data)]
###################
# count unique genes match by feature type
Data<-base::unique(Data[,.(condition,feature_type,type,GeneID)])
Data<-base::unique(Data[,.SD,.SDcols=colnum])
###################
# count
Data<-data.table::dcast(
Data,
condition~feature_type,
value.var="GeneID",
value.var="geneID",
fun=length
)
......
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