jpuntomarcos / CNVfilteR

R package to remove false positives of CNV calling tools by using SNV calls
5 stars 1 forks source link

loadVCFs output is empty #5

Closed AndreaG5 closed 2 years ago

AndreaG5 commented 3 years ago

Hi, I am trying to run CNVfilteR on IonTorrent data. The .vcf is the output of Ion software so I cannot do so much on it. Reading the manual I've found that is possible to adapt the function to whatever just adding some informations. I correctly generate loadCNVcalls object.
So, following the manual I tried to launch the following after checking the FORMAT fields in my.vcf. 'RO' stands for Reference observed and 'AO' for allele observed (integers of reads)

vcfs <- loadVCFs(vcf.files, cnvs.gr = cnvs.gr, vcf.source = "MyCaller", ref.support.field = "RO", alt.support.field = "AO")

It results me in an error:

Error in depths.alt + depths.ref : non-numeric argument to binary operator

So, following the manual and checking the example data from the package I decide to scripting to create a new FORMAT field, called 'AD' which was the concatenation of 'RO' and 'AO', e.g. RO=5, AO=50 --> AD=5,50. I added to headers too and then launch:

vcfs <- loadVCFs(vcf, cnvs.gr = cnvs_gr, vcf.source = "Ion", list.support.field = "AD")

It doesn't give me any error, but the result object is empty in 'metadata' field, so it seems like he's not able to parse anything(I attach a partial screenshot of the output).

Cattura

I wonder why this happens and if you have any suggestion to give. I'm available for any further info. Thanks very much,

Andrea

sessionInfo() R version 4.1.0 (2021-05-18) Platform: x86_64-w64-mingw32/x64 (64-bit) Running under: Windows 10 x64 (build 19043)

jpuntomarcos commented 3 years ago

Hi Andrea,

Thanks for reporting the issue. Would it be possible for you to provide VCF examples (both the RO/AO and AD you have tried) so I can test them in deep? VCF with one or two variants should be enough :)

José Marcos.

AndreaG5 commented 3 years ago

Hi!

I hope I selected the correct vcf :D (I tried with multiple ones, so I hope these two are the right ones). I attach them: 1) _original.vcf --> as the name states it's the original vcf file output of IonTorrent. 2) _edited.vcf --> is the one that I edited to create "AD" field.

Both were read without apparent errors so I believe they're correctly formatted.

Text me if any problem occur! Thank you so much

Andrea

VCFs.zip

jpuntomarcos commented 3 years ago

Hi Andrea,

Thanks for the files. After checking them, I have observed that The Torrent Variant Caller produces the VCF in a slightly different way. I am planning to push a new version in a few days to fix this issue. I am also considering to automatically support Torrent Variant Caller VCFs, assuming AO and RO are common fields when using TVC. I'll let you known when the new version is available :)

José Marcos.

AndreaG5 commented 3 years ago

I guess so, I mean, I carefully read tool documentation and I think AO and RO are the most appropriate ones.

Thank you so much and I'll wait for next drop! :)

Andrea

jpuntomarcos commented 2 years ago

Hi Andrea,

CNVfilteR has been updated. Please, use last version (1.6.2) to make it work: vcfs <- loadVCFs(vcf.files, cnvs.gr = cnvs.gr, ref.support.field = "RO", alt.support.field = "AO")

Additionally, development version (so next Bioconductor release) will automatically recognize Torrent Variant Caller VCFs.

I would very appreciate if you can confirm that the fix is working properly.

AndreaG5 commented 2 years ago

Hi @jpuntomarcos,

I just tried this new version and I can confirm that everything seems to work properly! :)

If I'll find something unclear I'll text you again.

I really appreciate your quickness in response and fix!! Have a good day!

jpuntomarcos commented 2 years ago

You are welcome :)

J.