Question: error while running vcf2maf
gravatar for archie
19 months ago by
archie90 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/ --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 • 867 views
ADD COMMENTlink modified 7 weeks ago by dodausp130 • written 19 months ago by archie90

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 19 months ago • written 19 months ago by h.mon29k

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 19 months ago by swbarnes27.5k
gravatar for h.mon
19 months ago by
h.mon29k 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 19 months ago by h.mon29k

Why not just using sed? :)

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

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

ADD REPLYlink written 19 months ago by wenbinm10
gravatar for dodausp
7 weeks ago by
dodausp130 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 7 weeks ago by dodausp130
Please log in to add an answer.


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