I am trying to prepare my vcf data for working with ANGSD. At first, I converted my vcf file to bed file using plink. Then tried bedToBam of BCftools to convert it to bam format. The problem is, a compressed file is generated which is not accessible. Is it happening due to the difference in the chr name in vcf and genome file as vcf file contains only the chromosome number while genome file contains 'chr'?
My another question is, what will be the genome file when I'm working with vcf files that has population specific snps in bcfToBed? The final question is, for such type of data what will be the ancestral sequence in fasta format for ANGSD?
Too many question. Can you show the first few lines of your data?
BAM file is a compressed file. you need to 'view' it with samtools.
sorry for my clumsy questions. The problem is, when I'm trying to load the converted bam file into ANGSD, it is showing error - file can't be read.
I used the following command:
I used
plink
to get the bed file from vcf file.Would be good if you can show the output of commands asked above. also:
The converted file though has
.bam
extension, samtools is unable to view it.If I have a vcf file, the how can I get bam file for it?
When I viewed the converted .bam file in samtools, it said...