How to extract partial sequences from an DNA alignment in fasta format
2
0
Entering edit mode
9.1 years ago
Yongjie Zhang ▴ 110

Dear community,

I have a long DNA sequence alignment in fasta format (I prefer to open the alignment in MEGA). Now I want to extract partial sequences from the alignment and save as a different file. Do you know if there is a easy way to perform such a task? I may delete un-needed regions and keep only the region needed, and save the remaining sequences, but the problem is that I need to extract many different regions from the alignment. Please let me know if you have a simple solution that can save time and labour.

Thanks.

Yongjie

sequence • 3.8k views
ADD COMMENT
0
Entering edit mode

Thanks for your answers. That really helps, esp. the former. For the latter, I found the outputs are not from the start to end positions indicated; they are actually the region from "the start position + 1" to "the start + end". For example, perl select_sites.pl Mitogenome_aligned.fas 50 500 extract the region from 51 to 550.

ADD REPLY
2
Entering edit mode
9.1 years ago
h.mon 35k

The "selectSites.pl" script on this site may help you.

ADD COMMENT
2
Entering edit mode
9.1 years ago
venu 7.1k

This script does what you want. Feel free to modify according to your needs.

ADD COMMENT

Login before adding your answer.

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