Skip to content

Commit

Permalink
Escape the entire intron/exon table generation if there are no overla…
Browse files Browse the repository at this point in the history
…ps of either type
  • Loading branch information
jeffbhasin committed Sep 5, 2017
1 parent 138a66f commit c2bae07
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions R/annotate.r
Expand Up @@ -170,6 +170,9 @@ goldmine <- function(query, genes=getGenes(geneset="ucsc", genome=genome, cached
}
all.o <- rbind(exon.o, intron.o)

if(nrow(all.o)>0)
{

message("Generating exon/intron overlap diagrams")
kgxs <- rbind(data.table(srow=genemodels$exon$srow, num=genemodels$exon$num, type="E"), data.table(srow=genemodels$intron$srow, num=genemodels$intron$num, type="I"))
pairs.dt <- data.table(qrow=anng$qrow, srow=anng$srow)
Expand Down Expand Up @@ -206,6 +209,8 @@ goldmine <- function(query, genes=getGenes(geneset="ucsc", genome=genome, cached

anng <- merge(anng,st.dt,by=c("qrow","srow"),all.x=T)

}

# 3' Ends
end.o <- goldmine:::calcOverlapForReport(query.gr,genemodels$end3, all=FALSE)
colnames(end.o) <- c("qrow", "srow", "3' End")
Expand Down

0 comments on commit c2bae07

Please sign in to comment.