downsample vcf error
1
0
Entering edit mode
3.7 years ago
evafinegan • 0

Hello,

I am trying to downsample vcf file using:

java -jar /downsamplevcf.jar input.vcf -n 100 > subsample.vcf

But I get the error:

[INFO][Launcher]downsamplevcf Exited with failure (-1)

I will appreciate any help on this. Thank you!

sequencing • 1.4k views
ADD COMMENT
0
Entering edit mode
 /downsamplevcf.jar

you put this file the root folder (?)

ADD REPLY
0
Entering edit mode

is it http://lindenb.github.io/jvarkit/DownSampleVcf.html ? I wrote that software for fun. I'm pretty sure that is not the only error message....

ADD REPLY
0
Entering edit mode
3.7 years ago
bcftools view --header-only  input.vcf > subsample.vcf
bcftools view --no-header input.vcf | awk '{printf("%f\t%s\n",rand(),$0);}' | sort -t $'\t' -k1,1g | cut -f2-  | head -n 1000 >>  subsample.vcf
ADD COMMENT
0
Entering edit mode

Thank you! I am trying to subsample a vcf file by taking out the first 100 lines including header. I tried your suggestion using bcftools but it is not returning any output.

ADD REPLY

Login before adding your answer.

Traffic: 971 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