CompEpigen / figeno

Tool for plotting sequencing data along genomic coordinates.
GNU General Public License v3.0
240 stars 8 forks source link

SV VCF error and SVs missing #16

Closed SunShiFu86 closed 2 months ago

SunShiFu86 commented 2 months ago

Thank for this tool. In the process of using your tool, I have encountered two issues. Firstly, When I use VCF files generated by Sniffles2 or CuteSV to create plots, an error occurs, showing an error message:

Traceback(most recent call last):
File "figenolguilgui webview.py" line 104, in run
File "figenoifigeno.py",line 501,in figeno make
File "figeno\figeno.py",line 205,ininit
File "figenotrack svpy" line 40,in init
File "figenoltrack svpy" line 199,in read SVs vcf
AttributeError.'Substitution' object has no attribute 'mate chrom

Is there a way to avoid this issue?

Secondly, after generating the plot from my TSV file, it appears that some SVs are missing. Is there an issue with my TSV file?

thanks Sun

chr1    pos1    chr2    pos2    color
1   105620925   11  76366859    #4a69bd
10  11367895    5   146198175   #4a69bd
10  34652048    2   77746770    #4a69bd
10  74711556    9   64212437    #4a69bd
11  50336013    2   77746770    #4a69bd
14  119376487   X   50479240    #4a69bd
15  96459865    5   65199727    #4a69bd
17  92619508    6   134425851   #4a69bd
2   77746771    4   89656874    #4a69bd
2   77746771    X   65732885    #4a69bd
3   62066743    5   146198174   #4a69bd
4   147956492   9   30551634    #4a69bd
7   92583095    8   102736910   #4a69bd
7   92583095    X   8384088 #4a69bd
10  34652049    2   77746770    #e74c3c
10  90952767    6   124900611   #e74c3c
11  50336014    2   77746770    #e74c3c
13  45023048    18  85716416    #e74c3c
13  45023048    9   3258720 #e74c3c
15  96459865    5   65199727    #e74c3c
2   77746771    4   89656873    #e74c3c
2   148252527   7   92526728    #e74c3c
2   148252529   7   92583093    #e74c3c
3   62066735    5   146198175   #e74c3c
4   126077932   8   11594305    #e74c3c
4   126077932   8   119906938   #e74c3c
5   109823990   9   124031168   #e74c3c
7   92583095    X   8384088 #e74c3c

微信图片_20240613180129

fawaz-dabbaghieh commented 2 months ago

I encountered the first issue as well. From my understanding, in the ALT column, there needs to be coordinates to point to. E.g:

#CHROM  POS     ID      REF     ALT     QUAL    FILTER  INFO    FORMAT  SAMPLE1
chr2    41829794        BND00017684     A       A[chr1:126641701[       90      LowQual PRECISE;SVTYPE=BND;SVMETHOD=EMBL.DELLYv1.2.6;END=41829795;CHR2=chr1;POS2=126641701;PE=0;MAPQ=0;CT=3to5;CIPOS=-3,3;CIEND=-3,3;SRMAPQ=30;INSLEN=0;HOMLEN=3;SR=3;SRQ=0.990551;CE=1.95702;CONSBP=952      GT:GL:GQ:FT:RCL:RC:RCR:RDCN:DR:DV:RR:RV 1/1:-162,-8.1278,0:81:PASS:34869:63964:29095:2:0:0:0:27
e-sollier commented 2 months ago

Hi,

Thanks for your interest in figeno and for the bug report!

The issue with the vcf was due to indels which were not properly handled. This is now fixed.

For tsv files, figeno was somehow assuming that chr1 would be < chr2 (although there is no reason for this), which is why some SVs were missed. This is now fixed as well.

If you install the new version of figeno (pip install figeno==1.3.2), this should now work as expected. Sorry for these issues and thanks again for reporting them. Please let me know if you still encounter issues!

SunShiFu86 commented 2 months ago

Perfectly solved all my problems, thank you!