Commit d952b52e authored by ziegenhain@bio.lmu.de's avatar ziegenhain@bio.lmu.de
Browse files

fix compatibility with Rsubread 1.30.x

parent 8abb86ba
Loading
Loading
Loading
Loading
+7 −5
Original line number Original line Diff line number Diff line
@@ -263,8 +263,10 @@ makeGEprofile <- function(abamfile,ubamfile,bcfile,safannot,ncores,stra,bcstart,
    saveRDS(object = reads,file = paste(out,"/zUMIs_output/expression/",sn,".tbl.rds",sep=""))
    saveRDS(object = reads,file = paste(out,"/zUMIs_output/expression/",sn,".tbl.rds",sep=""))
  } else{
  } else{


    fcts <-  Rsubread::featureCounts(files=abamfile[1],annot.ext=safannot[[1]],isGTFAnnotationFile=F,primaryOnly=T,nthreads=1,reportReads="CORE",strandSpecific=stra)# do not use more than nthreads=1!
    fcts <-  Rsubread::featureCounts(files=substr(x=abamfile[1],start=1,stop=nchar(abamfile[1])-3),annot.ext=safannot[[1]],isGTFAnnotationFile=F,primaryOnly=T,nthreads=1,reportReads="CORE",strandSpecific=stra)# do not use more than nthreads=1!
    fcts <-  Rsubread::featureCounts(files=abamfile[2],annot.ext=safannot[[2]],isGTFAnnotationFile=F,primaryOnly=T,nthreads=1,reportReads="CORE",strandSpecific=stra)# do not use more than nthreads=1!
    system(command=paste("mv ",substr(x=abamfile[1],start=1,stop=nchar(abamfile[1])-3),".featureCounts ",abamfile[1],".featureCounts",sep=""))
    fcts <-  Rsubread::featureCounts(files=substr(x=abamfile[2],start=1,stop=nchar(abamfile[2])-3),annot.ext=safannot[[2]],isGTFAnnotationFile=F,primaryOnly=T,nthreads=1,reportReads="CORE",strandSpecific=stra)# do not use more than nthreads=1!
    system(command=paste("mv ",substr(x=substr(x=abamfile[2],start=1,stop=nchar(abamfile[2])-3),start=1,stop=nchar(abamfile[2])-3),".featureCounts ",abamfile[2],".featureCounts",sep=""))


    fctsfile <- data.table::fread(paste("cut -f4 ",abamfile[2],".featureCounts",sep=""), sep="\t",quote='',header = F)
    fctsfile <- data.table::fread(paste("cut -f4 ",abamfile[2],".featureCounts",sep=""), sep="\t",quote='',header = F)
    reads <- data.table::fread(paste("cut -f10 ",ubamfile,sep=""), quote='',header = F,skip=1)
    reads <- data.table::fread(paste("cut -f10 ",ubamfile,sep=""), quote='',header = F,skip=1)