Giter Club home page Giter Club logo

Comments (4)

ACEnglish avatar ACEnglish commented on May 27, 2024

Hello,

I'm unable to recreate this error.
However, when I re-run on your vcfs after running tabix -p vcf <VCF> on your two inputs, I do get an error saying:

  File "/home/english/truvari/truvari.py", line 931, in <module>
    run(sys.argv[1:])
  File "/home/english/truvari/truvari.py", line 811, in run
    seq_similarity = var_pctsim_lev(entryA, entryB)
  File "/home/english/truvari/truvari.py", line 145, in var_pctsim_lev
    if len(entryA.REF) < len(entryA.ALT[0]):
TypeError: object of type '_SV' has no len()

This has to do how these aren't sequence resolved calls (i.e. using <DEL> instead of presenting the full sequence in ALT). To get around this error, one simply needs to run truvari with --pctsim 0

Without any more information, I'm not sure what can be done. Are you certain you were pointing at the correct files and the tabix indexes were up to date?

from truvari.

songtaogui avatar songtaogui commented on May 27, 2024

Hello,

Thank you for your kind reply.

I have re-run the inputs with cmds like:

tabix -p vcf baseline.vcf.gz
tabix -p vcf call_h_s.vcf.gz
truvari.py -b baseline.vcf.gz -c call_h_s.vcf.gz -o out [--pctsim 0]

with or without the --pctsim 0 option, I got the same error saying:

File "/home/gst/sftw/SV-Call/truvari/truvari.py", line 926, in
run(sys.argv[1:])
File "/home/gst/sftw/SV-Call/truvari/truvari.py", line 661, in run
contig = vcfB.fetch(contig, 0, 1000)
File "/home/gst/sftw/anaconda2/lib/python2.7/site-packages/vcf/parser.py", line 599, in fetch
self.reader = self._tabix.fetch(chrom, start, end)
File "pysam/libctabix.pyx", line 447, in pysam.libctabix.TabixFile.fetch
ValueError: start out of range (1000)

It seems that something went wrong during the INPUT procedure. Any suggestions?

Thank you!

Best wishes,

Songtao Gui

from truvari.

ACEnglish avatar ACEnglish commented on May 27, 2024

The problem seems to be happening with pysam even though truvari is calling the function correctly.
The only instances of problems similar to this I can find are pysam-developers/pysam#41 and https://www.biostars.org/p/113309/ but neither of these seem particularly relevant to this error. You seem to be using python 2.7 instead of python3, and, like I said, we're not calling fetch weirdly.

Could you test the pysam directly and run something like:

import vcf
v = vcf.Reader(filename="call_h_s.vcf.gz")
for x in v.fetch("7", 0, 1000): 
    print x

from truvari.

songtaogui avatar songtaogui commented on May 27, 2024

Thanks!
It was the pysam problem, Truvari works fine as soon as I used python 3 instead.
Thank you again for your help.
Best wishes.

from truvari.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.