Question: error while running vcf2maf
0
gravatar for archie
2.3 years ago by
archie100
India
archie100 wrote:

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

snp vcf2maf rnaseq • 1.3k views
ADD COMMENTlink modified 9 months ago by dodausp140 • written 2.3 years ago by archie100

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 REPLYlink modified 2.3 years ago • written 2.3 years ago by h.mon31k

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 REPLYlink written 2.3 years ago by swbarnes28.9k
2
gravatar for h.mon
2.3 years ago by
h.mon31k
Brazil
h.mon31k wrote:

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 COMMENTlink written 2.3 years ago by h.mon31k

Why not just using sed? :)

sed 's/\r/\n/' F545_altref_vep.vcf > F545_altref_vep_fixed.vcf
ADD REPLYlink written 2.3 years ago by finswimmer13k

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

ADD REPLYlink written 2.3 years ago by wenbinm20
0
gravatar for dodausp
9 months ago by
dodausp140
Denmark/Copenhagen/BRIC
dodausp140 wrote:

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 COMMENTlink written 9 months ago by dodausp140
Please log in to add an answer.

Help
Access

Use of this site constitutes acceptance of our User Agreement and Privacy Policy.
Powered by Biostar version 2.3.0
Traffic: 1390 users visited in the last hour