Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

cool2matrix has an assumption about the number and the order of chromosomes, but there is no description #72

Open
hisakatha opened this issue Feb 24, 2023 · 0 comments

Comments

@hisakatha
Copy link

cool2matrix assumes that the number of chromosomes of your sample is equal to that of the human genome and the order is numerically ascending.

hicrep/R/cool2matrix.R

Lines 26 to 43 in e485dfa

chr2index <- function(chr) {
if (substr(chr, 1, 3) == 'chr') {
chr = substr(chr, 4, nchar(chr))
}
if (chr == 'X') {
index = 23
}
else if (chr == 'Y') {
index = 24
}
else if (chr == 'M') {
index = 25
}
else {
index = as.integer(chr)
}
return(index)
}

However, there is no description about the assumption in the ?cool2matrix document.
Workaround is using a numerical index of your target chromosome at chr argument of cool2matrix to avoid conversion based on the assumption.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant