Skip to content

Commit

Permalink
Merge pull request #15 from stjude/p2-naming
Browse files Browse the repository at this point in the history
changed output names from enhancers -> stitchedPeaks
  • Loading branch information
madetunj authored Feb 11, 2022
2 parents 7caf426 + 117b68e commit 0bdce26
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 7 deletions.
6 changes: 3 additions & 3 deletions bin/ROSE_callSuper.R
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,7 @@ writeSuperEnhancer_table <- function(superEnhancer,description,outputFile,additi
warning("Additional data does not have the same number of rows as the number of super stitched peaks.\n--->>> ADDITIONAL DATA NOT INCLUDED <<<---\n")
}else{
superEnhancer <- cbind(superEnhancer,additionalData)
superEnhancer = superEnhancer[order(superEnhancer$enhancerRank),]
superEnhancer = superEnhancer[order(superEnhancer$stitchedPeakRank),]

}
}
Expand Down Expand Up @@ -128,7 +128,7 @@ cutoff_options <- calculate_cutoff(rankBy_vector, drawPlot=FALSE,xlab=paste(rank
#These are the super-enhancers
superEnhancerRows <- which(rankBy_vector> cutoff_options$absolute)
typicalEnhancers = setdiff(1:nrow(stitched_regions),superEnhancerRows)
enhancerDescription <- paste(enhancerName," Enhancers\nCreated from ", enhancerFile,"\nRanked by ",rankBy_factor,"\nUsing cutoff of ",cutoff_options$absolute," for Super-Enhancers",sep="",collapse="")
enhancerDescription <- paste(enhancerName," Stitched Peaks\nCreated from ", enhancerFile,"\nRanked by ",rankBy_factor,"\nUsing cutoff of ",cutoff_options$absolute," for Super-Stitched Peaks",sep="",collapse="")


#MAKING HOCKEY STICK PLOT
Expand Down Expand Up @@ -161,7 +161,7 @@ convert_stitched_to_bed(stitched_regions,paste(rankBy_factor,"Stitched"), enhanc
true_super_enhancers <- stitched_regions[superEnhancerRows,]

additionalTableData <- matrix(data=NA,ncol=2,nrow=nrow(stitched_regions))
colnames(additionalTableData) <- c("enhancerRank","isSuper")
colnames(additionalTableData) <- c("stitchedPeakRank","isSuper")
additionalTableData[,1] <- nrow(stitched_regions)-rank(rankBy_vector,ties.method="first")+1
additionalTableData[,2] <- 0
additionalTableData[superEnhancerRows,2] <- 1
Expand Down
2 changes: 1 addition & 1 deletion bin/ROSE_geneMapper.py
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,7 @@ def mapEnhancerToGene(annotFile,enhancerFile,transcribedFile='',uniqueGenes=True
enhancerToGeneTable = [enhancerTable[5][0:6]+['OVERLAP_GENES','PROXIMAL_GENES','CLOSEST_GENE'] + enhancerTable[5][-2:]]

#next by gene
geneToEnhancerTable = [['GENE_NAME','REFSEQ_ID','PROXIMAL_ENHANCERS']]
geneToEnhancerTable = [['GENE_NAME','REFSEQ_ID','PROXIMAL_STITCHED_PEAKS']]


for line in enhancerTable[6:]:
Expand Down
6 changes: 3 additions & 3 deletions bin/ROSE_main.py
Original file line number Diff line number Diff line change
Expand Up @@ -456,7 +456,7 @@ def main():

time.sleep(10)

print('CALLING AND PLOTTING SUPER-ENHANCERS')
print('CALLING AND PLOTTING SUPER-STITCHED PEAKS')


if options.control:
Expand Down Expand Up @@ -484,11 +484,11 @@ def main():
cmd1 = "ROSE_geneMapper.py -g %s -i %s -r TRUE" % (genome,superTableFile)
cmd2 = "ROSE_geneMapper.py -g %s -i %s -r TRUE" % (genome,allTableFile)

#gene mapper for superenhancers
#gene mapper for super-stitched peaks
print(cmd1)
os.system(cmd1)

#gene mapper for enhancers
#gene mapper for stitched peaks
print(cmd2)
os.system(cmd2)

Expand Down

0 comments on commit 0bdce26

Please sign in to comment.