Question: .fai file generation for a vcf file containing snps
0
gravatar for madhuri haque
2.3 years ago by
Jahangirnagar University, Savar, Dhaka, Bangladesh
madhuri haque20 wrote:

I would like to generate a .fai file for all the snps belonging to a specific gene. How I'll be able to do that?

Do I have to download all the sequences belonging to each snps (e.g. rs124536) from NCBI and make a .fa file and then use samtools to convert it to .fai? 

 

snps .fai • 971 views
ADD COMMENTlink modified 2.3 years ago by cpad01124.1k • written 2.3 years ago by madhuri haque20
2
gravatar for cpad0112
2.3 years ago by
cpad01124.1k
cpad01124.1k wrote:

Your question is confusing.

1) Fasta indexing generates .fai files. There are several tools to index fasta files.

2) If you want to generate fasta file from VCF (using a reference), the same question is answered several times in this forum. For eg. Introducing Known Mutations (From A Vcf) Into A Fasta File

3) If you are looking for indexing VCF (standard format for storing SNVs/MNVs/DIVs), there are several tools.

Downloading all SNVs (in general as VCF) and indexing won't generate a sequence file (.fasta) with all the SNPs.

 

ADD COMMENTlink written 2.3 years ago by cpad01124.1k
1
gravatar for Devon Ryan
2.3 years ago by
Devon Ryan74k
Freiburg, Germany
Devon Ryan74k wrote:

.fai files are specific to fasta files. If you have a VCF file then google "tabix".

ADD COMMENTlink written 2.3 years ago by Devon Ryan74k
0
gravatar for madhuri haque
2.3 years ago by
Jahangirnagar University, Savar, Dhaka, Bangladesh
madhuri haque20 wrote:

The software I am working with (ANGSD) requires .fai file along with a .vcf file as input.

Would you please tell me how I will be able to get the .fai file for a .vcf file?

ADD COMMENTlink modified 2.3 years ago • written 2.3 years ago by madhuri haque20
0
gravatar for cpad0112
2.3 years ago by
cpad01124.1k
cpad01124.1k wrote:

.fai file mentioned in page: http://www.popgen.dk/angsd/index.php/Input  corresponds to reference fasta file. Index your reference fasta file and this would create a fai file. This fai file should be supplied to the command. Example command would be (assuming that your reference sequence used in alignment is reference.fa and vcf file is sample.vcf):

#for using GL tags
./angsd -vcf-gl sample.vcf -fai reference.fa.fai -nind <sample numbers in your VCF> -domaf 1 -out <output_file_name>
#for using GP tags
./angsd -vcf-gp sample.vcf -fai reference.fa.fai -nind <sample numbers in your VCF> -domaf 1 -out <output_file_name>

One cannot create a fai from VCF file. VCF indexing  produces idx files and fasta indexing  generates fai files, in general.

ADD COMMENTlink modified 2.3 years ago • written 2.3 years ago by cpad01124.1k
Please log in to add an answer.

Help
Access

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