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

Step 1 Value Error #32

Closed
harveyza opened this issue Jan 19, 2016 · 2 comments
Closed

Step 1 Value Error #32

harveyza opened this issue Jan 19, 2016 · 2 comments

Comments

@harveyza
Copy link

Hey Alicia,

I'm trying to run nucleoATAC on ATAC-seq data from yeast, but am getting the following error in step 1:
nucleoatac run --bam in.bam --bed broadPeak.bed --fasta 288C.fa --out nucleo_out --cores 16

start run at: 2016-01-19 14:53
---------Step1: Computing Occupancy and Nucleosomal Insert Distribution---------
Traceback (most recent call last):
File "/home/zharvey/.local/bin/nucleoatac", line 31, in
nucleoatac_main(args)
File "/home/zharvey/.local/lib/python2.7/site-packages/nucleoatac/cli.py", line 56, in nucleoatac_main
run_occ(occ_args)
File "/home/zharvey/.local/lib/python2.7/site-packages/nucleoatac/run_occ.py", line 95, in run_occ
fragment_dist.getFragmentSizes(args.bam, chunks)
File "/home/zharvey/.local/lib/python2.7/site-packages/nucleoatac/Occupancy.py", line 28, in getFragmentSizes
self.fragmentsizes.calculateSizes(bamfile, chunks = chunklist)
File "/home/zharvey/.local/lib/python2.7/site-packages/pyatac/fragmentsizes.py", line 26, in calculateSizes
sizes = getFragmentSizesFromChunkList(chunks, bamfile, self.lower, self.upper, atac = self.atac)
File "pyatac/fragments.pyx", line 130, in pyatac.fragments.getFragmentSizesFromChunkList (/home/zharvey/.pyxbld/temp.linux-x86_64-2.7/pyrex/pyatac/fragments.c:5040)
File "pysam/calignmentfile.pyx", line 874, in pysam.calignmentfile.AlignmentFile.fetch (pysam/calignmentfile.c:10986)
ValueError: fetch called on bamfile without index

I have Cython 0.23.4, numpy 1.10.4, scipy 0.16.1, and pysam 0.8.4 and am running on a Red Hat distribution of Linux.

Any thoughts? I checked to make sure that the reference fasta has the same nomenclature as the BAM and BED files.

Any help appreciated.

@AliciaSchep
Copy link
Contributor

The bam file must be indexed. And the index file must be in same directory as bam file. I think making sure that is true should fix this issue as the error that is arising is "fetch called on bamfile without index"

@harveyza
Copy link
Author

Thanks, that did the trick!

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