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

build_genome_feature gff red upgrade

parent 2b6d87c6
......@@ -410,8 +410,17 @@ setMethod("build_genome_features",definition=function(txdb,features,parameters)
###################
# read the gff
gff<-data.table::fread(file,fill=T,drop=base::c(2,6,8),verbose=F,showProgress=F,col.names=base::c("chr",
"type","start","end","strand","att"))[data.table::like(type,"RNA|transcript") & !data.table::like(chr,"^#")]
#gff<-data.table::fread(file,fill=T,drop=base::c(2,6,8),verbose=F,showProgress=F,col.names=base::c("chr",
#"type","start","end","strand","att"))[data.table::like(type,"RNA|transcript") & !data.table::like(chr,"^#")]
gff<-data.table::fread(file,sep="",verbose=F,showProgress=F,header=F)[data.table::like(base::gsub("ID=.+$","",V1),"[[:space:]].+(RNA|transcript)"),]
###################
# parse it
gff<-gff[,{
tmp=data.table::data.table(base::t(base::strsplit(V1,"\t")[[1]]));
base::list(chr=tmp$V1,type=tmp$V3,start=tmp$V4,end=tmp$V5,strand=tmp$V7,att=tmp$V9)
},by=1:base::nrow(gff)][,base:=NULL]
###################
# remove files
......
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