Comments (2)
Sorry for the delay - yes that does not sound correct. Boundaries should only be local minima, not maximia. Have you since solved your problem? If you can share your input/output I can try to take a look - though this code is now quite stale and is no longer maintained.
from crane-nature-2015.
Hello, I simply wrote an R code to extract local minimum and continue with other analysis without outputing the boundaries. The input file is attached if it is helpful.
rep1.Uni.chr1.ICE_matrix.is520001.ids320001.insulation.txt
`TADstrength <- function(TADdelta){
## input is two column TADdelta frame: delta and indicator
## return is the TAD boundary strength vector
i <- 1
end <- dim(TADdelta)[1]
max <- 0
min <- 1000000
extremeList <- NULL
strengthList <- NULL
binList <- NULL
while(i<=end){
if(!(is.na(TADdelta$deltaSquare[i])) & TADdelta$deltaSquare[i] == 1){ ## skip beginning NA 0 and peak
while(TADdelta$deltaSquare[i] == 1){
if(max < TADdelta$delta[i])
max <- TADdelta$delta[i]
i <- i + 1
if(i > end | is.na(TADdelta$deltaSquare[i]))
break
}
extremeList <- c(extremeList, max)
max <- 0
if(i > end | is.na(TADdelta$deltaSquare[i]))
break
binList <- c(binList, i-1)
while(TADdelta$deltaSquare[i] == -1){
if(min > TADdelta$delta[i])
min <- TADdelta$delta[i]
i <- i + 1
if(i > end | is.na(TADdelta$deltaSquare[i]))
break
}
extremeList <- c(extremeList, min)
min <- 10000000
if(i > end | is.na(TADdelta$deltaSquare[i]))
break
}else{
i <- i + 1
}
}
for(i in seq(1, length(extremeList), by=2)){
strengthList <- c(strengthList, (extremeList[i] - extremeList[i+1]))
}
return(list(strengthList=strengthList, binList=binList))
}`
from crane-nature-2015.
Related Issues (12)
- Input matrix header / rownames HOT 2
- how to calculate the insulation score for higher resolution Hi-C data HOT 1
- The boundary strength was defined as the difference in the delta vector
- no
- matrix interactions too large - cannot handle in memory HOT 2
- how to use insulation score to identify TAD domains HOT 3
- overlap between different boundaries HOT 1
- different insulation scores between *.insulation file and *.insulation.boundaries file HOT 2
- how to create the input matrix? HOT 2
- an error in the usage
- how get TADs with a matrix from HiCPro? HOT 11
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from crane-nature-2015.