extract sequence around snp
2
2
Entering edit mode
7.9 years ago
jonessara770 ▴ 240

Hello, I would like to extract sequence around snp from the human genome like below. Is there any tools to do this?

CTGCTGGCCGTGATGGCCTATGACC[A/G]CTTTGTGGCCATCTGTAACCCTTTG

Thanks

dnaseq • 4.4k views
ADD COMMENT
0
Entering edit mode

@Jonessara770 Did you find a way to extract the SNP flanking sequences.

ADD REPLY
2
Entering edit mode
7.9 years ago
aham ▴ 40

Use 'samtools faidx', if you know the position of snp. You will also require the relevant reference build: samtools faidx ref.fasta chr1:2500026-2500063 adjust the range as required.

ADD COMMENT
1
Entering edit mode
7.9 years ago
sacha ★ 2.4k

Create a bed file with range containing your snp position: chr pos-offset pos+offet
Exemple with 3 snps : (chr3:150050 ,chr4:150050,chr5:150050) and 10 nucleotid size margin :

  chr 3   150040 1500060
  chr 4   150040 1500060
  chr 5   150040 1500060

Then use bedtools to extract your sequences

  bedtools getfasta -fi hg19.fa -bed snp.bed -fo out.fa

You should get a list of all sequences founded.

ADD COMMENT
0
Entering edit mode

once extract the SNP flanking sequences (bedtools getfasta), how to indicates SNP position in brackets [ ] with REF/ALT bases

ADD REPLY

Login before adding your answer.

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