Question: How to extract partial sequences from an DNA alignment in fasta format
0
gravatar for Yongjie Zhang
3.5 years ago by
UC Berkeley, USA/ Shanxi Univ, China
Yongjie Zhang80 wrote:

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 • 1.6k views
ADD COMMENTlink modified 3.5 years ago • written 3.5 years ago by Yongjie Zhang80
2
gravatar for venu
3.5 years ago by
venu6.1k
Germany
venu6.1k wrote:

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

ADD COMMENTlink written 3.5 years ago by venu6.1k
0
gravatar for h.mon
3.5 years ago by
h.mon24k
Brazil
h.mon24k wrote:

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

ADD COMMENTlink written 3.5 years ago by h.mon24k
0
gravatar for Yongjie Zhang
3.5 years ago by
UC Berkeley, USA/ Shanxi Univ, China
Yongjie Zhang80 wrote:

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 COMMENTlink modified 3.5 years ago • written 3.5 years ago by Yongjie Zhang80
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: 1070 users visited in the last hour