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

basset_sad throws an error for variants near the chromosome start #14

Closed
arahuja opened this issue Jan 26, 2016 · 1 comment
Closed

Comments

@arahuja
Copy link

arahuja commented Jan 26, 2016

  File "/Users/arahuja/src/Basset/src/basset_sad.py", line 198, in <module>
    main()
  File "/Users/arahuja/src/Basset/src/basset_sad.py", line 54, in main
    seq_vecs, seqs, seq_headers = vcf.snps_seq1(snps, options.genome_fasta, options.seq_len)
  File "/Users/arahuja/src/Basset/src/vcf.py", line 57, in snps_seq1
    seq = genome.fetch(snp.chrom, seq_start-1, seq_end).upper()
  File "pysam/cfaidx.pyx", line 238, in pysam.cfaidx.FastaFile.fetch (pysam/cfaidx.c:3991)
  File "pysam/cutils.pyx", line 202, in pysam.cutils.parse_region (pysam/cutils.c:3378)
ValueError: start out of range (-228)

This is due to an issue in vcf.py where the seq_start is not check to be < 0 when variant start < window size

@davek44
Copy link
Owner

davek44 commented Apr 20, 2016

Thanks for pointing that out. The newest commit should fix it.

@davek44 davek44 closed this as completed Apr 20, 2016
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