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

indexcov: panic: runtime error: index out of range #27

Closed
sjackman opened this issue May 18, 2017 · 6 comments
Closed

indexcov: panic: runtime error: index out of range #27

sjackman opened this issue May 18, 2017 · 6 comments

Comments

@sjackman
Copy link

sjackman commented May 18, 2017

❯❯❯ goleft_linux64 indexcov -d indexcov foo.bam 
2017/05/18 15:33:16 indexcov: running on 1 indexes
(WARNING) indexcov: expected 2 sex chromosomes, found: 0.
you can set the expected with --sex ''
2017/05/18 15:33:17 sex chromosomes not found.
2017/05/18 15:33:17 got: 1 principal components
2017/05/18 15:33:17 indexcov: 1 principal components, not plotting
panic: runtime error: index out of range

goroutine 1 [running]:
github.com/brentp/goleft/indexcov.plotSex(0xc4203f8840, 0xc4201591a0, 0x2, 0x2, 0xc420294600, 0x1, 0x1, 0x0, 0x0, 0x0, ...)
	/home/brentp/go/src/github.com/brentp/goleft/indexcov/plot.go:371 +0xc22
github.com/brentp/goleft/indexcov.writeIndex(0xc4203f8840, 0xc42000c130, 0x1, 0x1, 0xc4201591a0, 0x2, 0x2, 0xc420294600, 0x1, 0x1, ...)
	/home/brentp/go/src/github.com/brentp/goleft/indexcov/indexcov.go:742 +0x1cda
github.com/brentp/goleft/indexcov.Main()
	/home/brentp/go/src/github.com/brentp/goleft/indexcov/indexcov.go:382 +0x8ca
main.main()
	/home/brentp/go/src/github.com/brentp/goleft/cmd/goleft/goleft.go:68 +0x191
❯❯❯ goleft_linux64 --version
goleft Version: 0.1.16

The BAM is of reads mapped to an assembly of those reads. I can send along the BAI file if it helps troubleshooting.

@brentp
Copy link
Owner

brentp commented May 18, 2017

well, that's a regression. yes, the bai would be appreciated.
could you use this: https://github.com/brentp/goleft/releases/download/v0.1.10/anonymize-for-indexcov_linux64
to make a stub bam, bai from your originals?

@sjackman
Copy link
Author

sjackman commented May 19, 2017

The original .bai file is 30 kb. Here it is:
ftp://ftp.bcgsc.ca/public/sjackman/goleft/v4.bam.bai

@brentp
Copy link
Owner

brentp commented May 19, 2017

Thanks.
I am making a fix for this now, but you can also run with --sex '' and it will complete--though your data doesn't look very exciting.

@brentp brentp closed this as completed in e7c6f5a May 19, 2017
@sjackman
Copy link
Author

Thanks, Brent. I'll try it tomorrow.

though your data doesn't look very exciting.

Ouch. Burn.

@sjackman
Copy link
Author

sjackman commented May 19, 2017

The --sex '' workaround worked. Thanks! I'm using the plots to identify large collapsed repeats in a de novo assembly. It's quite useful. Thanks, Brent.

@brentp
Copy link
Owner

brentp commented May 19, 2017

good to hear. thanks for the test-case.

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

2 participants