llecompte / SVJedi

SV genotyping with long reads
GNU Affero General Public License v3.0
40 stars 4 forks source link

ValueError svLength #4

Closed wdecoster closed 3 years ago

wdecoster commented 4 years ago

Hi,

I first figured out the version on Conda is not up to date anymore when I got this error:

 File "/home/wdecoster/miniconda3/envs/svjedi/bin/svjedi.py", line 191, in <module>
    main(sys.argv[1:])
  File "/home/wdecoster/miniconda3/envs/svjedi/bin/svjedi.py", line 184, in main
    genotype.genotype(paf_file, vcf_file, output_file, min_support, d_over, d_end)
  File "/home/wdecoster/miniconda3/envs/svjedi/bin/modules/genotype.py", line 82, in genotype
    refSV = (refId.split("_")[1] + "_" + refId.split("_")[-1]) # ex: ref_2_48990527-636
IndexError: list index out of range

So I cloned the repository to try again, and now I get:

  File "SVJedi/svjedi.py", line 193, in <module>
    main(sys.argv[1:])
  File "SVJedi/svjedi.py", line 186, in main
    genotype.genotype(paf_file, vcf_file, output_file, min_support, d_over, d_end, l_adj)
  File "/home/wdecoster/path1/path2/path3/SVJedi/modules/genotype.py", line 87, in genotype
    svLength = abs(int(refId.split("-")[-1]))
ValueError: invalid literal for int() with base 10: 'chr1'

(I changed some bits of the path for confidentiality reasons)

llecompte commented 4 years ago

Hello!

Thank you for letting me know. Can I take a look at the format of the column #6 (target sequence name) in the PAF file?

I will try to solve the problem as soon as possible, I'm quite busy writing my thesis at the moment. I will update the conda, as soon as I have solved the issue.

Thanks, Lolita

wdecoster commented 4 years ago

Hi Lolita,

I'm sorry for not following up earlier on this thread, but I hope it gave you some time to work on your thesis :) Please prioritize your writing! But if you would have the time, here is a line from one of the PAF files:

f857b577-3c0f-4743-b3ae-e924f5f5e951    28664   1041    1496    +       chr1    248956422       10000   10466   416     488     0       tp:A:S  mm:i:17 gn:i:55 go:i:35 cg:Z:9M1D29M1D11M2D18M3I2M2I8M1I6M1D11M1D5M1I16M1I7M1D20M2D8M1D5M1D5M1D22M1D17M1I18M1D16M1D8M2D5M1D5M1D5M1D17M7D11M1D31M4I5M1D15M4I13M1D13M3I5M1D18M1D9M1D20M1I1M1I19M

It seems the 6th column contains "chr1". Does SVJedi expect that to be "1" and as such throws the error with regard to expecting an integer?

Cheers, Wouter

llecompte commented 3 years ago

Hello Wouter,

I'm really sorry for my very late answer, I was well taken by the end of the thesis I forgot to answer you.

Did you use the first module of SVJedi to generate the reference and alternative sequences for each SV? SVJedi expects in the 6th column of the PAF file the coordinates of the SV: character_chromosomeName_SVStartPosition-SVlength

Again so sorry for my late response, Best regards, Lolita

wdecoster commented 3 years ago

I don't remember! I'll let you know if I use SVJedi again and I see the error again.

llecompte commented 3 years ago

Yes, thank you very much for your feedback !