vcf2maf
vcf2maf copied to clipboard
error: Couldn't open VCF: path_to.split.vcf!
Hi, I tried to run vcf2maf on a .vcf file produced using GATK Mutect2. The sample was a tumour whole genome run against a Panel Of Normals. I get the following error: error: Couldn't open VCF: path_to.split.vcf! Does this mean I have to split my .vcf before running vcf2maf, by, for example, chr? Or is it something to do with the Mutect2 output .vcf structure? Regards, Dean
Hi, @Deanho I am getting the same error. Any update on that?
No. I never got a response. Sorry.
From: D0g4 [email protected] Sent: 23 December 2019 14:02:10 To: mskcc/vcf2maf Cc: Hammond, Dean; Mention Subject: Re: [mskcc/vcf2maf] error: Couldn't open VCF: path_to.split.vcf! (#232)
Hi, @Deanhohttps://github.com/Deanho I am getting the same error. Any update on that?
— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHubhttps://github.com/mskcc/vcf2maf/issues/232?email_source=notifications&email_token=ACK5WGEV2T4LUXM6VIMS2GTQ2DAGFA5CNFSM4IXASRCKYY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOEHRF5GQ#issuecomment-568483482, or unsubscribehttps://github.com/notifications/unsubscribe-auth/ACK5WGCICYNBGJ45QMLDRETQ2DAGFANCNFSM4IXASRCA.
I got this error too.
It seems that, when we run vcf2maf.pl on a VCF file from two or more VCFs' intersection using this command:
bcftools isec A.vcf.gz B.vcf.gz > foo.vcf
Then run:
vcf2maf.pl \
--input-vcf foo.vcf \
--output-maf foo.maf \
...
It will lead to the error:
ERROR: Couldn't open VCF: foo.split.vcf
It's very strange where the "split.vcf" come out from.
Perhaps this is induced by potential SVs in the VCF. I think this section may be helpful:
# If the VCF contains SVs, split the breakpoints into separate lines before passing to VEP
my ( $split_svs, $var_count ) = ( 0, 0 );
my $orig_vcf_fh = IO::File->new( $input_vcf ) or die "ERROR: Couldn't open --input-vcf: $input_vcf!\n";
my $split_vcf_fh = IO::File->new( "$tmp_dir/$input_name.split.vcf", "w" ) or die "ERROR: Couldn't open VCF: $tmp_dir/$input_name.split.vcf!\n";
while( my $line = $orig_vcf_fh->getline ) {
# If the file uses Mac OS 9 newlines, quit with an error
( $line !~ m/\r$/ ) or die "ERROR: Your VCF uses CR line breaks, which we can't support. Please use LF or CRLF.\n";
if( $line =~ m/^#/ ) {
$split_vcf_fh->print( $line ); # Write header lines unchanged
next;
}
...
I have fix this problem in my own situation.
I had built a docker image of VEP and vcf2maf, and run it using arguments -u id -u
:id -g
.
But when it attempt to create the file "$input_name.split.vcf", it has no permission to do this.
A solution is removing the argument -u id -u
:id -g
, and let the docker image has "root" permission.
There must be better solutions.
I was getting the same error and I made a tmp directory and added --tmp-dir /
To solve the "Can't locate CGI.pm" issue, I had to fix my "PERL5LIB" path and set it to perllibs directory and with the above fix (making a tmp directory), I could run vcf2maf successfully.