abyzovlab / CNVpytor

a python extension of CNVnator -- a tool for CNV analysis from depth-of-coverage by mapped reads
MIT License
178 stars 26 forks source link

No output when I tried to get a merged vcf from multiple sample using cnvpator #221

Closed zyxNo1 closed 3 months ago

zyxNo1 commented 3 months ago

I encountered a problem when I run cnvpytor for multiple samples analysis. Firstly, I followed the basic process outlined in the guide for every bam file:

cnvpytor -root file.pytor -rd file.bam
cnvpytor -root file.pytor -his 1000 10000 100000
cnvpytor -root file.pytor -partition 1000 10000 100000
cnvpytor -root file.pytor -call 1000 10000 100000

Next, I executed a command similar to the one provided in CNVpytor's examples/merging.md file: cnvpytor -root sample1.pytor sample2.pytor sample3.pytor sample4.pytor -view 10000 And there are 2 important things I think:

set print_filename merged.xlsx
set print merged_calls

And I made the following adjustment as I desired a VCF file:

set print_filename merged.vcf
set print merged_calls

However, I got nothing. No ouput file at all. But if I change it into other format like tsv:

set print_filename merged.tsv
set print merged_calls

I can get correctly formated output.

Why did the result turn out this way? And if I want to get merged vcf, how should I do that?

zyxNo1 commented 3 months ago

What's more, I am unsure about how to call somatic variants. I have 2 bam files, one for the tumor and one for the control. My goal is to generate a typical somatic vcf output with only one sample column (instead of displaying tumor and control at the same time). Is there any related documentation available for this? Alternatively, what steps should I take to accomplish this?

arpanda commented 3 months ago

There is a typo in your set print merged_calls command; it should be print merged_calls.

Currently, only the calls output of a single Pytor file can be saved in VCF format. For merged output, it can be saved in XLSX, TSV, or other similar formats.

The following command can be used to generate VCF output of a sample using VIEW mode:

set print_filename test1.vcf
print calls

Thank you, Arijit