paulhager / smart-phase

A comprehensive and intelligent clinical phasing tool
GNU General Public License v3.0
13 stars 2 forks source link

Using smart-phase on non-human samples #14

Closed bf14 closed 8 months ago

bf14 commented 8 months ago

Hi,

I am attempting to use smart-phase on VCFs from cat and dog tumour samples. However, when I do so, I receive a "contig not in header" error message for both species. After some investigation, I noticed that this error occurs any time smart-phase encounters a non-human chromosome name (e.g. A2 in cat, or 23 in dog). Would you possibly be willing to adapt your code so that it can handle any chromosome name? Any help with this issue would be greatly appreciated. I will put my error messages and their associated files below:

Cat Command: smart-phase -g CATD0161a_vs_CATD0161b.muts.ids.smartphase.bed -p CATD0161b -r CATD0161b.sample.dupmarked.bam -m0 -x -o CATD0161a_vs_CATD0161b.phased -a CATD0161a_vs_CATD0161b.muts.ids.vcf.gz

Error:

Exception in thread "main" java.lang.Exception: Exception while reading bed file: 
Cannot add interval A2:51272440-51272441    -   ., contig not in header
    at smartPhase.SmartPhase.main(SmartPhase.java:462)

BED file (head):

A2  51272439    51272441
A2  56410588    56410591
A2  72116584    72116586
A2  77899144    77899148
A2  158214164   158214166
A3  35335863    35335865
A3  45021035    45021037
AANG04000872.1  25070   25072
AANG04001062.1  45355   45357
AANG04002062.1  1472    1474

Dog Command: smart-phase -g DD1461a_vs_DD1461b.adjacent_snvs.bed -p DD1461b -r DD1461a.sample.dupmarked.bam -m0 -x -o DD1461a_vs_DD1461b.phased -a DD1461a_vs_DD1461b.muts.ids.vcf.gz

Error:

Exception in thread "main" java.lang.Exception: Exception while reading bed file: 
Cannot add interval 23:49633551-49633552    -   ., contig not in header
    at smartPhase.SmartPhase.main(SmartPhase.java:462)

BED file (head):

1   102322808   102322810
1   112405800   112405802
14  11037964    11037966
16  13842451    13842453
18  8273010 8273012
20  44582709    44582711
23  49633550    49633552
27  5548500 5548502
30  7409939 7409941
35  19083488    19083490

Many thanks, Bailey

paulhager commented 8 months ago

Hi Bailey,

I'm sorry to say that I don't work in the field anymore so I won't be able to help you fix this bug. If you manage to debug and fix it by yourself, I would gladly accept a pull request to merge it into the main branch to help others as well!

bf14 commented 8 months ago

Hi Paul,

Thank you for your quick response. I will have a go at debugging and let you know if I can get anything to work. I will close this issue for now. Thank you!

Bailey