no samples in vcf file

762 views
Skip to first unread message

test1

unread,
Apr 20, 2017, 4:52:03 PM4/20/17
to plink2-users
I am trying to convert vcf file generated for HRC dataset to binary plink file format but it gives error "no samples in .vcf file"

please helps
thank you

Christopher Chang

unread,
Apr 20, 2017, 6:50:27 PM4/20/17
to plink2-users
What does the top of the VCF file look like (up to one line after the #CHROM  POS  ID  ... line)?

test1

unread,
Apr 21, 2017, 10:26:57 AM4/21/17
to plink2-users
this is the top section:


##fileformat=VCFv4.1       
##FILTER=<ID=PASS,Description="All filters passed">       
##contig=<ID=1,length=249250621>       
##INFO=<ID=AC,Number=A,Type=Integer,Description="Alternate allele count in called genotypes">       
##INFO=<ID=AN,Number=1,Type=Integer,Description="Total number of alleles in called genotypes">       
##INFO=<ID=AF,Number=A,Type=Float,Description="Alternate allele frequency from called genotypes">       
##INFO=<ID=AC_EXCLUDING_1000G,Number=A,Type=Integer,Description="Alternate allele count in called genotypes excluding 1000G samples">       
##INFO=<ID=AN_EXCLUDING_1000G,Number=1,Type=Integer,Description="Total number of alleles in called genotypes excluding 1000G samples">       
##INFO=<ID=AF_EXCLUDING_1000G,Number=A,Type=Float,Description="Alternate allele frequency from called genotypes excluding 1000G samples">       
##contig=<ID=2,length=243199373>       
##contig=<ID=3,length=198022430>       
##contig=<ID=4,length=191154276>       
##contig=<ID=5,length=180915260>       
##contig=<ID=6,length=171115067>       
##contig=<ID=7,length=159138663>       
##contig=<ID=8,length=146364022>       
##contig=<ID=9,length=141213431>       
##contig=<ID=10,length=135534747>       
##contig=<ID=11,length=135006516>       
##contig=<ID=12,length=133851895>       
##contig=<ID=13,length=115169878>       
##contig=<ID=14,length=107349540>       
##contig=<ID=15,length=102531392>       
##contig=<ID=16,length=90354753>       
##contig=<ID=17,length=81195210>       
##contig=<ID=18,length=78077248>       
##contig=<ID=19,length=59128983>       
##contig=<ID=20,length=63025520>       
##contig=<ID=21,length=48129895>       
##contig=<ID=22,length=51304566>       
##contig=<ID=X,length=155270560>       
##contig=<ID=Y,length=59373566>       
##contig=<ID=MT,length=16569>       
##bcftools_viewVersion=1.3+htslib-1.3       
##bcftools_viewCommand=view -Ou -S ^hrc.gecco.remove.samples --force-samples /lustre/scratch114/projects/hrc/hrc-dropbox/panels/HRC.r1.20150417/vcf/HRC.r1.GRCh37.chr1.shapeit3.mac5.genotypes.bcf       
##bcftools_pluginVersion=1.3-31-g014c136-dirty+htslib-1.3-37-gfc93dfc       
##bcftools_pluginCommand=plugin aggregate -Ou -- -Ut AC,AN,AF -S excluding_1000g.samples       
##bcftools_viewCommand=view -Ou -c5:minor       
##bcftools_annotateVersion=1.3+htslib-1.3       
##bcftools_annotateCommand=annotate -Ou -a /lustre/scratch116/vr/ref/human/GRCh37/resources/dbsnp/dbsnp_142.b37.tab.gz -c CHROM,POS,ID,REF,ALT       
##INFO=<ID=AA,Number=1,Type=String,Description="Ancestral allele">       
##bcftools_pluginCommand=plugin fill-from-fasta --threads 16 -Ob -o /lustre/scratch116/vr/projects/hrc/hrc-dropbox/panels/HRC.r1.20160326/vcf/HRC.r1-1.GRCh37.chr1.shapeit3.mac5.aa.genotypes.bcf -- -c AA -h /lustre/scratch116/vr/ref/human/GRCh37/resources/anno/human_ancestor.fa.gz.hdr -f /lustre/scratch116/vr/ref/human/GRCh37/resources/anno/human_ancestor.fa.gz       
##bcftools_viewCommand=view -GOb HRC.r1-1.GRCh37.chr1.shapeit3.mac5.aa.genotypes.bcf       
##bcftools_convertVersion=1.2+htslib-1.2.1       
##bcftools_convertCommand=convert --hapsample2vcf - -Ob -o /net/fantasia/home/sayantan/GLOBUS_DOWNLOAD/tarballs/hrc.r1.genotype_calling-20151110/results/BCF_FIN/HRC.r1.chr9.before.jitter.bcf.gz       
##vcfJitterPos_version=0.001       
##vcfJitterPos_command=-r /net/fantasia/home/sayantan/GLOBUS_DOWNLOAD/tarballs/hrc.r1.genotype_calling-20151110/work/offset/gls/9.gls.jitter.bcf.map       
##bcftools_concatVersion=1.3+htslib-1.3       
##bcftools_concatCommand=concat -Oz -f concat.list       
#CHROM POS ID REF ALT QUAL FILTER INFO
1 13380 rs571093408 C G . . AC=5;AN=64940;AF=7.69941e-05;AC_EXCLUDING_1000G=0;AN_EXCLUDING_1000G=59950;AF_EXCLUDING_1000G=0;AA=.

Christopher Chang

unread,
Apr 21, 2017, 11:52:32 AM4/21/17
to plink2-users
Well, there actually aren't any samples in this file...

test1

unread,
Apr 21, 2017, 1:15:21 PM4/21/17
to plink2-users
so when I only need bim (marker files) from a vcf , I can not use plink-vcf option?...ok, thanks

Christopher Chang

unread,
Apr 21, 2017, 2:14:36 PM4/21/17
to plink2-users
You can use --allow-no-samples during VCF import if that's really what you want.

test1

unread,
Apr 24, 2017, 12:45:28 PM4/24/17
to plink2-users
thank you...yes, that's what I need!
best


On Thursday, April 20, 2017 at 4:52:03 PM UTC-4, test1 wrote:
Reply all
Reply to author
Forward
0 new messages