error while running vcf2maf
2
0
Entering edit mode
6.3 years ago

Hi I have snps from rnaseq data. I split multisample file into single sample files. Now each sample vcf, I want to convert vcf to maf in vcf2maf . I am getting following error

perl /usr/local/bin/vcf2maf.pl --input-vcf  F545_altref_vep.vcf   --output-maf F545_altref_vep.maf  --tumor-id WD1309  --ref-fasta Homo_sapiens.GRCh38.dna.toplevel.fa.gz 

>ERROR: Your VCF uses CR line breaks, which we can't support. Please use LF or CRLF.

I will appreciate all the suggestions

Thank you Archana

vcf2maf SNP rnaseq • 4.6k views
ADD COMMENT
0
Entering edit mode

Did you edit the file somewhere? Where? It is complaining about the file having lines delimited by carriage return, which was used on old Macs. This is the comment on the code:

# If the file uses Mac OS 9 newlines, quit with an error

ADD REPLY
0
Entering edit mode

With what software did you split the multi-sample file into single files? It looks like that software introduced something the perl script doesn't like.

ADD REPLY
2
Entering edit mode
6.3 years ago
h.mon 35k

This should fix the error, but you should first discover why the file got broken in the first place:

perl -lne 's/\r//; print "$_";' F545_altref_vep.vcf > F545_altref_vep_fixed.vcf
ADD COMMENT
0
Entering edit mode

Why not just using sed? :)

sed 's/\r/\n/' F545_altref_vep.vcf > F545_altref_vep_fixed.vcf
ADD REPLY
0
Entering edit mode

I subset my vcf with VariantAnnotation in R and then got the same error. That works for me!

ADD REPLY
0
Entering edit mode
4.9 years ago
dodausp ▴ 190

I was running vcf2maf on Linux and came across the same problem. So, my question is: are you running it on Linux as well?

If so, it seems that this is a matter of line break system in different OS. Fortunately, that can be easily fixed by dos2unix command.

In my case, I ran: dos2unix -n -ascii Old.vcf New.vcf

Where, -n will generate a new file whilst keeping the original; and -ascii will convert only the break lines.

I hope it helps.

ADD COMMENT

Login before adding your answer.

Traffic: 2600 users visited in the last hour
Help About
FAQ
Access RSS
API
Stats

Use of this site constitutes acceptance of our User Agreement and Privacy Policy.

Powered by the version 2.3.6