Introduce SNPs on FASTA
2
0
Entering edit mode
6 months ago
Riccardo ▴ 10

Hello everyone!

Is there a way to introduce specific SNPs on the fasta sequence of a gene? I am working on a Pharmacogenetics project and I want to simulate reads for specific haplotypes of PGX genes. Therefore, I want to introduce in the FASTA of a specific gene (e.g., CYP3A4), the specific variants that would define a specific haplotype (e.g., rs 27371759 that defines haplotype CYP3A4*18).

Thank you in advance

simulation snps haplotypes pharmacogenetics • 697 views
ADD COMMENT
0
Entering edit mode

If you have specific changes you want to make then you can edit the fasta file accordingly.

ADD REPLY
0
Entering edit mode

Thank you very much. Is there a script or program that does it automatically?

ADD REPLY
1
Entering edit mode
6 months ago
Michael 55k

If you have a VCF file with all the ALT alleles that you need to insert and a reference genome in FASTA, you can use bcftools consensus to insert all ALT alleles into the reference. Note that the reference and VCF need to have the same coordinate system. That means, if the VCF is in genomic coordinates, then you also have to use whole chromosomes in the reference fasta.

If you want to introduce only few specific mutations into a gene sequence you could use seqkit mutate. You could also use a sequence editor like Jalview or Snapgene. I wouldn't use a text editor because you need to do all the counting by hand.

ADD COMMENT
0
Entering edit mode

Thank you very much for your answer!

ADD REPLY
0
Entering edit mode
6 months ago

You could take a look at the mutfa command in seqtk

ADD COMMENT

Login before adding your answer.

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