I would like to calculate Fst from the short-paired reads. For that, I did mapping with minimap2.
./minimap2 -ax sr ref.fa read1.fq.gz read2.fq.gz > aln.sam
# Converted to bam file
samtools view -Sb aln.sam > aln.bam
# Sorted the bam file
samtools sort aln.bam > aln_sorted.bam
# created an index file of sorted bam
samtools index aln_sorted.bam
# created an index file of reference
samtools faidx ref.fa
extracted the raw variants using freebayes.
freebayes -f ref.fa aln_sorted.bam > out_var.vcf
extracted SNPs using vcf tools
vcftools --vcf out_var.vcf --remove-indels --recode --recode-INFO-all --out snps_only.vcf
for getting the ids from the vcf file for Fst calculation, I used bcf tools
bcftools query -l snps_only.vcf
I got the output `unknown`. How to retrieve the list ids? your suggestions would be appreciated.
./minimap2 -ax sr ref.fa read1.fq.gz read2.fq.gz > aln.sam
# Converted to bam file
samtools view -Sb aln.sam > aln.bam
# Sorted the bam file
samtools sort aln.bam > aln_sorted.bam
# created an index file of sorted bam
samtools index aln_sorted.bam
# created an index file of reference
samtools faidx ref.fa
extracted the raw variants using freebayes.
freebayes -f ref.fa aln_sorted.bam > out_var.vcf
extracted SNPs using vcf tools
vcftools --vcf out_var.vcf --remove-indels --recode --recode-INFO-all --out snps_only.vcf
for getting the ids from the vcf file for Fst calculation, I used bcf tools
bcftools query -l snps_only.vcf
I got the output `unknown`. How to retrieve the list ids? your suggestions would be appreciated.