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

'findChangePoints' assumes sorted input data #1

Open
pneuvial opened this issue May 5, 2015 · 1 comment
Open

'findChangePoints' assumes sorted input data #1

pneuvial opened this issue May 5, 2015 · 1 comment
Labels

Comments

@pneuvial
Copy link

pneuvial commented May 5, 2015

> cnR
SegmentedCopyNumbers:
Name: ROC
Number of rows: 28931
Number of columns: 4
Columns: chromosome [numeric], x [numeric], cn [numeric], state* [numeric]
RAM: 0.56MB
Chromosomes: 0 [1]
Number of loci: 28931
Position range: [1.00006e+07,2.19998e+07]
Mean distance between loci: 414.768
> table(getStates(cnR))

   -1     0 
 8378 15378 
> cps <- findChangePointsByState(cnR, na.rm=TRUE, ends=TRUE)
> cps
 [1] 10000564 17999681 15998628 17981854 15946940 18055980 15981472 18056784
 [9] 15976855 18006812 15990232 17986574 16039763 17999701 15997448 18055141
[17] 16066085 17984982 16049780 18028110 15995324 18000603 15994306 18052537
[25] 15999434 17994246 16015902 17999194 15982423 17192758 16001896 17998905
[33] 16005792 17985927 15989360 17974496 19027778 17986384 16000216 17998410
[41] 16004417 18024618 21999798
@HenrikBengtsson
Copy link
Owner

So

cnR <- sort(cnR)

sorts RawGenomicSignals objects along the genome (and SegmentedCopyNumbers inherits from that class). However, I'm not sure if it mess other things up. Worth trying though.

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

No branches or pull requests

2 participants